Test the hypotheses that the year over year, end of month returns of Walmart from January 2005 through September 2015, is equal to the returns of S&P500 Index over the same period
Comparing the Returns of Walmart to the Returns of the Standard & Poor 500 Index
1. Comparing the Returns of Walmart to the Returns of the
Standard & Poor 500 Index
Mia Attruia
The task at hand is to test the
hypotheses that the year over year, end
of month returns of Walmart from
January 2005 through September 2015,
is equal to the returns of S&P500 Index
over the same period.
Data
The end of month price data are taken
from Yahoo Finance and the year over
year returns are computed using:
rt = 100 * ln (Pricet / Pricet-12)
Pricet represents the end of month stock
price from either Walmart or the
S&P500 Index value at time t. Pricet-12
represents the price or index value 12
months prior. We lose the first year of
data because we are using year-over-
year returns; therefore, the data is
available from January 2006 through
September 2015 for a total of 117
observations.
Returns plotted in Figure 1
Figure 1: Year-over-year percent returns of
Walmart and the S&P500 Index from 1/2006
through 9/2015
The plots show that the two returns
move together and are positively
correlated. The simple correlation
between the returns of the two
companies is 0.10004412 and the t-value
for the two-tailed null hypothesis that
this correlation is zero is t(115) =
1.07826, with two-tailed p-value 0.2832.
We conclude that the returns are in fact,
significantly positively correlated.
Table 1: The sample means and standard
deviations for the year-over-year percent
returns of Walmart (rWalmart) and the
S&P500 Index (rSP) from 1/2006
through 9/2015.
Mean St. Dev.
rWalmart 6.93392 11.6916
rSP 5.41001 18.9238
Hypothesis Tests
The results of the t-test for the two-tailed
hypothesis:
H0 : rWalmart = 0 versus Ha : rWalmart ≠ 0
Are:
Null Hypothesis
Population
Mean
0
Sample Size n = 117
Sample Mean 6.93392
Standard
Deviation
11.6916
Test Statistic t(116) = (6.93392 - 0)/1.08089 =
6.41501
Two-Tailed P-
Value
3.176e-09
2. The returns of Walmart are
significantly different from zero over this
period of time. We also conclude that the
returns of the S&P500 Index are
significantly different from zero at the 5%
level over this period with a t-value of
(5.41001-0)/1.7495=3.092317805 and
Two-tailed p-value = 0.002488
Now we test the hypothesis that the
average returns of Walmart is the same
as the average returns of the S&P500
Index over this time period.
The standard deviations of the
two returns are different; therefore, we
will conduct the test assuming different
variances for each sample. We can
verify this assumption using the “2
variances” test in gretl. This “un-pooled”
test, otherwise names the Welch’s t-test,
is more general than the “pooled”
variance test reported in the Stock and
Watson textbook and the test statistic is
only approximately distributed with a t-
distribution. The degrees of freedom for
the un-pooled test statistic are given by
the Welch-Satterthwaite equation
where si
2
and ni, i= 1, 2, are the sample
variances and sample sized of the two
samples in the test.
The results of the two-tailed
hypothesis:
Ho : rWalmart = rSP versus Ha : rWalmart ≠ rSP
Or,
Ho : rWalmart – rSP = 0 versus Ha : rWalmart –
rSP ≠ 0
Null Hypothesis Difference of means =
0
Test Statistic t(193) = (6.93392 -
5.41001)/2.05647 =
0.74103
Two - Tailed 0.4596
One - Tailed 0.2298
The standard of deviation of rWalmart –
rSP is computed as follows:
= 2.056475528
In conclusion, the data shows that the
returns from Walmart are not
significantly different from the returns of
the S&P500 Index.
Summary
The year-over-year percentage
returns of the end of the month stock
price of Walmart and the Standard and
Poor 500 Index from January 2006
through September 2015 (117
Observations), has been computed. The
returns data are significantly positively
correlated. We find that the year-over-
year returns are significantly different
from zero for both portfolios. This
occurs because the volatility of year-
over-year returns is much lower than
month-over-month returns.
Neither the returns of Walmart
nor the S&P500 Index are normally
distributed over this period, also, t-tests
are only approximately correct.
Since we have so many observations in
our samples, we can appeal to the central
limit theorem and assume that our test
statistics are approximately normally
distributed. Therefore, our conclusions
should me accurate and reliable.