1 econ 240 c lecture 3. 2 part i modeling economic time series
Post on 19-Dec-2015
216 views
TRANSCRIPT
11
Econ 240 CEcon 240 C
Lecture 3Lecture 3
22
Part IPart I
• Modeling Economic Time Series
33
Total Returns to Standard and Total Returns to Standard and Poors 500, Monthly, 1970-2003Poors 500, Monthly, 1970-2003
0
1000
2000
3000
4000
5000
70 75 80 85 90 95 00
SPRETURN
Total Returns for the Standard and Poors 500
Source: FRED http://research.stlouisfed.org/fred/
44
Analysis (Decomposition)Analysis (Decomposition)
• Lesson one: plot the time series
55
Model One: Random WalksModel One: Random Walks
• Last time we characterized the logarithm of total returns to the Standard and Poors 500 as trend plus a random walk.
• Ln S&P 500(t) = trend + random walk = a + b*t + RW(t)
66
Trace of ln S&P 500(t) Trace of ln S&P 500(t)
4
5
6
7
8
9
0 100 200 300 400 500
TIME
LNS
P50
0
Logarithm of Total Returns to Standard & Poors 500
77
Analysis(Decomposition)Analysis(Decomposition)
• Lesson one: Plot the time series
• Lesson two: Use logarithmic transformation to linearize
88
Ln S&P 500(t) = trend + RW(t)Ln S&P 500(t) = trend + RW(t)
• Trend is an evolutionary process, i.e. depends on time explicitly, a + b*t, rather than being a stationary process, i. e. independent of time
• A random walk is also an evolutionary process, as we will see, and hence is not stationary
99
Model One: Random WalksModel One: Random Walks
• This model of the Standard and Poors 500 is an approximation. As we will see, a random walk could wander off, upward or downward, without limit.
• Certainly we do not expect the Standard and Poors to move to zero or into negative territory. So its lower bound is zero, and its model is an approximation.
1010
Model One: Random WalksModel One: Random Walks
• The random walk model as an approximation to economic time series– Stock Indices– Commodity Prices– Exchange Rates
1111
Model Two: White NoiseModel Two: White Noise
• Last time we saw that the difference in a random walk was white noise.
)()( tWNtRW
1212
Model Two: White NoiseModel Two: White Noise
• How good an approximation is the white noise model?
• Take first difference of ln S&P 500(t) and plot it and look at its histogram.
1313
Trace of ln S&P 500(t) – ln S&P(t-1)Trace of ln S&P 500(t) – ln S&P(t-1)
-0.3
-0.2
-0.1
0.0
0.1
0.2
70 75 80 85 90 95 00
DLNSP500
Trace of lnsp500 - lnsp500(-1)
1414
Histogram of Histogram of ln S&P 500(t) – ln S&P(t-1)ln S&P 500(t) – ln S&P(t-1)
0
20
40
60
80
100
-0.2 -0.1 0.0 0.1
Series: DLNSP500Sample 1970:02 2003:02Observations 397
Mean 0.008625Median 0.011000Maximum 0.155371Minimum -0.242533Std. Dev. 0.045661Skewness -0.614602Kurtosis 5.494033
Jarque-Bera 127.8860Probability 0.000000
1515
The First Difference of ln S&P The First Difference of ln S&P 500(t)500(t)
ln S&P 500(t)=ln S&P 500(t) - ln S&P 500(t-1) ln S&P 500(t) = a + b*t + RW(t) -
{a + b*(t-1) + RW(t-1)} ln S&P 500(t) = b + RW(t) = b + WN(t)
• Note that differencing ln S&P 500(t) where both components, trend and the random walk were evolutionary, results in two components, a constant and white noise, that are stationary.
1616
Analysis(Decomposition)Analysis(Decomposition)
• Lesson one: Plot the time series
• Lesson two: Use logarithmic transformation to linearize
• Lesson three: Use difference transformation to reduce an evolutionary process to a stationary process
1717
Model Two: White NoiseModel Two: White Noise
• Kurtosis or fat tails tend to characterize financial time series
1818
The Lag Operator, ZThe Lag Operator, Z
• Z x(t) = x(t-1)• Zn x(t) = x(t-n)• RW(t) – RW(t-1) = (1 – Z) RW(t) = RW(t) = WN(t)• So the difference operator, can be written in
terms of the lag operator, = (1 – Z)
1919
Model Three: Model Three: Autoregressive Time Series of Autoregressive Time Series of
Order OneOrder One• An analogy to our model of trend plus
shock for the logarithm of the Standard Poors is inertia plus shock for an economic time series such as the ratio of inventory to sales for total business
• Source: FRED http://research.stlouisfed.org/fred/
2020
Trace of Inventory to Sales, Trace of Inventory to Sales, Total Business Total Business
1.30
1.35
1.40
1.45
1.50
1.55
1.60
92 93 94 95 96 97 98 99 00 01 02 03
RATIOINVSALE
Ratio of Inventory to Sales, Monthly, 1992:01-2003:01
2121
AnalogyAnalogy
• Trend plus random walk:
• Ln S&P 500(t) = a + b*t + RW(t)
• where RW(t) = RW(t-1) + WN(t)
• inertia plus shock
• Ratioinvsale(t) = b*Ratioinvsale(t-1) + WN(t)
2222
Model Three: Autoregressive of Model Three: Autoregressive of First OrderFirst Order
• Note: RW(t) = 1*RW(t-1) + WN(t)
• where the coefficient b = 1
• Contrast ARONE(t) = b*ARONE(t-1) + WN(t)
• What would happen if b were greater than one?
2323
Using Simulation to Explore Using Simulation to Explore Time Series BehaviorTime Series Behavior
• Simulating White Noise:
• EVIEWS: new workfile, irregular, 1000 observations, GENR WN = NRND
2424
Trace of Simulated White Noise:Trace of Simulated White Noise:100 Observations100 Observations
-3
-2
-1
0
1
2
3
10 20 30 40 50 60 70 80 90 100
WN
Simulated White Noise
2525
Histogram of Simulated White Histogram of Simulated White NoiseNoise
0
20
40
60
80
100
120
-3 -2 -1 0 1 2 3 4
Series: WNSample 1 1000Observations 1000
Mean 0.008260Median -0.003042Maximum 3.782479Minimum -3.267831Std. Dev. 1.005635Skewness -0.047213Kurtosis 3.020531
Jarque-Bera 0.389072Probability 0.823216
2626
Simulated ARONE ProcessSimulated ARONE Process
• SMPL 1 1, GENR ARONE = WN
• SMPL 2 1000
• GENR ARONE =1.1* ARONE(-1) + WN
• Smpl 1 1000
2727
Simulated Unstable First Order Simulated Unstable First Order Autoregressive Process Autoregressive Process
-20000
-15000
-10000
-5000
0
10 20 30 40 50 60 70 80 90 100
ARONE
First 100 Observations of ARONE = 1.1*Arone(-1) + WN
2828
First 10 Observations of ARONEFirst 10 Observations of ARONE
obs WN ARONE
1 -1.204627 -1.2046272 -1.728779 -3.0538693 1.478125 -1.8811314 -0.325830 -2.3950735 -0.593882 -3.2284636 0.787438 -2.7638727 0.157040 -2.8832198 -0.211357 -3.3828989 -0.722152 -4.44334010 0.775963 -4.111711
2929
Model Three: AutoregressiveModel Three: Autoregressive
• What if b= -1.1?
• ARONE*(t) = -1.1*ARONE*(t-1) + WN(t)
• SMPL 1 1, GENR ARONE* = WN
• SMPL 2 1000
• GENR ARONE* = -1.1*ARONE*(-1) + WN
• SMPL 1 1000
3030
Simulated Autoregressive, b=-1.1Simulated Autoregressive, b=-1.1
-400
-200
0
200
400
5 10 15 20 25 30 35 40 45 50 55 60
ARONESTAR
Simulated First Order Autoregressive Process, b = -1.1
3131
Model Three: ConclusionModel Three: Conclusion
• For Stability ( stationarity) -1<b<1
3232
Part IIPart II
• Forecasting: A preview of coming attractions
3333
Ratio of Inventory to SalesRatio of Inventory to Sales
• EVIEWS Model: Ratioinvsale(t) = c + AR(1)
• Ratioinvsale is a constant plus an autoregressive process of the first order
• AR(t) = b*AR(t-1) + WN(t)
• Note: Ratioinvsale(t) - c = AR(t), so
• Ratioinvsale(t) - c = b*{ Ratioinvsale(t-1) - c} + WN (t)
3434
Ratio of Inventory to SalesRatio of Inventory to Sales
• Use EVIEWS to estimate coefficients c and b.
• Forecast of Ratioinvsale at time t is based on knowledge at time t-1 and earlier (information base)
• Forecast at time t-1 of Ratioinsale at time t is our expected value of Ratioinvsale at time t
3535
One Period Ahead ForecastOne Period Ahead Forecast
• Et-1[Ratioinvsale(t)] is:
• Et-1[Ratioinvsale(t) - c] =
• Et-1[Ratioinvsale(t)] - c =
• Forecast - c = b*Et-1[Ratioinvsale(t-1) - c] + Et-1[WN(t)]
• Forecast = c + b*Ratioinvsale(t-1) -b*c + 0
3636
Dependent Variable: RATIOINVSALEMethod: Least SquaresDate: 04/08/03 Time: 13:56Sample(adjusted): 1992:02 2003:01Included observations: 132 after adjusting endpoints
Convergence achieved after 3 iterations
Variable Coefficient Std. Error t-Statistic Prob.
C 1.417293 0.030431 46.57405 0.0000AR(1) 0.954517 0.024017 39.74276 0.0000
R-squared 0.923954 Mean dependent var 1.449091
Adjusted R-squared 0.923369 S.D. dependent var 0.046879
S.E. of regression 0.012977 Akaike info criterion -5.836210
Sum squared resid 0.021893 Schwarz criterion -5.792531
Log likelihood 387.1898 F-statistic 1579.487
Durbin-Watson stat 2.674982 Prob(F-statistic) 0.000000
Inverted AR Roots .95
3737
How Good is This Estimated How Good is This Estimated Model?Model?
-0.06
-0.04
-0.02
0.00
0.02
0.04
0.06
1.30
1.35
1.40
1.45
1.50
1.55
1.60
93 94 95 96 97 98 99 00 01 02 03
Residual Actual Fitted
3838
Plot of the Estimated ResidualsPlot of the Estimated Residuals
0
5
10
15
20
25
-0.050 -0.025 0.000 0.025
Series: ResidualsSample 1992:02 2003:01Observations 132
Mean -2.74E-13Median 0.000351Maximum 0.042397Minimum -0.048512Std. Dev. 0.012928Skewness 0.009594Kurtosis 4.435641
Jarque-Bera 11.33788Probability 0.003452
3939
Forecast for Ratio of Inventory Forecast for Ratio of Inventory to Sales for February 2003to Sales for February 2003
• E2003:01 [Ratioinvsale(2003:02)= c - b*c + b*Ratioinvsale(2003:02)
• Forecast = 1.417 - 0.954*1.417 + 0.954*1.360
• Forecast = 0.06514 + 1.29744
• Forecast = 1.36528
4040
How Well Do We Know This How Well Do We Know This Value of the Forecast?Value of the Forecast?
• Standard error of the regression = 0.0130
• Approximate 95% confidence interval for the one period ahead forecast = forecast +/- 2*SER
• Ratioinvsale(2003:02) = 1.36528 +/- 2*.0130
• interval for the forecast 1.34<forecast<1.39
4141
Trace of Inventory to Sales, Trace of Inventory to Sales, Total Business Total Business
1.30
1.35
1.40
1.45
1.50
1.55
1.60
92 93 94 95 96 97 98 99 00 01 02 03
RATIOINVSALE
Ratio of Inventory to Sales, Monthly, 1992:01-2003:01
4242
Lessons About ARIMA Lessons About ARIMA Forecasting ModelsForecasting Models
• Use the past to forecast the future
• “sophisticated” extrapolation models
• competitive extrapolation models– use the mean as a forecast for a stationary time
series, Et-1[y(t)] = mean of y(t)
– next period is the same as this period for a stationary time series and for random walks, Et-1[y(t)] = y(t-1)
– extrapolate trend for an evolutionary trended time series, Et-1[y(t)] = a + b*t = y(t-1) + b