Sie sind auf Seite 1von 9

THE UNIVERSITY OF CHICAGO

Graduate School of Business


Business 41202, Spring Quarter 2004, Mr. Ruey S. Tsay

Solutions to Homework Assignment #3


April 29, 2004

Each HW problem is 10 points throughout this quarter. The final grade for HW is the average
(times 10) over the total number of HW problems..

1. It is well-known that daily returns of equal-weighted index have some weekday effects. How
about daily returns of value-weighted index or S&P composite index? To answer this question,
consider the daily returns of value-weighted index and S&P composite index from January 3, 2000
to December 31, 2003. The data are in the file d-dell3dx0003.txt, which has 12 columns. The
first 4 columns are daily simple returns of Dell, VW, EW, and S&P. Columns 5 to 9 are indicators
for Monday to Friday, respectively. Columns 10 to 12 correspond to year, month, and day.
There are 1004 data points. Perform all tests using the 5% significance level, and answer the
following questions:

(a) Is there a Friday effect on the daily simple returns of S&P composite index? You may employ a
simple linear regression model to answer this question. Estimate the model and test the hypothesis
that there is no Friday effect. Draw your conclusion.
Let Rt be the daily simple return of the S&P composite index at time t; and let I{Friday} be the
indicator (dummy) variable that takes the value 1 if Rt corresponds to a Friday return, and 0
otherwise. We want to fit a simple linear model of the form

Rt = 0 + 1 I{Friday} + at , for all t (1)

iid
where at N (0, 2 ). Let b0 and b1 be the corresponding estimates of the parameters.
The output from SCA is
tsm m1. model is sp = b0 + (b1)fr(binary) + noise.
estim m1. hold resid(r1). method exact.

SUMMARY FOR UNIVARIATE TIME SERIES MODEL -- M1


-----------------------------------------------------------------------
VARIABLE TYPE OF ORIGINAL DIFFERENCING
VARIABLE OR CENTERED

SP RANDOM ORIGINAL NONE


FR BINARY ORIGINAL NONE
-----------------------------------------------------------------------
PARAMETER VARIABLE NUM./ FACTOR ORDER CONS- VALUE STD T
LABEL NAME DENOM. TRAINT ERROR VALUE
1 B0 CNST 1 0 NONE .72612E-04 .0005 .15
2 B1 FR NUM. 1 0 NONE -.0013 .0011 -1.17

EFFECTIVE NUMBER OF OBSERVATIONS . . 1004


R-SQUARE . . . . . . . . . . . . . . 0.001
RESIDUAL STANDARD ERROR. . . . . . . 0.138102E-01

1
From there we can see a couple of things. First, the average return for Monday to Thursday is
not significantly different from zero (the t-statistic of 0 is very small.) Second, the p-value for the
Friday effect is 0.242, which comes from a t distribution with T 2 = 1002 degrees of freedom.
Thus, the effect is not significant at the 5% level.
(b) Check the residual serial correlations using Q(12) statistic. Are there any significant serial
correlations in the residuals?
The ACF and PACF from the series of residuals at are
iden r1. maxlag 12.

AUTOCORRELATIONS
1- 12 -.02 -.05 -.02 .02 -.04 -.03 -.04 .02 -.01 -.01 -.01 .08
ST.E. .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03
Q .5 2.6 2.9 3.5 4.9 6.0 7.4 7.7 7.8 8.0 8.0 14.4

-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0
+----+----+----+----+----+----+----+----+----+----+
I
1 -0.02 +XI +
2 -0.05 +XI +
3 -0.02 + I +
4 0.02 + IX+
5 -0.04 +XI +
6 -0.03 +XI +
7 -0.04 +XI +
8 0.02 + I +
9 -0.01 + I +
10 -0.01 + I +
11 -0.01 + I +
12 0.08 + IXX

PARTIAL AUTOCORRELATIONS
1- 12 -.02 -.05 -.02 .02 -.04 -.03 -.04 .01 -.01 -.01 -.01 .07
ST.E. .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03

-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0
+----+----+----+----+----+----+----+----+----+----+
I
1 -0.02 +XI +
2 -0.05 +XI +
3 -0.02 + I +
4 0.02 + IX+
5 -0.04 +XI +
6 -0.03 +XI +
7 -0.04 +XI +
8 0.01 + I +
9 -0.01 + I +
10 -0.01 + I +
11 -0.01 + I +
12 0.07 + IXX
--

There seems to be no information left in the residuals of the return. The Ljung-Box statistic is
Q(12) = 14.36, which comapred to a 2 with 12 d.f. gives a p-value of 0.2778. Therefore, we cannot
reject the null hypotesis of no serial correlation.

2. Now, consider similar problems for individual stock returns. We use the daily simple returns of

2
the stock of Dell Company in this problem; see the data set in this study. Again, use 5% significance
level in all tests.

(a) Is there a Friday effect on the daily simple returns of Dell stock? Estimate your model and test
the hypothesis that there is no Friday effect. Draw your conclusion.
Similarly, let us use model (1) but define Rt to be the simple return of Dell stock.
The output from S-Plus is
> m2.1 = OLS(dl ~ fr)
> summary(m2.1)
Coefficients:
Value Std. Error t value Pr(>|t|)
(Intercept) 0.0008 0.0012 0.6688 0.5038
fr -0.0031 0.0027 -1.1484 0.2511

Regression Diagnostics:
R-Squared 0.0013

Residual standard error: 0.03444 on 1002 degrees of freedom


F-statistic: 1.319 on 1 and 1002 degrees of freedom, the p-value is 0.2511

Again, both coefficients are not significant. In particular, the t-statistic of 1 gives a p-value of
0.2511. Therefore, there is not evidence of a Friday effect for the returns of Dell stock.
(b) Are there serial correlations in the residuals? Use Q(12) to perform the test. Draw your
conclusion.
> r2.1 = m2.1$res
> Q2.1 = autocorTest(m2.1,lag=12,method="lb")

Test for Autocorrelation: Ljung-Box


Null Hypothesis: no autocorrelation
Test Statistics:
Test Stat 23.7589
p.value 0.0219
Dist. under Null: chi-square with 12 degrees of freedom
Total Observ.: 1004

The p-value for the Q-statistic with 12 d.f. is 0.0219, which is smaller than 0.05. Thus, we reject
the null and conclude that there is evidence of serial correlation.
(c) Refine the above model by using the technique of regression model with time-series errors. Fit
the model and write down the result. Is the estimate of d1 significant at the 5% level?
Note: In SCA, use
tsm m1. model dell = d0 + (d1)fri(binary) + (2)noise.
S-plus does not have the nice feature as SCA mentioned above, but one can use a close approxi-
mation:
fit = OLS(A$dell~ 1 + A$fri + tslag(A$dell,2))
Here tslag denotes lagging operation of a time series.
If we analyse the series of residuals at , we will notice that lag 2 in the ACF is highly significant.
Thus, using an MA(2) model makes sense.

3
We will model the simple returns as
Rt = 0 + 1 I{Friday} + (1 2 B 2 )at , for all t (2)
iid
where at N (0, 2 ).
The estimation using SCA gives us
tsm m22. model is dl = b0 + (b1)fr(binary) + (2)noise.
estim m22. hold resid(r22). method exact.

SUMMARY FOR UNIVARIATE TIME SERIES MODEL -- M22


-----------------------------------------------------------------------
VARIABLE TYPE OF ORIGINAL DIFFERENCING
VARIABLE OR CENTERED

DL RANDOM ORIGINAL NONE


FR BINARY ORIGINAL NONE
-----------------------------------------------------------------------
PARAMETER VARIABLE NUM./ FACTOR ORDER CONS- VALUE STD T
LABEL NAME DENOM. TRAINT ERROR VALUE
1 B0 CNST 1 0 NONE .0008 .0011 .72
2 B1 FR NUM. 1 0 NONE -.0030 .0028 -1.10
3 DL MA 1 2 NONE .1098 .0313 3.51

EFFECTIVE NUMBER OF OBSERVATIONS . . 1004


R-SQUARE . . . . . . . . . . . . . . 0.014
RESIDUAL STANDARD ERROR. . . . . . . 0.341890E-01
--
p22 = 2*(1- cdft(1.10,1002))

In this case, the MA coefficient is highly significant. However, the Friday effect is not. The p-value
for 1 is 0.272 which is certainly greater than 0.05. Thus, we do not reject the null (H0 : 1 = 0.)
Furtheremore, the Ljung-Box statistic for the residuals, Q(12) = 9.3106, which compared to a 2
with 11 d.f. gives a p-value of 0.5932. Hence, there is no evidence against no autocorrelation.
The solution using S-Plus gives equivalent results.
3. Consider the monthly yields of Moodys AAA & BAA seasoned bonds from January 1919 to
March 2004. The data are obtained from Federal Reserve Bank at St Louis. Monthly yields
are averages of daily yields. Obtain the summary statistics (sample mean, standard deviation,
skewness, excess kurtosis, minimum and maximum) of the two yield series. Are the bond yields
skewed? Do they have heavy tails? Answer the questions using 5% significance level.
Table 1 gives the summary statistics for both time series.
The standard errors for the skewness and kurtosis are computed under the normality assumption.
Thus, Var(S(x)) = 6/T , and Var(K(x)) = 24/T .
For the AAA bond yield, we have that
S 0.9189
t(S) = p = = 12.011,
6/T 0.0765
which gives a p-value of zero. Hence, we reject the null hypothesis of no skewness. Similarly,
K 3 0.3950
t(K) = p = = 2.585,
24/T 0.1528

4
Table 1: Summary statistics for monthly yields of Moodys AAA & BBB seasoned bonds from
January 1919 to March 2004.

X S(x) K(x) K(x) 3 Min Max


AAA 5.941 2.832 0.9189 3.3950 0.3950 2.46 15.49
BAA 7.142 2.988 0.9097 3.7216 0.7216 2.94 17.18

with a p-value of 0.01. Thus, we also reject the null hypothesis of no excess kurtosis. In particular,
to test for heavy tails we need a one sided test. The p-value for that is 0.01/2 = 0.005. Therefore,
the bond yield does have heavy tails.
A similar analysis can be done for the BAA bond yield. We have

t(S) = 11.891, and t(K) = 4.722.

Both t-statistics have a p-value of zero. Therefore, we reject that the yield is not skewed, and also
we conclude that it has heavy tails.

4. Consider the monthly AAA bond yield. Build a time series model for the series.
This is an example for which taking logs of the data actually makes sense theoretically, and also
simplifies the model building process. First of all, the yield is always positive, while the shocks are
assumed to come from a normal distribution, thus taking negative values with positive probability.
Furtermore, the log transformation helps stabilize the variance. Figure 4 shows the time series
plots of the yield and log of the yield of bond AAA.

(a) AAA bond yield (b) AAA bond log(yield)


16
14

2.5
12

2.0
10
8

1.5
6
4

1.0
2

1920 1940 1960 1980 2000 1920 1940 1960 1980 2000

Time Time

Figure 1: Time series plot of AAA bond yield from January 1919 to March 2004: (a) original scale;
(b) log scale.

Let YtA be the yield of bond AAA at time t, and let ytA = log(YtA ). An explanatory analysis of the
series suggests that ytA is not stationary. Thus, a regular difference must be used.

5
The ACF and PACF from SCA are shown below The Extendend Autocorrelation Function (EACF)
is a very useful tool to find the order of an ARMA model. From SCA we get

iden laa. dforder is 1. maxlag 12.

AUTOCORRELATIONS
1- 12 .35 -.01 -.04 .04 .06 .01 -.02 .03 .07 .06 .06 .02
ST.E. .03 .03 .03 .04 .04 .04 .04 .04 .04 .04 .04 .04
Q 129 129 131 132 136 136 136 137 143 147 150 151

-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0
+----+----+----+----+----+----+----+----+----+----+
I
1 0.35 + IX+XXXXXXX
2 -0.01 + I +
3 -0.04 +XI +
4 0.04 + IX+
5 0.06 + IX+
6 0.01 + I +
7 -0.02 +XI +
8 0.03 + IX+
9 0.07 + IXX
10 0.06 + IXX
11 0.06 + IX+
12 0.02 + IX+

PARTIAL AUTOCORRELATIONS
1- 12 .35 -.16 .02 .05 .02 -.02 -.01 .05 .04 .02 .05 -.01
ST.E. .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03

-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0
+----+----+----+----+----+----+----+----+----+----+
I
1 0.35 + IX+XXXXXXX
2 -0.16 XX+XI +
3 0.02 + I +
4 0.05 + IX+
5 0.02 + I +
6 -0.02 + I +
7 -0.01 + I +
8 0.05 + IX+
9 0.04 + IX+
10 0.02 + I +
11 0.05 + IX+
12 -0.01 + I +
--

The spike on the ACF lead to an MA(1), and the spikes on the PACF to a AR(2). The MA model
does not give good residual properties, and AR(2) model is preferred.
Consider the model
(1 1 B 2 B 2 )(1 B)ytA = at (3)
iid
where at N (0, 2 ).

6
The estimates using S-Plus can be obtain using two alternative methods, given below

> m3.01 = arima.mle(laa,model=list(order=c(2,1,)),max.iter=200,max.fcal = 200)


## or, with Finmetrics
> m3.01.al = OLS(diff(laa)~ar(2)-1)
Coefficients:
Value Std. Error t value Pr(>|t|)
lag1 0.4106 0.0310 13.2493 0.0000
lag2 -0.1559 0.0310 -5.0298 0.0000

Regression Diagnostics:
R-Squared 0.1472
Residual Diagnostics:
Stat P-Value
Ljung-Box 32.2162 0.1239 # with 24 dfs

From there we see that both parameters are significant, and that the Ljung-Box statistic Q(24) =
32.12 which compared with a 2 with 22 d.f. gives a p-value of 0.0753, which is greater than 0.05
and thus we do not reject the null of no serial correlation.1 Figure 4 presents the analysis of the
resiuals from model (3) using the function arima.diag.

5. Again, consider the two bond yield series. What is the relationship between the two series? To
answer this question, build a time series model using yields of BAA bond as the response variable
and yields of AAA bond as explanatory variable.
The relationship between these two variables could not be captured by a simple model. Usin the
same logic described in problme 4, we will model the log of the yields for both series.
Let ytA and ytB be the log yield of the AAA and BAA bonds, respectively. The residuals from the
regression of ytB on ytA shows a non-stationary behaviour. Thus, the relationship has to be found
between ytB := (1 B)ytB and ytA := (1 B)ytA .
Several models where tested using the information in the ACF and PACF of the residuals from the
regression of ytB on ytA .
The preferred model found, is given by the equation2

(1 1 B 3 B 3 )
ytB = 1 ytA + at (4)
(1 2 B 2 3 B 3 7 B 7 13 B 13 15 B 15 18 B 18 )
iid
where where at N (0, 2 ). The high lags were used to account for outilers.
The estimated paramters using SCA are

tsm m5. model is lba(1) = (b1)laa(1) + (1,3)/(2,3,7,13,15,18)noise.


estim m5. hold resid(r5). method exact.

1
Note that the default for the OLS function gives the p-value with 24 and not 22 dfs, and the adjustment has to be
made. If one uses the arima.diag function, and sets the options max.gof=24 the summary gives the correct answer.
2
Many other models could be appropiate. This in particular had good residual propertis and thus it was chosen.

7
ARIMA Model Diagnostics: laa
Plot of Standardized Residuals

6
4
2
0
-2
-4
-6

1920 1940 1960 1980 2000

ACF Plot of Residuals


1.0
0.5
ACF
0.0
-1.0

0.0 0.5 1.0 1.5 2.0 2.5

PACF Plot of Residuals


0.04
PACF
-0.02
-0.08

0.0 0.5 1.0 1.5 2.0 2.5

P-values of Ljung-Box Chi-Squared Statistics


0.8
p-value
0.4
0.0

0.5 1.0 1.5 2.0


Lag

ARIMA(2,1,0) Model with Mean 0

Figure 2: Residual analysis for model (3).

-----------------------------------------------------------------------
VARIABLE TYPE OF ORIGINAL DIFFERENCING
VARIABLE OR CENTERED
1
LBA RANDOM ORIGINAL (1-B )
1
LAA RANDOM ORIGINAL (1-B )
-----------------------------------------------------------------------
PARAMETER VARIABLE NUM./ FACTOR ORDER CONS- VALUE STD T
LABEL NAME DENOM. TRAINT ERROR VALUE
1 B1 LAA NUM. 1 0 NONE .8449 .0251 33.68
2 LBA MA 1 1 NONE -.2232 .0311 -7.17
3 LBA MA 1 3 NONE -.2493 .0872 -2.86
4 LBA D-AR 1 2 NONE -.0368 .0302 -1.22
5 LBA D-AR 1 3 NONE -.3015 .0854 -3.53
6 LBA D-AR 1 7 NONE .1006 .0312 3.22
7 LBA D-AR 1 13 NONE -.1389 .0293 -4.75
8 LBA D-AR 1 15 NONE -.1343 .0308 -4.37
9 LBA D-AR 1 18 NONE .0945 .0340 2.78

8
EFFECTIVE NUMBER OF OBSERVATIONS . . 1004
R-SQUARE . . . . . . . . . . . . . . 0.998
RESIDUAL STANDARD ERROR. . . . . . . 0.161799E-01

Finally, the ACF and PACF of the residuals from model (4) are
iden r5. maxlag 24.

AUTOCORRELATIONS
1- 12 -.00 -.01 -.00 -.02 -.03 .01 .03 -.01 .04 .09 .04 -.01
ST.E. .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03
Q .0 .0 .1 .5 1.3 1.5 2.5 2.7 4.7 13.5 15.4 15.6
13- 24 -.01 -.05 -.01 .02 .01 -.01 -.01 -.00 -.06 -.05 .01 .03
ST.E. .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03
Q 15.8 18.1 18.1 18.7 18.8 18.9 19.0 19.0 22.3 25.0 25.1 25.8

-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0
+----+----+----+----+----+----+----+----+----+----+
I
1 0.00 + I +
2 -0.01 + I +
3 0.00 + I +
4 -0.02 +XI +
5 -0.03 +XI +
6 0.01 + I +
7 0.03 + IX+
8 -0.01 + I +
9 0.04 + IX+
10 0.09 + IXX
11 0.04 + IX+
12 -0.01 + I +

PARTIAL AUTOCORRELATIONS
1- 12 -.00 -.01 -.00 -.02 -.03 .01 .03 -.02 .04 .09 .05 -.01
ST.E. .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03
13- 24 -.01 -.04 -.00 .02 .00 -.01 -.02 -.01 -.06 -.05 .01 .04
ST.E. .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03 .03

-1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8 1.0
+----+----+----+----+----+----+----+----+----+----+
I
1 0.00 + I +
2 -0.01 + I +
3 0.00 + I +
4 -0.02 +XI +
5 -0.03 +XI +
6 0.01 + I +
7 0.03 + IX+
8 -0.02 + I +
9 0.04 + IX+
10 0.09 + IXX
11 0.05 + IX+
12 -0.01 + I +

The Ljung-Box statistic Q(24) = 25.8, which compared to a 2 with 24 8 = 16 d.f. gives a p-value
of 0.068, which is slightly larger than the 5% level. Therefore, we do not reject the null hypothesis
of no serial correlation.

Das könnte Ihnen auch gefallen