1 Econ 240 C Lecture 3
2
3
4
5
6 Time Series Concepts Analysis and Synthesis
7 Analysis Model a real time seies in terms of its components
8 Total Returns to Standard and Poors 500, Monthly, Source: FRED
9 Trace of ln S&P 500(t) TIME LNSP500 Logarithm of Total Returns to Standard & Poors 500
10 Model Ln S&P500(t) = a + b*t + e(t) time series = linear trend + error
11 Dependent Variable: LNSP500 Method: Least Squares Sample(adjusted): 1970: :02 Included observations: 398 after adjusting endpoints VariableCoefficientStd. Errort-StatisticProb. C TIME E R-squared Mean dependent var Adjusted R-squared S.D. dependent var S.E. of regression Akaike info criterion Sum squared resid Schwarz criterion Log likelihood F-statistic Durbin-Watson stat Prob(F-statistic)
14 Time Series Components Model Time series = trend + cycle + seasonal + error two components, trend and seasonal, are time dependent and are called non- stationary
15 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
16 First Difference Lnsp500(t) - lnsp500(t-1) = dlnsp500(t)
19
20
21
22 Time series A sequence of values indexed by time
23 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
24 Stochastic Stationary Time Series A sequence of random values, indexed by time, where the time series is not time dependent
25 Summary of Concepts Analysis and Synthesis Stationary and Evolutionary Deterministic and Stochastic Time Series Components Model
26 White Noise Synthesis Eviews: New Workfile –undated Genr wn = nrnd 1000 observations N(0,1) Index them by time in the order they were drawn from the random number generator
30 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) +...
31 Part I Modeling Economic Time Series
32 Total Returns to Standard and Poors 500, Monthly, Source: FRED
33 Analysis (Decomposition) Lesson one: plot the time series
34 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)
35 Trace of ln S&P 500(t) TIME LNSP500 Logarithm of Total Returns to Standard & Poors 500
36 Analysis(Decomposition) Lesson one: Plot the time series Lesson two: Use logarithmic transformation to linearize
37 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
38 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.
39 Model One: Random Walks The random walk model as an approximation to economic time series –Stock Indices –Commodity Prices –Exchange Rates
40 Model Two: White Noise we saw that the difference in a random walk was white noise.
41 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.
42 Trace of ln S&P 500(t) – ln S&P(t-1)
43 Histogram of ln S&P 500(t) – ln S&P(t-1)
44 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.
45 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
46 Model Two: White Noise Kurtosis or fat tails tend to characterize financial time series
47 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)
48 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
49 Trace of Inventory to Sales, Total Business
50 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)
51 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?
52 Using Simulation to Explore Time Series Behavior Simulating White Noise: EVIEWS: new workfile, irregular, 1000 observations, GENR WN = NRND
53 Trace of Simulated White Noise: 100 Observations
54 Histogram of Simulated White Noise
55 Simulated ARONE Process SMPL 1 1, GENR ARONE = WN SMPL GENR ARONE =1.1* ARONE(-1) + WN Smpl
56 Simulated Unstable First Order Autoregressive Process
57 First 10 Observations of ARONE obsWNARONE
58 Model Three: Autoregressive What if b= -1.1? ARONE*(t) = -1.1*ARONE*(t-1) + WN(t) SMPL 1 1, GENR ARONE* = WN SMPL GENR ARONE* = -1.1*ARONE*(-1) + WN SMPL
59 Simulated Autoregressive, b=-1.1
60 Model Three: Conclusion For Stability ( stationarity) -1<b<1
61 Part II Forecasting: A preview of coming attractions
62 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)
63 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
64 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
65 Dependent Variable: RATIOINVSALE Method: Least Squares Date: 04/08/03 Time: 13:56 Sample(adjusted): 1992: :01 Included observations: 132 after adjusting endpoints Convergence achieved after 3 iterations VariableCoefficientStd. Errort-StatisticProb. C AR(1) R-squared Mean dependent var Adjusted R-squared S.D. dependent var S.E. of regression Akaike info criterion Sum squared resid Schwarz criterion Log likelihood F-statistic Durbin-Watson stat Prob(F-statistic) Inverted AR Roots.95
66 How Good is This Estimated Model?
67 Plot of the Estimated Residuals
68 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.360 Forecast = Forecast =
69 How Well Do We Know This Value of the Forecast? Standard error of the regression = Approximate 95% confidence interval for the one period ahead forecast = forecast +/- 2*SER Ratioinvsale(2003:02) = /- 2*.0130 interval for the forecast 1.34<forecast<1.39
70 Trace of Inventory to Sales, Total Business
71 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