38
FIN 6271 FINANCIAL MODELING AND ECONOMETRICS TIME SERIES MODELING LECTURE SET 1 REFIK SOYER THE GEORGE WASHINGTON UNIVERSITY

FIN 6271 TS Lecture 1

Embed Size (px)

Citation preview

Page 1: FIN 6271 TS Lecture 1

FIN 6271

FINANCIAL MODELING AND ECONOMETRICS

TIME SERIES MODELING

LECTURE SET 1

REFIK SOYER

THE GEORGE WASHINGTON UNIVERSITY

Page 2: FIN 6271 TS Lecture 1

INTRODUCTION

• WHAT IS A TIME SERIES (TS)?It is a sequence of observations which are ordered in time.

] ] á ]1 2 n, , ,

; 1, 2, , n.Ê Ö] × > œ á>

Examples: GNP, Dow-Jones Index, interest rates, stock returns, exchange rates,

mortgage rates, temperature, brain waves (electroencephographic-EEG), etc.

• TS plots: Monthly housing starts in the UShstarts

30

40

50

60

70

80

90

100

110

120

130

140

time

0 10 20 30 40 50 60 70 80 90 100 110 120 130 140

1

Page 3: FIN 6271 TS Lecture 1

• Seasonal patterns: seasonal box plots

1 2 3 4 5 6 7 8 9 10 11 12

25

50

75

100

125

150

hsta

rts

month

• Random sample versus a TS sample

What happens when you reorder the observations in a random sample ?

What happens when you reorder the observations in a TS sample ?

2

Page 4: FIN 6271 TS Lecture 1

IMPORTANT FEATURES OF TS

a) observations arrive according to some order.

b) in practice measurements are made in discrete (equispaced) time intervals,in principle some quantities such as voltage or temperature can be measuredcontinuously.

c) Measurements can be discrete or continuous; but for many applications they areassumed to consist of continuous values.

d) observations are necessarily independent. They may be correlated and thenotdegree of correlation may depend on their positions in the sequence. closer ones might be more related to each other.Ê

e) only series can be analyzedstable

f) financial TS may have additional uncertainty due to volatility.

- also skewness and heavy tails of asset returns TS.

3

Page 5: FIN 6271 TS Lecture 1

WHY DO WE STUDY TS ?

(1) to predict the future based on knowledge of past

(2) to understand the mechanism generating the series and control it.

(3) to provide a description of the noticable features of the series.

• How do we forecast ? Need a model that describes the past behavior.

• How good is the model ? Need to define prediction forecast error.Î

] œ > J œ >> >actual value at time , forecast value for time (one-step forecast)/ œ > Ê / œ ] J> > > >forecast error at time

Forecast Comparison Criteria: Some positive function of forecast error penalty.Ê

MAE , MSE , MAPE .œ Ð"Î8Ñ l/ l œ Ð"Î8Ñ / œ Ð"Î8Ñl/ l

]>œ" >œ" >œ"

8 8 8

>#>

>

>

4

Page 6: FIN 6271 TS Lecture 1

MODELING TS

Typically, almost all TS models focus on describing the conditional mean (expectedvalue) of the series of interest, that is, .]>

What do we mean by the conditional mean of ?]>

For example, in the simple regression model

] œ \ > ! " > >" " %

where is the independent variable (assumed to be known) and is the zero-mean\> >%

error term, the conditional mean is

IÐ] l\ Ñ œ œ \ Þ> > > ! " >. " "

In general, at time given what is known to us, that is the available historyÐ> "Ñ

L>", we can define define the conditional mean asIÐ] lL Ñ œ> >" >. .

All TS models can be represented as

Observation at time conditional mean for time error at time> œ > >

5

Page 7: FIN 6271 TS Lecture 1

DETERMINISTIC COMPONENTS OF A TS

Based on the above we can write TS as]>

] œ > > >. % .

If consists of deterministic components for all then we have deterministic TS.> >

models.

Then the TS can be decomposed into three components:

] œ X W > > > >% (additive form)

X ´> the trend componentW ´> the seasonal component.%> ´ random (error) noise component

Ð] W Ñ œ> > deseasonalized seriesÐ] X Ñ œ> > detrended seriesÐ] W X Ñ œ> > > detrended and deseasonalized series

6

Page 8: FIN 6271 TS Lecture 1

MODELING TRENDS AND SEASONALITY

Seasonal time-series are also useful in pricing weather-related derivatives and energyfutures.

If seasonal pattern and trend are then we can use deterministic models.fixed

We model the seasonal component by using seasonal indicators and the trendW>

component by a low order polynomial in time . For example, whereX > X œ >> > α "

> œ "ß #ßá

When we have seasonal components ( for monthly data) we can useO O œ "#

ÐO "Ñ seasonal indicators to represent the seasonal effects.

W œ M â M M> > "! "!ß> "" ""ß> " " " "0 1 1

M œ1> 1 if observation is from the first month and 0 otherwiseM œ2> 1 if observation is from the second month (0 otherwise)ã ã ã M œ""ß> 1 if observation is from the eleventh month (0 otherwise).

Ê M œ M œ â œ M œIf 0 then the observation is from month 12.1 2> > ""ß>

7

Page 9: FIN 6271 TS Lecture 1

INTERPRETATION OF THE COEFFICIENTS

If we have a model consisting of seasonal components only then

] œ M â M > > "" ""ß> >" " " %0 1 1

where has zero mean uncorrelated error term with constant variance.%>

What is the interpretation of ? What is the interpretation of any ?" "0 3ß 3 œ "ßá ß ""

What can we say if a particular ?"3 œ !

What happens when we estimate the model ?

How do we forecast from this model ?

We include a linear trend term and write the model as

] œ M â M > > > "" ""ß> "# >" " " " %0 1 1

8

Page 10: FIN 6271 TS Lecture 1

Creating Monthly Indicator Variables and Time Index in SAS________________________________________________________DATA HSTARTS;INFILE "c:\tsdata\hstarts.txt";INPUT SALES;ARRAY SEASIND{12} JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC;DO i=1 TO 12;IF MOD(_N_,12)=i THEN SEASIND{i}=1;ELSE SEASIND{i}=0;IF MOD(_N_,12)=0 THEN SEASIND{12}=1;ELSE SEASIND{12}=0;END;TIME=_N_;PROC PRINT; RUN;_______________________________________________________________

NOTE: The above simply creates twelve indicator variables and a time index .>

We can then specify a reference month in our model by exluding the associatedindicator from the model.

9

Page 11: FIN 6271 TS Lecture 1

Quarterly Sales data of Fields 1960-1975

We will use the data from 1960-1 to 1974-4 for modeling and predict sales for the firstfour quarters of 1975.

sales

40000

50000

60000

70000

80000

90000

100000

110000

120000

130000

140000

150000

160000

170000

180000

190000

time

0 10 20 30 40 50 60 70

• The data is drifting upward (trend)

• Regular Seasonal Pattern (Regular ups and downs in the series)Fourth quarter is consistently higher than the others.

10

Page 12: FIN 6271 TS Lecture 1

An easier way of identifying the seasonal pattern is to look at the seasonal box plots.Ê Separate plots of observations from each quarter.

1 2 3 4

25000

50000

75000

100000

125000

150000

175000

200000

sale

s

quarter

• Level of the series is higher at the fourth quarter than the other quarters.

• Note that as time passes the seasonal swings are getting larger.

This is an indication of increasing variability in the series with time.

11

Page 13: FIN 6271 TS Lecture 1

BOX PLOTS IN SAS

DATA SALES;INFILE 'c:\tsdata\fields_sales.txt';INPUT SALES;TIME=_N_;

PROC GPLOT;PLOT SALES*TIME;SYMBOL I=JOIN;

DO i=1 TO 4;if MOD(_N_,4)=i THEN QUARTER=i;IF MOD(_N_,4)=0 THEN QUARTER=4;END;

PROC SORT;BY QUARTER;PROC BOXPLOT;PLOT SALES*QUARTER;

12

Page 14: FIN 6271 TS Lecture 1

Dealing with Nonconstant Variance

The most common way to deal with this problem is to introduce a stabilizingtransformation such as logarithmic transformation of the series, that is, we will workwith the log(sales) and then will transform it back to sales for predicting the futurevalues.

Note that transforming the data by taking logs does not destroy anyinformation in the data.

logsales

10.7

10.8

10.9

11.0

11.1

11.2

11.3

11.4

11.5

11.6

11.7

11.8

11.9

12.0

12.1

12.2

time

0 10 20 30 40 50 60 70

• Using SAS13

Page 15: FIN 6271 TS Lecture 1

1

Modeling Fields Quarterly Sales

datadatadatadata sales;

infile 'c:\tsdata\fields_sales.txt';

input sales;

array seasind{4444} q1 q2 q3 q4;

do i=1111 to 4444;

if mod(_N_,4444)=i then seasind{i}=1111;

else seasind{i}=0000;

if mod(_N_,4444)=0000 then seasind{4444}=1111;

else seasind{4444}=0000;

end;

time=_N_;

if time>if time>if time>if time>60606060 then sales= then sales= then sales= then sales=....;;;;

procprocprocproc regregregreg;

model sales=q1 q2 q3 time/cli;

runrunrunrun;

14

Page 16: FIN 6271 TS Lecture 1

2

Model: MODEL1

Dependent Variable: sales

Analysis of Variance

Sum of Mean

Source DF Squares Square F Value Pr > F

Model 4 58825066677 14706266669 300.89 <.0001

Error 55 2688167939 48875781

Corrected Total 59 61513234616

Root MSE 6991.12156 R-Square 0.9563

Dependent Mean 90772 Adj R-Sq 0.9531

Coeff Var 7.70188

Parameter Estimates

Parameter Standard

Variable DF Estimate Error t Value Pr > |t|

Intercept 1 73123 2459.93641 29.73 <.0001

q1 1 -42048 2557.60000 -16.44 <.0001

q2 1 -38873 2554.93259 -15.21 <.0001

q3 1 -28825 2553.33081 -11.29 <.0001

time 1 1478.20804 52.22493 28.30 <.0001

15

Page 17: FIN 6271 TS Lecture 1

3

Output Statistics

Dep Var Predicted Std Error

Obs sales Value Mean Predict 95% CL Predict Residual

56 171965 155902 2198 141216 170589 16063

57 115673 115333 2323 100569 130097 340.17

58 125995 119986 2323 105222 134750 6009

59 136255 131512 2323 116748 146276 4743

60 169677 161815 2323 147051 176579 7862

61 . 121246 2460 106393 136098 .

62 . 125899 2460 111046 140751 .

63 . 137425 2460 122572 152278 .

64 . 167728 2460 152875 182580 .

16

Page 18: FIN 6271 TS Lecture 1

4

Using Log Transform

data sales;

infile 'c:\tsdata\fields_sales.txt';

input sales;

array seasind{4} q1 q2 q3 q4;

do i=1 to 4;

if mod(_N_,4)=i then seasind{i}=1;

else seasind{i}=0;

if mod(_N_,4)=0 then seasind{4}=1;

else seasind{4}=0;

end;

time=_N_;

if time>60 then sales=.;

lsales=log(sales);

proc reg;

model lsales=q1 q2 q3 time;

output out=results p=lpred;

run;

17

Page 19: FIN 6271 TS Lecture 1

5

Dependent Variable: lsales

Analysis of Variance

Sum of Mean

Source DF Squares Square F Value Pr > F

Model 4 7.03211 1.75803 979.15 <.0001

Error 55 0.09875 0.00180

Corrected Total 59 7.13086

Root MSE 0.04237 R-Square 0.9862

Dependent Mean 11.35622 Adj R-Sq 0.9851

Parameter Estimates

Parameter Standard

Variable DF Estimate Error t Value Pr > |t|

Intercept 1 11.13097 0.01491 746.57 <.0001

q1 1 -0.44000 0.01550 -28.38 <.0001

q2 1 -0.39923 0.01549 -25.78 <.0001

q3 1 -0.27302 0.01548 -17.64 <.0001

time 1 0.01650 0.00031653 52.13 <.0001

Obs pred ActualsActualsActualsActuals

1 120282.45 111905111905111905111905

2 127371.83 127872127872127872127872

3 146911.31 145367145367145367145367

4 196242.18 188635188635188635188635

18

Page 20: FIN 6271 TS Lecture 1

1

SAS Example

Testing Seasonality Fields Quarterly Sales

DATA SALES; INFILE 'c:\tsdata\fields_sales.txt'; INPUT SALES; ARRAY SEASIND{4} Q1 Q2 Q3 Q4; DO i=1 TO 4; IF MOD(_N_,4)=i THEN SEASIND{i}=1; ELSE SEASIND{i}=0; IF MOD(_N_,4)=0 THEN SEASIND{4}=1; ELSE SEASIND{4}=0; END; TIME=_N_; IF TIME>60 THEN SALES=.; PROC REG DATA=SALES; MODEL SALES= Q1 Q2 Q3 TIME/CLI; TEST Q1=0,Q2=0,Q3=0; RUN;

19

Page 21: FIN 6271 TS Lecture 1

2

Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept 1 73123 2459.93641 29.73 <.0001 q1 1 -42048 2557.60000 -16.44 <.0001 q2 1 -38873 2554.93259 -15.21 <.0001 q3 1 -28825 2553.33081 -11.29 <.0001 time 1 1478.20804 52.22493 28.30 <.0001 The REG Procedure Model: MODEL1 Test 1 Results for Dependent Variable SALES Mean Source DF Square F Value Pr > F Numerator 3 5475484684 112.03 <.0001 Denominator 55 48875781

20

Page 22: FIN 6271 TS Lecture 1

Forecasting from the Model

How do we predict for first quarter of 1975 (t 61) ?œ

Log(Sales ) 11.131 0.44 (1) 0.0165 (61) 11.697661 œ œ

How do we predict the sales ?

We can transform logsales to obtain the sales predictions for these periods.

For example, sales prediction for first quarter of 1975:

exp(Log(Sales )) exp(11.6976) 120282.61 œ œ

Time Actual Sales Predicted Sales 1st Model1975-1 111905 120282 1212461975-2 127872 127376 125899 1975-3 145367 146913 1374251975-4 188635 196241 167728

21

Page 23: FIN 6271 TS Lecture 1

Plot of Actual versus Predicted

After transforming the logsales predictions to sales we can look at actual vs predicted.SALES

40000

50000

60000

70000

80000

90000

100000

110000

120000

130000

140000

150000

160000

170000

180000

190000

200000

TIME

0 10 20 30 40 50 60 70

PROC REG DATA=SALES;MODEL LOGSALES= Q1 Q2 Q3 TIME/CLI;OUTPUT OUT=RESULTS P=LPRED;

DATA NEW;SET RESULTS;PRED=EXP(LPRED);

PROC GPLOT;PLOT (SALES PRED)*TIME/OVERLAY;SYMBOL I=JOIN;

22

Page 24: FIN 6271 TS Lecture 1

REVIEW OF FUNDAMENTAL CONCEPTS

• Covariance between random variables and is defined as\ ]

G9@Ð\ß ] Ñ œ G œ IÒÐ\ Ñ ] ÑÓ\] \ ] ( . .

G \ ]\] is a measure of linear dependence between the two random variables and .

If 0 no linear relation between and , but it does not imply that andG œ Ê \ ] \\]

] Ê \ ] are probabilistically independent and are uncorrelated.

can be written as cross product moment.G G œ IÒ\] Ó Ê\] \] \ ]. .

Given a random sample of n paired observations X , Y , X , Y , , X , YÐ Ñ Ð Ñ á Ð Ñ1 1 2 2 n n

we estimate the by the sample covarianceG\]

G œ s

\]

œ

(X X) (Y Y) 1

n 1

_ _n

t 1t t

which is an unbiased estimate of .G\]

23

Page 25: FIN 6271 TS Lecture 1

• Covariance indicates how two variables covary in a linear manner. If we want to

compare the strength of linear relationship between two random variables on a unitless

scale, we can use the , correlation coefficient 3xy.

G9<<Ð\ß ] Ñ œ œ Ÿ ŸG

3 35 5

xy xy\]

\ ] , 1 1 .

3xy œ Ê \ ]0 and are uncorrelated

3xy œ Ê1 Perfect positive linear relationship

3xy œ Ê1 Perfect negative linear relationship

Given a random sample of n paired observations we estimateß

3xy by the sample correlation coefficient

< œ œGs

= =

xy

n

t 1t t

n n

t 1 t 1t t2 2

.

(X X) (Y Y)_ _

(X X) (Y Y)_ _

\]

\ ]

œ

œ œË

24

Page 26: FIN 6271 TS Lecture 1

AUTOCOVARIANCE OF TIME-SERIES

Note that TS is a collection of random variables ; 1, 2, , n. We observeÖ] × > œ á>

only one (sample) at each point in time.realization

"How do we estimate a mean or a variance at time t based on one observation ?" stationarity (time invariance of the probability structure) assumption.Ê

Given a time-series the covariance between any two values seperated by one timeÖ] ×tperiod is called the ( , ) defined asautocovariance at lag 1, G9@ ] ]t t 1

G9@ ] ] œ œ IÒ ] ] Ó( , ) ( ) ( )> >" > ] >" ]# . .1

We can extend this concept to k-period lagged series and define the autocovariance atlag k as; assuming that ( ) ( )I ] œ I ] œ> >5 ].

G9@Ð] ] Ñ œ œ I Ð] Ñ Ð] Ñ> >5 5 > ] >5 ], [ ]# . .

Ê 5#5 measures the linear relationship between the original series and -period laggedseries.

25

Page 27: FIN 6271 TS Lecture 1

ESTIMATING AUTOCOVARIANCES

Plot of against is known as the (theoretical) of the TS.#5 5 autocovariance function

Note that in defining the autocovariance function we need to assume thatautocovariance is only a function of lag (that is, ) but not a function of time.5

Also by definition: # . 502œ IÒÐ] Ñ Ó œ> ]

#]

The sample autocovariance at lag is given by5

#s œ Ð] ] Ñ Ð] ] Ñ"

8 5 "5

8

>œ5"

> >5

_ _

sample autocovariance function.Ê

Note that if n is small, the estimates of autocovariance becomes less reliable since weloose observations in estimating .5 #5

Rule of thumb: estimate autocovariances upto a lag less than or equal to n 5 or n 4.Î Î

26

Page 28: FIN 6271 TS Lecture 1

AUTOCORRELATION OF TIME-SERIES

Autocorrelation at lag k, which is the standardized form of autocovariance at lag ,5is defined as

G9<< ] ] œ œ œ œZ +<Ð] Ñ Z +<Ð] Ñ

( , )

> >5 5

5 5 5

> >5 ]

3# # #

5 #È 20

1 (since ).Ê œ œ3 # 50 02]

We assume that for any , that is, assuming that the varianceZ +<Ð] Ñ œ Z +<Ð] Ñ 5> >5

does not depend on time.

The plot of versus is known as the or the of35 5 autocorrelation function correlogram the TS. We estimate by the sample autocorrelation at lag as35 5

< œ

] ] ] ]

] ]5

8

>œ5"> >5

8

>œ">

#

. ( ) ( )

_ _

( )_

27

Page 29: FIN 6271 TS Lecture 1

EXAMPLE > ] ]> >"

1 13 _ 2 8 13 3 15 8 4 4 15 5 4 4 6 12 4 7 11 12 8 7 11 9 14 7 10 12 14

Ê ] œ 10,_

< œ œ

] ]

]

">œ

> >

>œ>

0.188 ( 10) ( 10)

( 10)

10

21

10

1

2

28

Page 30: FIN 6271 TS Lecture 1

SCATTER PLOTS AND AUTOCORRELATION

DOWJONES

1900

2000

2100

2200

2300

2400

2500

2600

2700

2800

2900

3000

DJ1

1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000

DOWJONES

1900

2000

2100

2200

2300

2400

2500

2600

2700

2800

2900

3000

DJ2

1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000

29

Page 31: FIN 6271 TS Lecture 1

A SPECIAL TS: WHITE NOISE PROCESS

A TS is called a white noise series if it has:Ö+ ×>

- constant mean E for all tÊ Ð+ Ñ œ> +.

If 0 zero-mean white-noise process..+ œ Ê

- constant variance for all Ê Ð+ Ñ œ >Var > 52a

- uncorrelated at all lags 0 for all Ê œ 535

Goal of the time-series analysis is to reduce the given TS to a white noise series.

Note in reality we are given a TS sample and we would like to infer whether the givensample is coming from a white noise process.

Since we can estimate autocorrelations we can develop tests if we know the samplingdistribution of autocorrelations.

30

Page 32: FIN 6271 TS Lecture 1

A WHITE NOISE TEST

• Sampling distribution of <5

Bartlett showed that for a white noise series

Z +<Ð< Ñ œ8

51

(approximate result)

and if n large N 0, .< µ Ð "Î8Ñ5

Given a sample of size n from a TS we can test H : 0 versus H : 00 a3 35 5œ Á

Using test statistic: Z | || |

œ œ 8 <

<5

8

5É È1

Reject H if is outside 1.96 standard deviations (or if | | >1.96).0 < „ D5

For example, if we estimate 0.25 based on 100 observations we reject the< œ 8 œ"

hypothesis that H : 0 (since 2 standard deviations is 0.2).0 3" œ

31

Page 33: FIN 6271 TS Lecture 1

OTHER TESTS FOR AUTOCORRELATION

• How do we obtain the two standard error ( ) bounds provided by SAS ?=/

Note that sampling autocorrelation is a statistic and it has a distribution. Thus, we<5can obtain the at a given lag .=/Ð< Ñ 55

Assume that is at lag and beyond (that is, it drops to at lag ). Then the35 ! 5 5 ! 5

=/Ð< Ñ5 can be obtained as a function of the sample autocorrelations at lags"ß #ßá ß Ð5 "Ñ as

More specifically, 1 2 . 1

=/Ð< Ñ œ Ð < Ñ8

5

5"

4

ÍÍÍÌ 1

2

This is the result used by SAS to obtain bounds for the sample autocorelations.

We can use these standard errors to test the null hypothesis that autocorrelation (AC)drops to 0 at lag as provided by SAS output.5

32

Page 34: FIN 6271 TS Lecture 1

A CUMULATIVE TEST STATISTIC

• We can also test the hypothesis that AC's are all 0 up to a particular lag.

For example, we may be interested in the hypothesis that AC's at the first twelve lagsare all equal to 0, that is,

L À œ œ â œ œ !! " # "#3 3 3 .

L À !+ at least one of the AC's is different than .

In this case we can use the Ljung-Box statistic provided by SAS;#

For any lag the statistic is given by5

;#5

4œ 8 8

<

8 4( 2)

( )1

2

What is the intuition behind this ?

33

Page 35: FIN 6271 TS Lecture 1

Weekly Closings of Dow Jones Index DATA DOW; INFILE "C:\TSDATA\DOWJONES.TXT"; INPUT DOWJONES; PROC ARIMA DATA=DOW; IDENTIFY VAR=DOWJONES NLAG=20; RUN; Name of Variable = DOWJONES Autocorrelations Lag Covariance Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 Std Error 0 89283.646 1.00000 | |********************| 0 1 86819.371 0.97240 | . |******************* | 0.087706 2 84284.973 0.94401 | . |******************* | 0.149129 3 81707.598 0.91515 | . |****************** | 0.189604 4 79153.319 0.88654 | . |****************** | 0.220984 5 76825.976 0.86047 | . |***************** | 0.246831 6 74571.556 0.83522 | . |***************** | 0.268917 7 72771.514 0.81506 | . |**************** | 0.288182 8 71486.549 0.80067 | . |**************** | 0.305400 9 70338.148 0.78781 | . |**************** | 0.321141 10 69055.666 0.77344 | . |*************** | 0.335678 11 67755.081 0.75887 | . |*************** | 0.349118 12 66583.521 0.74575 | . |*************** | 0.361584 13 65295.249 0.73132 | . |*************** | 0.373228 14 63551.216 0.71179 | . |**************. | 0.384093 15 61792.329 0.69209 | . |************** . | 0.394109 16 60172.912 0.67395 | . |************* . | 0.403350 17 58519.464 0.65543 | . |************* . | 0.411921 18 56704.904 0.63511 | . |************* . | 0.419867 19 54867.332 0.61453 | . |************ . | 0.427193 20 52753.341 0.59085 | . |************ . | 0.433940

34

Page 36: FIN 6271 TS Lecture 1

The ARIMA Procedure Autocorrelation Check for White Noise To Chi- Pr > Lag Square DF ChiSq --------------------Autocorrelations----------- 6 663.63 6 <.0001 0.972 0.944 0.915 0.887 0.860 0.835 12 1183.97 12 <.0001 0.815 0.801 0.788 0.773 0.759 0.746 18 1604.24 18 <.0001 0.731 0.712 0.692 0.674 0.655 0.635

35

Page 37: FIN 6271 TS Lecture 1

ARE MONTHLY WALLMART RETURNS WHITE NOISE ? DATA WALMART; INFILE "c:\TSDATA\walmart.txt"; INPUT SP500 WALMART; PROC ARIMA; IDENTIFY VAR=WALMART; RUN; Autocorrelations Lag Covariance Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 Std Error 0 0.0077814 1.00000 | |********************| 0 1 0.0010311 0.13251 | . |***. | 0.091670 2 -0.0007807 -.10032 | . **| . | 0.093266 3 -0.0002232 -.02869 | . *| . | 0.094168 4 -0.0004124 -.05300 | . *| . | 0.094241 5 0.00028863 0.03709 | . |* . | 0.094492 6 -0.0008867 -.11395 | . **| . | 0.094614 7 0.00026054 0.03348 | . |* . | 0.095760 8 -0.0002840 -.03650 | . *| . | 0.095858 9 -0.0002638 -.03390 | . *| . | 0.095975 10 -0.0006344 -.08153 | . **| . | 0.096076 11 0.00001924 0.00247 | . | . | 0.096655 12 0.00083157 0.10687 | . |** . | 0.096656 13 -0.0003703 -.04759 | . *| . | 0.097644 14 -0.0002234 -.02871 | . *| . | 0.097839 15 0.00011684 0.01502 | . | . | 0.097909 16 0.00071576 0.09198 | . |** . | 0.097929 17 -0.0010691 -.13739 | .***| . | 0.098652 18 -0.0012650 -.16256 | .***| . | 0.100247 19 0.00048643 0.06251 | . |* . | 0.102438 20 -0.0002600 -.03341 | . *| . | 0.102758

36

Page 38: FIN 6271 TS Lecture 1

Autocorrelation Check for White Noise To Chi- Pr > Lag Square DF ChiSq --------------------Autocorrelations-------------------- 6 5.66 6 0.4619 0.133 -0.100 -0.029 -0.053 0.037 -0.114 12 8.55 12 0.7411 0.033 -0.036 -0.034 -0.082 0.002 0.107 18 16.61 18 0.5498 -0.048 -0.029 0.015 0.092 -0.137 -0.163 24 20.20 24 0.6854 0.063 -0.033 0.016 -0.085 -0.091 0.057 Note that in this case we have failed to reject the null hypothesis that autocorrelations upto lag 24 are all zero. Thus, we can not reject the null hypothesis that Wallmart returns are white noise.

37