Download presentation
Presentation is loading. Please wait.
1
1 Econ 240 C Lecture 3
2
2
3
3
4
4
5
5
6
6 1 White noise inputoutput 1/(1 – z) White noise input output Random walkSynthesis 1/(1 – bz) White noise input output First order autoregressive
7
7 Simulated Random walk Eviews, sample 1 1000, gen wn = nrnd EViews, sample 1 1, gen rw = wn Sample 2 1000, gen rw = rw(-1) + wn
8
8
9
9 Simulated First Order Autoregressive Process Eviews, sample 1 1000, gen wn = nrnd EViews, sample 1 1, gen arone = wn Sample 2 1000, gen arone = b*arone(-1) + wn
10
10 Systematics b =1, random walk b = 0.9 b = 0.5 b = 0.1 b = 0, white noise
11
11 Arone(t) = 0.9*arone(t-1) = wn(t)
12
12 Arone(t) = 0.5*arone(t-1) + wn(t)
13
13 Arone(t) = 0.1*arone(t-1) + wn(t)
14
14 Moving Averages
15
15Bloomberg
16
16
17
17
18
18 Time Series Concepts Analysis and Synthesis
19
19 Analysis Model a real time seies in terms of its components
20
20 Total Returns to Standard and Poors 500, Monthly, 1970-2003 Source: FRED http://research.stlouisfed.org/fred/
21
21 Trace of ln S&P 500(t) TIME LNSP500 Logarithm of Total Returns to Standard & Poors 500
22
22 Model Ln S&P500(t) = a + b*t + e(t) time series = linear trend + error
23
23 Dependent Variable: LNSP500 Method: Least Squares Sample(adjusted): 1970:01 2003:02 Included observations: 398 after adjusting endpoints VariableCoefficientStd. Errort-StatisticProb. C4.0498370.022383180.93700.0000 TIME0.0108679.76E-05111.35800.0000 R-squared0.969054 Mean dependent var6.207030 Adjusted R-squared0.968976 S.D. dependent var1.269965 S.E. of regression 0.223686 Akaike info criterion-0.152131 Sum squared resid19.81410 Schwarz criterion-0.132098 Log likelihood32.27404 F-statistic12400.61 Durbin-Watson stat0.041769 Prob(F-statistic)0.000000
26
26 Time Series Components Model Time series = trend + cycle + seasonal + error two components, trend and seasonal, are time dependent and are called non- stationary
27
27 Synthesis The Box-Jenkins approach is to start with the simplest building block to a time series, white noise and build from there, or synthesize. Non-stationary components such as trend and seasonal are removed by differencing
28
28 First Difference Lnsp500(t) - lnsp500(t-1) = dlnsp500(t)
31
31
32
32
33
33
34
34 Time series A sequence of values indexed by time
35
35 Stationary time series A sequence of values indexed by time where, for example, the first half of the time series is indistinguishable from the last half
36
36 Stochastic Stationary Time Series A sequence of random values, indexed by time, where the time series is not time dependent
37
37 Summary of Concepts Analysis and Synthesis Stationary and Evolutionary Deterministic and Stochastic Time Series Components Model
38
38 White Noise Synthesis Eviews: New Workfile –undated 1 1000 Genr wn = nrnd 1000 observations N(0,1) Index them by time in the order they were drawn from the random number generator
42
42 Synthesis Random Walk RW(t) -RW(t-1) = WN(t) = dRW(t) or RW(t) = RW (t-1) + WN(t) lag by one: RW(t-1) = RW(t-2) + WN(t-1) substitute: RW(t) = RW(t-2) + WN(t) + WN(t-1) continue with lagging and substituting RW(t) = WN(t) + WN (t-1) + WN (t-2) +...
43
43 Part I Modeling Economic Time Series
44
44 Total Returns to Standard and Poors 500, Monthly, 1970-2003 Source: FRED http://research.stlouisfed.org/fred/
45
45 Analysis (Decomposition) Lesson one: plot the time series
46
46 Model One: Random Walks we can characterize 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)
47
47 Trace of ln S&P 500(t) TIME LNSP500 Logarithm of Total Returns to Standard & Poors 500
48
48 Analysis(Decomposition) Lesson one: Plot the time series Lesson two: Use logarithmic transformation to linearize
49
49 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
50
50 Model 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.
51
51 Model One: Random Walks The random walk model as an approximation to economic time series –Stock Indices –Commodity Prices –Exchange Rates
52
52 Model Two: White Noise we saw that the difference in a random walk was white noise.
53
53 Model 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.
54
54 Trace of ln S&P 500(t) – ln S&P(t-1)
55
55 Histogram of ln S&P 500(t) – ln S&P(t-1)
56
56 The First Difference of ln S&P 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.
57
57 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
58
58 Model Two: White Noise Kurtosis or fat tails tend to characterize financial time series
59
59 The Lag Operator, Z Z x(t) = x(t-1) Z n 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)
60
60 Model Three: Autoregressive Time Series of Order 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/
61
61 Trace of Inventory to Sales, Total Business
62
62 Analogy 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)
63
63 Model Three: Autoregressive of First 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?
64
64 Using Simulation to Explore Time Series Behavior Simulating White Noise: EVIEWS: new workfile, irregular, 1000 observations, GENR WN = NRND
65
65 Trace of Simulated White Noise: 100 Observations
66
66 Histogram of Simulated White Noise
67
67 Simulated ARONE Process SMPL 1 1, GENR ARONE = WN SMPL 2 1000 GENR ARONE =1.1* ARONE(-1) + WN Smpl 1 1000
68
68 Simulated Unstable First Order Autoregressive Process
69
69 First 10 Observations of ARONE obsWNARONE 1-1.204627-1.204627 2-1.728779-3.053869 3 1.478125-1.881131 4-0.325830-2.395073 5-0.593882-3.228463 6 0.787438-2.763872 7 0.157040-2.883219 8-0.211357-3.382898 9-0.722152-4.443340 10 0.775963-4.111711
70
70 Model 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
71
71 Simulated Autoregressive, b=-1.1
72
72 Model Three: Conclusion For Stability ( stationarity) -1<b<1
73
73 Part II Forecasting: A preview of coming attractions
74
74 Ratio 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)
75
75 Ratio 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 Ratioinvsale at time t is our expected value of Ratioinvsale at time t
76
76 One Period Ahead Forecast E t-1 [Ratioinvsale(t)] is: E t-1 [Ratioinvsale(t) - c] = E t-1 [Ratioinvsale(t)] - c = Forecast - c = b*E t-1 [Ratioinvsale(t-1) - c] + E t-1 [WN(t)] Forecast = c + b*Ratioinvsale(t-1) -b*c + 0
77
77 Dependent Variable: RATIOINVSALE Method: Least Squares Date: 04/08/03 Time: 13:56 Sample(adjusted): 1992:02 2003:01 Included observations: 132 after adjusting endpoints Convergence achieved after 3 iterations VariableCoefficientStd. Errort-StatisticProb. C1.4172930.03043146.574050.0000 AR(1)0.9545170.02401739.742760.0000 R-squared0.923954 Mean dependent var1.449091 Adjusted R-squared0.923369 S.D. dependent var0.046879 S.E. of regression0.012977 Akaike info criterion-5.836210 Sum squared resid0.021893 Schwarz criterion-5.792531 Log likelihood387.1898 F-statistic1579.487 Durbin-Watson stat2.674982 Prob(F-statistic)0.000000 Inverted AR Roots.95
78
78 How Good is This Estimated Model?
79
79 Plot of the Estimated Residuals
80
80 Forecast for Ratio of Inventory to Sales for February 2003 E 2003: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
81
81 How Well Do We Know This 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
82
82 Trace of Inventory to Sales, Total Business
83
83 Lessons About ARIMA Forecasting 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, E t-1 [y(t)] = mean of y(t) –next period is the same as this period for a stationary time series and for random walks, E t-1 [y(t)] = y(t-1) –extrapolate trend for an evolutionary trended time series, E t-1 [y(t)] = a + b*t = y(t-1) + b
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.