5-7-2003 Lab Six 8 Econ 240C

I. Over-Differencing

In the prewhitening process, the first difference is applied to convert evolutionary stochastic processes to approximate stationarity. One hazard is the possibility of overdifferencing. The following example illustrates this difficulty. A white noise series is created and then differenced. We then attempt to analyze, model and fit this series.

Starting with white noise, WN(t), and then differencing, (1 - Z)WN(t), we obtain a process that looks like a first order moving average process:

MAONE(t) = WN(t) - WN(t-1) = WN(t) - a1 WN(t-1) where a1 = 1.

If a1 equals one then the inversion of the process yields an evolutionary infinite autoregressive process and the moving average process is said to be not invertible:

(1 - Z)-1 MAONE(t) = MAONE(t) + MAONE(t-1) + MAONE(t-2) + ... = WN(t).

Recall that the autocorrelation function for a moving average process of order one is, at lag one:

ACF(1) = a1/(1 + a12)

so for -1< a1< 1 then we must have -0.5< ACF(1)< 0.5.

Open Eviews

Object Menu: New

Workfile Object: “Over Differencing”

Frequency: • undated

observations: 1 2000

Workfile Menu: GENR

“WN=NRND”

Workfile Menu: GENR

“MAONE=WN - WN(-1)

Workfile Window: Select MAONE

Workfile Menu: VIEW: • open selection; you will see the spreadsheet view

Series Window: VIEW: • graph

Series Window: VIEW: • histogram and stats

Series Window: VIEW: • correlogram: level, 36 lags

NOTE: the negative spike at lag one in the ACF close to -0.5 and the geometric decay in the PACF. This looks like a first order moving average process.If we try to fit an MAONE process we estimate a coefficient very close to -1. Note the message that the inverted root equals one:

Object Menu/New/Equation

MAONE c ma(1)

Equation Object Window Menu: VIEW: • estimation output

II. Moving Averages of Near Random Walks

Technical analysts and commercially available software packages offer the options of calculating ten, fifteen, etc. moving averages of daily stock prices. In this exercise we create 250 observations of a random walk, take a 15 point moving average, and then analyze the resulting time series.

Open Eviews

Object Menu: New

Workfile Object: “Moving Average”

Frequency: • undated

observations: 1 250

Workfile Menu: GENR

“WN=NRND”

Workfile Menu: GENR

“RW=WN”

sample 1 1

Workfile Menu: GENR

“RW=RW(-1)+WN”

sample 2 250

Workfile Window: Select RW

Workfile Menu: VIEW: • open selection; you will see the spreadsheet view

Series Window: VIEW: • graph

Workfile Menu: SAMPLE: 1 250

Workfile Menu: GENR

“movav15 = @movav(RW,15)

Workfile Window: Select movav15

Workfile Menu: VIEW: • open selection; you will see the spreadsheet view

Look at the spreadsheet view. Note that this moving average starts with observation 15, i.e. it is not a centered moving average. It is the sum of the first fifteen observations divided by fifteen, etc.

It can be advanced by seven to center it.

Workfile Menu: GENR

“movcen = movav15(7)”

Workfile Window: Select movav15 movcen

Workfile Menu: VIEW: • open selection; you will see the spreadsheet view

Workfile Window: Select movcen rw

Workfile Menu: VIEW: • open selection; you will see the spreadsheet view Group Window: VIEW: • graph

NOTE: the smoothing effect of the moving average.

Workfile Menu: SAMPLE: 8 243

Workfile Window: Select movcen

Workfile Menu: VIEW: • open selection; you will see the spreadsheet view Series Window: VIEW: • graph

Series Window: VIEW: • histogram and stats

Series Window: VIEW: • correlogram: level, 36 lags

Series Window: VIEW: • unit root test

NOTE: From the autocorrelation and partial autocorrelation functions, and unit root test, it seems a first difference is appropriate:

Workfile Menu: GENR

“dmovcen=movcen-movcen(-1)”

Workfile Window: Select dmovcen

Workfile Menu: VIEW: • open selection; you will see the spreadsheet view Series Window: VIEW: • graph

Series Window: VIEW: • histogram and stats

Series Window: VIEW: • correlogram: level, 36 lags

Series Window: VIEW: • unit root test

Note: Note that even after first differencing MAV15C, a great deal of structure still exists, although if we first differenced the random walk that we took a 15 point moving average of, there would remain little structure. Thus the structure that technical analysts examine is structure that they created through the moving average process. An autoregressive process of order one looks like a model to begin with:

Object Menu/New/Equation

dmovcen c ar(1)

Equation Object Window Menu: VIEW: • estimation output

Equation Object Window Menu: VIEW: • actual, fitted, residuals: graph

Equation Object Window Menu: VIEW: • residual tests: correlogram, 36 lags

Equation Object Window Menu: VIEW: • residual tests: histogram: normality test

NOTE: An AR(1) only begins to fit the remaining structure.

Object Menu/New/Equation

dmovcen c ar(1) ma(15)

Equation Object Window Menu: VIEW: • estimation output

Equation Object Window Menu: VIEW: • actual, fitted, residuals: graph

Equation Object Window Menu: VIEW: • residual tests: correlogram, 36 lags

Equation Object Window Menu: VIEW: • residual tests: histogram: normality test

NOTE: The Q statistics at high lags still indicate residual structure.

III. The Index of Consumer Sentiment and the S&P 500 Total Return (Dividends Reinvested).

These two time series are available from FRED, http://www.stls.frb.org/fred/. An article from the Los Angeles Times (Oct. 1992) raised the question of whether these two series are correlated, and in particular, whether happy consumers led to a booming stock market. A simple scatter-plot of the two series is ambiguous. The cross correlation of the first difference of the two series suggests how each might, or might not, influence the other. The S&P 500 Total Return, with monthly dividend reinvested, is available from January 1970 through March 2003. The University of Michigan Index of Consumer Sentiment is available monthly from January 1978 through March 2003.

Open Eviews

File Menu/Open: consent( in the Lab Six Folder)

Workfile Window: Sample: 1978:01 2003:03

Quick Menu/Graph

Series Window: sp500 consen

Graph Options: scatter diagram, scatter diagram

Workfile Window: Select sp500 consen

Workfile Menu: VIEW: • open selection

Group Window: VIEW: • line graph

NOTE: sp500 is clearly evolutionary while consen does not appear trended. However, identification of consen and a unit root test indicate it may be a near random walk.

Workfile Window: Select consen

Workfile Menu: VIEW: • open selection; you will see the spreadsheet view Series Window: VIEW: • graph

Series Window: VIEW: • histogram and stats

Series Window: VIEW: • correlogram: level, 36 lags

Series Window: VIEW: • unit root test

Workfile Menu: GENR

dsp500=sp500-sp500(-1)

Workfile Menu: GENR

dcon=consen-consen(-1)

Note: differencing consen leaves it essentially orthogonal, implying that consen was a random walk. The first difference of sp500 has some residual structure left in it.

Quick Menu/Graph

Series Window: dstk500 dcon

Graph Options: scatter diagram , scatter diagram

Graph Window: OPTIONS: regression line

Note: This does not look too promising.

Workfile Window: Select dstk500 dcon

Workfile Menu: VIEW: • open selection; you will see the spreadsheet view

Group Window: VIEW: • graph

Group Window: VIEW: • cross correlation

Note: The change in consumer sentiment appears to be a distributed lag of the change in total returns to stocks at lags 2 and 3.However, the change in the total returns to stock does not depend on the change in consumer sentiment. Thus the causality appears to be one way with a booming market causing happy consumers, not vice versa. Estimation of a distributed lag regression of changes in consumer sentiment on changes in stock returns leaves orthogonal noise:

Object Menu/New/Equation

Dcon c dsp500(-1) dsp500(-2)

Equation Object Window Menu: VIEW: • actual, fitted, residuals: graph

Equation Object Window Menu: VIEW: • residual tests: correlogram, 36 lags

Note: the residuals are orthogonal but not normal.

Object Menu/New/Equation

dsp500 c dcon(-1 to-5)

Equation Object Window Menu: VIEW: • actual, fitted, residuals: graph

Equation Object Window Menu: VIEW: • residual tests: correlogram, 36 lags

Note: An additional test is the Granger causality test, which for the choice of two lags estimates the equations:

(a) dsp500 c dsp500(-1) dsp500(-2)

(b) dsp500 c dsp500(-1) dsp500(-2) dcon(-1) dcon(-2)

and tests whether the lagged change in consumer sentiment adds to the explained variance using an F test: F= {[USS(a) - USS(b)]/2}÷USS(b)/n-k

where n is the number of observations, k is the five parameters estimated in (b), and USS is the unexplained sum of squared residuals from the relevant equation.

Workfile Window: Select dsp500 dcon

Workfile Menu: VIEW: • open selection; you will see the spreadsheet view

Group Window: VIEW: • Granger Causality, 2 lags

NOTE: changes in consumer sentiment do not Granger cause changes in the stock returns, but changes in stock returns appear to Granger cause changes in consumer sentiment.