How can I test whether the mean return of stock indices is 0? I have daily return data for SPX over 50 years. And I calculate the mean return by just taking arithmetic average. I want to test the hypothesis whether the mean is 0.
Can I use the t statistic, which is (mean-0)/sample varirance, to test whether the mean return is 0? If not, what statistic should I use? Thanks.
 A: Can I use the t statistic to test whether the mean return is 0? If not, what statistic should I use? Thanks.
Two factoids: Yes you can, but probably no you shouldn't. Stock prices cannot be negative, consequently, the differences between stock prices are limited below by what you paid for them. For stock prices one can use the LogNormal distribution. That is, one takes the logarithm of the prices and then that logarithm may be normally distributed. Now iff the data is LogNormal, then the difference between the logarithms of the prices would also be normal in the logarithm, but, the difference of logarithms is the logarithm of the ratio of prices, not the difference in prices themselves. However, applying the t-test to the difference of logarithms would tell us when the start price was no different than the end price. 
However, LogNormality is only one possibility, and one should always let the data talk to us about what it is. Another approach that works (almost) all the time because it does not matter what the distribution is, would be to use a nonparametric test like the Wilcoxon signed-rank sum test against an assumed difference of zero.
In fact, since the probability of losing the entire investment is not negligible, taking logs is not perfectly normally distributed, as there will be a nonzero distribution at minus infinity. So, Wilcoxon testing may be generally better than t-testing of the logarithms. The Wilcoxon test is (almost) the same for comparing the quantities themselves or for comparing their logarithms, it compares ranking, and ranking is mostly logarithm invariant, so Wilcoxon testing is versatile. Moreover, comparing the before and after prices as opposed to their logarithms will remove ties at negative infinity, but there will be ties at zero for enough data, so use the best available software for the Wilcoxon test--the treatment of ties can differ.
A: Why you probably want to use log returns in this case...
Let $R_t = \frac{P_t + D_t}{P_{t-1}}$ be the gross return from $t-1$ to $t$.
If you buy and hold an asset, what you probably care about is the geometric average
$$ \bar{R}_{geom} = \left( R_1\cdot R_2 \cdot \ldots \cdot R_T \right)^\frac{1}{T} $$
Let $r_t = \log R_t$, that is, log return $r_t$ is the natural logarithm of the gross return. Then:
$$ \log \bar{R}_{geom} = \frac{1}{T} \sum_t r_t $$
The log of the geometric average gross return is the arithmetic average of the log return! Do what Carl says, take the log of your returns
Other stuff to be aware of...
If your returns are stuff like $.01$, $-.02$, $.003$, then you want to add 1 to get a gross return before you take the log.
For gross returns near 1 (i.e. gross return of 1 is no change), you have:
$$ \log R \approx R - 1$$
For returns near zero, returns and log returns are basically the same number. Why? The first order Taylor Expansion of the logarithm around 1 is simply subtracting 1. A corollary is that it often doesn't matter whether you use log returns or arithmetic returns.
Another note is that returns are pretty close to uncorrelated over time, and it's basically fine to take the average over time and compute t-stats etc... assuming independence across time.
