How to test whether the average return on S(USD/AUD) of the last 30 days is significantly different from zero at the 5% level of significance? I have daily returns on S(USD/AUD). Now how to test whether average return of last 30 days is significantly different from zero at 5% level of significance ?
 A: You may be looking for a so-called "HAC"-test, a "heteroskedasticity and autocorrelation consistent" test for $\mu=\mu_0$:
$$
t_{HAC}=\frac{\bar{Y}_T-\mu_0}{\sqrt{\frac{\sum_{j=-\infty}^{\infty}\gamma_j}{T}}}
$$
We can then approximately (i.e. for $T$ sufficiently large) argue that, under $H_0:\mu=\mu_0$
$$
t_{HAC}\stackrel{a}{\sim}N(0,1)
$$
How can we estimate $J=\sum_{j=-\infty}^{\infty}\gamma_j$? In practice, for a sample size $T$, we can calculate autocovariances up to order at most $T-1$. A plausible idea then is
$$
J_T\equiv\hat{\gamma}_0+2\sum_{j=1}^{T-1}\hat{\gamma}_j
$$
Clearly the higher order terms will be estimated from very few observations. It turns out that using all possible $\hat{\gamma}_j$ as above leads to an inconsistent estimator. 
Consistent estimators obtain for so-called "nonparametric" kernel estimators
$$
\hat{J_T}\equiv\hat{\gamma}_0+2\sum_{j=1}^{T-1}k\left(\frac{j}{\ell_T}\right)\hat{\gamma}_j
$$
$k$ is a kernel or weighting function, that among other things must be symmetric and have $k(0)=1$. $\ell_T$ is a bandwidth parameter that has to be chosen "appropriately".
The literature proposes a variety of choices for $k$. A popular one is the Bartlett kernel
$$k\left(\frac{j}{\ell_T}\right) = \begin{cases}
\bigl(1 - \frac{j}{\ell_T}\bigr)
\qquad &\mbox{for} \qquad 0 \leqslant j \leqslant \ell_T-1 \\
0 &\mbox{for} \qquad j > \ell_T-1
\end{cases}
$$
It is often the case that the choice of $k$ does not matter too much. Choosing $\ell_T$ appropriately is more important. Again, there are many rules (Newey and West, Review of Economic Studies 1994). An easy one is
$$
\ell_T=\lfloor 4(T/100)^{2/9}\rfloor
$$ 
