Econ 240 C Lecture 4
Outline Part I: Time Averages Part II: Autocovariance Function Part III: Random Walk Part IV: Deciding Between a Random Walk Or an ARONE?
Practicum: Lab Two Natural Logarithm of the Rotterdam Import Price for Dark Northern Spring Wheat Trace Histogram Autocorrelation function
Practicum: Lab Two First difference of Natural Logarithm of the Rotterdam Import price for Dark Northern Spring Wheat Trace Histogram Autocorrelation function
Part I Stationarity and Time Averages
Many Observations of White Noise Using simulation, we can create many different white noise time series of arbitrary length, say 1000 Using these time series we could average them at each point in time to obtain an average of the group or ensemble at that time, creating the mean function, m(t) = E wn(t).
Time Averages In economics, as a practical matter, we usually only have one observation of a time series In this case it is necessary to be able to average over time If the time series is stationary, then averaging over time makes sense
Five Simulated White Noise Time Series WN WN2 WN3 WN4 WN5 1.617983 0.837389 0.263717 1.498148 -0.017667 -0.981121 -0.037318 0.118295 0.073137 -0.468611 -0.644877 -0.177607 0.235936 0.504890 1.184326 1.548977 -0.372428 -0.483331 -0.285102 -0.569788 -0.800501 0.259279 0.020538 -0.674818 0.042432 0.111573 -0.442504 0.942710 0.625115 -1.546601 0.579694 0.371160 0.405358 -1.996286 -0.947028 -0.205539 -0.110242 -0.388757 0.615279 0.589821 -0.209470 -0.197190 0.178364 0.828461 -0.792716 0.034237 0.199730 0.339069 0.430797 0.912555
Trace of Five Simulated White Noise Time Series
Ensemble Average
Appeal to Central Limit Theorem If I had generated 100 or 1000 simulated white noise time series, then the ensemble average would come close to zero for every time period. Mean Function, m(t) =E X(t)
Ensemble Average
Ensemble Averages Are a Luxury Good in Economics Need to consider time average Think of the time average for the first white noise time series
Time Average
Trace of Time Average
Mean Function For a Time Average m = E WN(t) = c = 0
Time Average Will Not Work Well for an Evolutionary Time Series
Mean Function For An Evolutionary Time Series M(t) = E x(t) is not independent of time
Part II Autocovariance Function E{ [x(t) - Ex(t)][x(t-u) - Ex(t)]} = = gx,x(t,u) If a time series is covariance stationary, then gx,x(t,u) = gx,x(u) i.e. depends only on lag. Only relative time not absolute time counts.
Autocovariance of White Noise At Lag Zero Autocovariance Function E{ [wn(t) - Ewn(t)][wn(t-0) - Ewn(t)]} E{ [wn(t) - m(t)][wn(t) - m(t)]} E{ [wn(t) - 0][wn(t) - 0]} E{wn(t)*wn(t)}
Autocovariance of White Noise At Lag Zero
Variance For Entire Series
Autocovariance of White Noise at Lag 1 = ? Autocovariance Function E{ wn(t)*wn(t-1) } = gx,x(u=1) = ?
Average Cross Product For WN Series for 999
Autocovariance of White Noise at Lag 1 = ? gx,x(u=1) = 0 Since white noise is independent as well as identically distributed
Autocovariance of White Noise at Lag 2 = ? gx,x(u=2) = 0 Since white noise is independent as well as identically distributed
Theoretical Autocovariance, WN
Autocovariance, WN Theoretical Vs. Simulated
Autocorrelation Function The Autocorrelation function is just a standardized autocovariance function, i.e. just the autocovariance function divided by the variance rx,x (u) = gx,x(u) / gx,x(0)
Simulated Autocorrelation Function, WN WN Simulated Sample: 1 1000 Included observations: 1000 Autocorrelation Partial Correlation AC PAC Q-Stat Prob .| | .| | 1 -0.004 -0.004 0.0163 0.899 .| | .| | 2 0.042 0.042 1.7669 0.413 *| | *| | 3 -0.059 -0.058 5.2307 0.156 .| | .| | 4 0.007 0.005 5.2772 0.260 .| | .| | 5 0.012 0.017 5.4252 0.366 .| | .| | 6 0.051 0.047 8.0109 0.237 .| | .| | 7 0.018 0.018 8.3524 0.303 .| | .| | 8 0.021 0.019 8.8068 0.359 .| | .| | 9 -0.038 -0.035 10.300 0.327 .| | .| | 10 0.039 0.039 11.812 0.298
Part III Random Walk as an evolutionary process RW(t) = RW(t-1) + WN(t) lag by one RW(t-1) = RW(t-2) +WN(t-1) Substitute for RW(t-1) RW(t) = RW(t-2) + WN(t) + WN(t-1)
Random Walk Lag again to obtain RW(t-2) = RW(t-3) + WN(t-2) and Substitute for RW(t-2) RW(t) = RW(t-3) + WN(t) + WN(t-1) + WN(t-2) etc. so RW(t) = current shock plus all past shocks with past shocks weighted equally to the current shock so a random walk has infinite memory
Random Walk RW(t) -RW(t-1) = WN(t) Z0 RW(t) - Z RW(t) = WN(t) RW(t) = 1/[1-Z] * WN(t) RW(t) = [1 + Z + Z2 + …] WN(t) RW(t) = WN(t) + Z WN(t) + Z2 WN(t) + .. RW(t) = WN(t) + WN(t-1) + WN(t-2) + ...
Random Walk, Synthesis from White Noise RW(t) 1/[1-Z] WN(t) RW(t) 1 + Z + Z2 + ... WN(t)
Autocovariance of RW in Theory gRW,RW(u) = E{RW(t) - ERW(t)][RW(t-u)- ERW(t) ERW(t) = E[WN(t) + WN(t-1) +…] = 0 gRW,RW(u=0) = E[RW(t)*RW(t)] gRW,RW(0) = E[WN(t) + WN(t-1) + WN(t-2) + ..]* [WN(t) + WN(t-1) + WN(t-2) + ..] gRW,RW(0) = [s2 + s2 + s2 + ….] =
Autocovariance of RW in Practice, Length 100 gRW,RW(u=1) = E[RW(t)*RW(t-1)] gRW,RW(1) = E[WN(t) + WN(t-1) + WN(t-2) + ..]* [WN(t-1) + WN(t-2) + WN(t-3) + ..] gRW,RW(1) = [s2 + s2 + s2 + ….] = 99 s2 rRW,,RW (1) = gRW,,RW(1) / gRW,,RW(0) rRW,,RW (1) = 99/100
Simulated Autocorrelation, RW Simulated Random Walk Sample: 1 100 Included observations: 100 Autocorrelation Partial Correlation AC PAC Q-Stat Prob . |*******| . |*******| 1 0.940 0.940 91.068 0.000 . |*******| . | . | 2 0.883 -0.005 172.28 0.000 . |****** | . | . | 3 0.823 -0.055 243.59 0.000 . |****** | .*| . | 4 0.757 -0.093 304.44 0.000 . |***** | .*| . | 5 0.677 -0.154 353.66 0.000 . |***** | . | . | 6 0.609 0.052 393.94 0.000 . |**** | . | . | 7 0.543 -0.010 426.34 0.000 . |**** | .*| . | 8 0.475 -0.061 451.31 0.000 . |*** | . | . | 9 0.412 0.012 470.37 0.000 . |*** | . | . | 10 0.353 -0.038 484.52 0.000
Part IV: Random Walk Vs. ARONE X(t) = b*x(t-1) + wn How close to 1 is b?
Exchange Rate $/Euro
Exchange Rate $/Euro
Exchange Rate, $ Per Euro Sample: 1999:01 2003:03 Included observations: 51 Autocorrelation Partial Correlation AC PAC Q-Stat Prob . |*******| . |*******| 1 0.879 0.879 41.738 0.000 . |****** | .*| . | 2 0.750 -0.098 72.753 0.000 . |***** | . | . | 3 0.639 0.007 95.750 0.000 . |**** | . |*. | 4 0.560 0.067 113.78 0.000 . |**** | . | . | 5 0.504 0.046 128.71 0.000 . |**** | . | . | 6 0.467 0.055 141.83 0.000 . |*** | .*| . | 7 0.418 -0.068 152.54 0.000 . |*** | .*| . | 8 0.338 -0.137 159.71 0.000 . |** | .*| . | 9 0.236 -0.127 163.29 0.000 . |*. | .*| . | 10 0.116 -0.168 164.18 0.000 . | . | . | . | 11 0.021 -0.016 164.21 0.000 . | . | . | . | 12 -0.050 -0.036 164.38 0.000 .*| . | . | . | 13 -0.106 -0.052 165.18 0.000 .*| . | . | . | 14 -0.134 0.064 166.49 0.000 .*| . | . | . | 15 -0.163 -0.023 168.49 0.000 **| . | . | . | 16 -0.192 0.023 171.33 0.000 **| . | . |*. | 17 -0.204 0.094 174.64 0.000 **| . | **| . | 18 -0.269 -0.274 180.57 0.000 ***| . | .*| . | 19 -0.346 -0.122 190.70 0.000 ***| . | . | . | 20 -0.398 -0.029 204.50 0.000 ***| . | . |*. | 21 -0.397 0.079 218.67 0.000 ***| . | . |*. | 22 -0.362 0.086 230.87 0.000 ***| . | . | . | 23 -0.322 -0.037 240.89 0.000 **| . | .*| . | 24 -0.318 -0.133 250.99 0.000
Hong Kong $ Per US $
Hong Kong $ Per US $ Hong Kong $ Per US $ Sample: 1981:01 2003:03 Included observations: 267 Autocorrelation Partial Correlation AC PAC Q-Stat Prob .|*******| .|*******| 1 0.961 0.961 249.52 0.000 .|*******| .|. | 2 0.921 -0.034 479.67 0.000 .|*******| .|. | 3 0.883 -0.008 691.62 0.000 .|*******| .|. | 4 0.844 -0.012 886.38 0.000 .|****** | .|. | 5 0.806 -0.025 1064.5 0.000 .|****** | .|. | 6 0.769 -0.002 1227.2 0.000 .|****** | .|. | 7 0.736 0.028 1376.7 0.000 .|***** | .|. | 8 0.707 0.042 1515.4 0.000 .|***** | .|. | 9 0.679 -0.009 1643.8 0.000 .|***** | .|. | 10 0.651 -0.019 1762.2 0.000 .|***** | *|. | 11 0.612 -0.158 1867.2 0.000 .|**** | *|. | 12 0.570 -0.065 1958.6 0.000
Correlogram of Ratio of inventory To sales
Autocorrelation of Residuals from an ARONE model of Ratio of Inventory To Sales
First Difference of Ratio Dratinvsale=ratinvsale-ratinvsale(-1)
Correlogram of dratinvsale
Correlogram of Residuals from ARONE model of First difference of The ratio of Inventory to sales
First order autoregressive Arone(t) = b*Arone(t-1) + wn(t) Root of the deterministic diference equation: arone(t) –b*arone(t-1) = 0 Let x1-u = arone(t-u) x – bx0 = 0, x =b =root
Is b = 1? Regression: arone(t) = b* arone(t-1) + wn (t) , H0 : b=1 Equivalently, subtract arone(t-1) from both sides (1-z)arone(t) = (b-1)*arone(t-1) + wn(t), H0 : (b-1) = 0, i.e. b=1
The fly in the ointment As b approaches 1, the estimated parameter no longer has Student’s t-distribution Dickey and Fuller use simulation to derive the appropriate distribution
Ratio of inventory to Sales example of the Dickey-Fuller test