Presentation is loading. Please wait.

Presentation is loading. Please wait.

Seasonal Unit Root Tests in Long Periodicity Cases D. A. Dickey Ying Zhang.

Similar presentations


Presentation on theme: "Seasonal Unit Root Tests in Long Periodicity Cases D. A. Dickey Ying Zhang."— Presentation transcript:

1

2 Seasonal Unit Root Tests in Long Periodicity Cases D. A. Dickey Ying Zhang

3 Natural gas-a colorless, odorless, gaseous hydrocarbon-may be stored in a number of different ways. It is most commonly held in inventory underground under pressure in three types of facilities. These are: (1) depleted reservoirs in oil and/or gas fields, (2) aquifers, and (3) salt cavern formations. (Natural gas is also stored in liquid form in above-ground tanks).

4

5 1. Regression with Time Series Errors Y(t) = a + bt + seasonal effects + Z(t), Z(t) a stationary time series Seasonal effects: Sinusoids, Seasonal dummy variables 2. Dynamic Seasonal Models Y(t) = Y(t-d) + e(t) copy of last season Y(t) = Y(t-d) + e(t) –  e(t-d) EWMA of past seasons Y(t) = Y(t-1) + [Y(t-d)-Y(t-d-1)] + Z(t) Z(t) = e(t) PROC CUT&PASTE; Z(t) = e(t) –  e(t-1) –  e(t-d) +  e(t-d-1) “airline” Z(t) = (1-  B)(1-  B d ) e(t)

6 Y(t) = Y(t-1) + [Y(t-d)-Y(t-d-1)] + e(t)

7 Y(t) = 10 + t + 8X 3 – 8X 5 -5X 8 – 5X 9 – 5X 10 +e(t)

8 Summary: 1.Both models can give same predictions for pure trend + seasonal functions. 2.For data, lag model looks back 1 year and ignores (or discounts) others. Good for slowly changing seasonality. 3.For data, dummy variable model weights all years equally. Good for very regular seasonality. 4. Differences in forecast errors too!

9 Weekly natural gas data – unit root forecast

10 Weekly natural gas data – seasonal dummy variable forecast

11 A general seasonal model: Y t –f(t) =  Y t-d –f(t-d)) + e t f(t) = deterministic components H 0 :  Under H 0, period d functions annihilated. f periodic  Y t –Y t-d = (  Y t-d –f(t-d)) + e t  =1  Y t –Y t-d = e t

12 Y 1 =e 1 (Y 1,1 ) Y 2 =e 2 (Y 1,2 ) Y 3 =e 3 (Y 1,3 ) Y 4 =e 4 (Y 1,4 ) Y 5 =e 5 +  e 1 (Y 2,1 ) Y 6 =e 6 +  e 2 (Y 2,2 ) Y 7 =e 7 +  e 3 (Y 2,3 ) Y 8 =e 8 +  e 4 (Y 2,4 ) Use double subscripts: Quarterly (d=4) example, m years, f(t)=0

13 Numerator is Denominator is Known unit root facts (  2 =1): (1) Moments (d=1 case or individual terms) E{N s } = 0, E{D s } = (m-1)/(2m)  1/2 Var{N s } = (m-1)/(2m)  1/2 Var{D s } = (m-1)(m 2 -m+1)/(3m 3 )  1/3 Cov{N s, D s } = (m-1)(m-2)/(3m 2 )  1/3 (2) Studentized statistic asymptotically equivalent to (numerator sum) / (denominator sum) 1/2

14 Basic idea is simple: Large d  numerator approximately normal Large d  denominator converges to E{denominator}

15 Nice proof Grandpa! As you see, I’m very excited.

16

17

18

19 d=4  and N(0,1) CDFs (SAS)

20 d=4 md 1/2 (  -1) and N(0,2) CDFs

21 Improving the Normal Approximation: JASA paper (Dickey, Hasza, Fuller, 1984 ) gives limit distribution for studentized statistic (d=12) 5 th %ile = th %ile = th %ile: (Note: ( )/2 = !!) Difference: = 3.32, 2(1.645) = 3.29 (close !!) Suggestion: shift by median CLT  limit distribution median is 0.

22 Median as function of seasonality d: 1. Get medians for d=2, 4,12 from DHF 2. Plot median vs. d -1/2 (d=2,4,12,limit)

23 Median as function of seasonality d: Regress median on d -1/2 Slope very close to ½, Intercept very close to 0. Median Shifts and Tau Percentiles. d med -1/(2 ) p01 p025 p05 p inf

24

25 Simulation Evidence m= 100, various d values 2 sets of 40,000 t statistics at each (m,d) e.g. d=365 and m=100, (daily data 100 years) – 36500x40000 = 1.46 billion generated data points. – SAS: only 10 minutes run time ! – Overlay percentiles (adjusted t) on N(0,1) – Duplicates almost exactly the same.

26

27 Simulation Evidence - Detrending m= 20, d =4, 6, 12, 24, 52, 96, 168, quarter hours/day, 168 hours/week Detrending: – None – Constant, linear, quadratic – Period d sinusoids (fundamental & harmonic) Sets of 20,000 t statistics at each (m,d).

28 20 years of weekly data, 20,000 simulated series TAU

29

30

31

32

33

34 Standard tau percentiles for various adjustments Three replicates (of 20,000) per d value Conclusions: Spread between percentiles about constant (and close to N(0,1) spread) Medians smooth function of 1/sqrt(d) Degree of detrending matters Cubic smoothing regression plotted with raw %iles.

35

36

37

38

39

40

41 Claim: As d  infinity, Tau  N(0,1) for all of these forms of detrending Seasonal random walk Z, data Y. Y = X  + Z Detrend by OLS: Seasonal Random Walk has d “channels” of m values Denominator is sum of d quadratic forms Without detrending each has eigenvalues can be written as

42 k = rank of X matrix Middle matrix is diagonal. Projection => k diagonal entries 1 rest 0 Denominator quadratic form contains k times maximum eigenvalue = O(km 2 ) Upper probability bound on unnormalized quadratic form. Normalization is m 2 d so k/d  0 suffices for no limit effect of detrending. Same for numerator, estimator, tau statistic.

43 Based on Taylor series (for large m) adjustment is for regression adjustments with k columns selected from intercept and Fourier sines and cosines.

44 Your talk seems better now Grandpa!

45 Focus on Medians:

46

47 Allowing for augmenting terms, as in seasonal multiplicative model, follows the same proof as in DHF. Natural gas data: Procedure (1) Compute residuals (trend + harmonics) (2) AR(2) fit to span 52 differences of residuals (3) Filter with AR(2) F t = filtered series W t = span 52 differences F t – F t-52 (4) Regress W t on F t-52 W t-1 W t-2

48 The REG Procedure Dependent Variable: Diff Sum of Mean Source DF Squares Square F Value Pr > F Model <.0001 Error Corrected Total Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > |t| Intercept L52FY <.0001 Diff Diff

49 Follow up: Lag 52 coefficient near -1 suggests  near -1 Perhaps no lag correlation in the presence of sinusoids Fit ARIMAX model as a check (AR(2), no seasonal lag): Standard Approx Parameter Estimate Error t Value Pr > |t| Lag Variable MU total AR1, < total AR1, < total NUM date NUM < s1 NUM < c1 NUM < s2 NUM < c2

50 Lack of fit? Box-Ljung test on residuals Autocorrelation Check of Residuals To Chi- Pr > Lag Square DF ChiSq Autocorrelations Lag 104, 52

51 AR(2) characteristic polynomial m m (m=1/B)

52 QUESTIONS? D. A. Dickey  D.A.D.

53 QUESTIONS? D. A. Dickey  D.A.D. OK, we’re outa here!

54 Following up – No adjustment add 1.0 /(2d 1/2 ) = (1/2 + 0(2/3) )/d 1/2 Polynomial add 2.3/(2d 1/2 ) ≈ (1/2 + 1(2/3) )/d 1/2 Sine (fund.) add 5.0 /(2d 1/2 ) ≈ (1/2 + 3(2/3) )/d 1/2 + harmonic add 7.6 /(2d 1/2 ) ≈ (1/2 + 5(2/3) )/d 1/2 Sine + linear about the same as sine Generated 3 sets of pctles (20,000 reps) for both models Sorted on d and 5 th percentile Result: percentiles interspersed (see below) Moral: Use same adjustments for sine, sine + linear.

55 ,000 reps per line d= trend t_1 t_2_5 t_5 t_10 t_25 t_50 t_75 t_90 t_95 t_97_5 t_99 n harmonic Harmonic harmonic sine wave sine wave lin&sine sine wave lin&sine mean mean linear quadratic linear quadratic mean quadratic linear none none none


Download ppt "Seasonal Unit Root Tests in Long Periodicity Cases D. A. Dickey Ying Zhang."

Similar presentations


Ads by Google