Download presentation

Presentation is loading. Please wait.

Published byConnor McAllister Modified over 2 years ago

1
Stationarity Issues in Time Series Modeling David A. Dickey North Carolina State University

2
Stationarity-what is it? n Example: Stocks of Silver in the NY Commodities Exchange n Two forecasts: n Nonstationary in yellow –No mean reversion, unbounded error bands n Stationary in green –Reverts to mean, bounded error bands

3
Silver Series

4
Stationarity-what is it? Constant mean Constant mean Covariance between Y t, Y t+h function of h only. (h) Covariance between Y t, Y t+h function of h only. (h) [Autocorrelation (h) = (h)/ (0)] [Autocorrelation (h) = (h)/ (0)]

5
One Lag Model Y t = (Y t-1 )+e t Y t = (Y t-1 )+e t –shocks e t ~N(0, 2 ) Stationary: | |<1 Stationary: | |<1 – Y t = (1 Y t-1 +e t – Regress Y t on 1, Y t-1 »Estimators approximately normally distributed in large samples »Use t test for H0: =0

6
One Lag Model with =1 Y t =1(Y t-1 )+e t Y t =1(Y t-1 )+e t – shocks e t ~N(0, 2 ) n Y t =Y t-1 +e t n Best forecast of Y t is Y t-1 Nonstationary: =1 Nonstationary: =1 –Regress Y t on 1, Y t-1 –Estimators NOT normally distributed even in large samples –CANNOT use t tables to test for H 0 : =0 –t test statistic does NOT have t distribution!!!

7
Hypothesis Test Model: Y t = (Y t-1 )+e t Model: Y t = (Y t-1 )+e t n Test – H 0 : =1 Nonstationary, Unit Root – H 1 : | |<1 Stationary (mean reverting) n Compare t calculated to new distribution

8
Two Tests Model: Y t = (Y t-1 )+e t Model: Y t = (Y t-1 )+e t – Y t Y t-1 =( (Y t-1 )+e t – Y t Y t-1 = (1- + ( Y t-1 +e t –Regress Y t Y t-1 on 1, Y t-1 –Tests: – n(coefficient of Y t-1 ) Rho – calculated t test Tau

9
Some math Above diagonal ->

10
More math W(t) is Wiener Process on [0,1]

11
Two Series SAS software: PROC ARIMA proc gplot; plot (Y Z)*t / overlay; proc arima; i var=Y nlag=10 stationarity=(adf); i var=Z nlag=10 stationarity=(adf);

12

13
Symptoms of Nonstationarity n ACF dies down slowly –ACF is Corr (Y t, Y t-j ) plot vs. j n Nonconstant level when plotted n Saw plot, ACFs coming up

14
The ARIMA Procedure Name of Variable = Y Mean of Working Series Standard Deviation Number of Observations 250 Autocorrelation Lag Correlation Std Error | |********************| |. |******************* | |. |******************* | |. |****************** | |. |****************** | |. |***************** | |. |***************** | |. |**************** | |. |**************** | |. |**************** | |. |*************** | Y series ACF

15
The ARIMA Procedure Name of Variable = Z Mean of Working Series Standard Deviation Number of Observations 250 Autocorrelations Lag Correlation | |********************| |. |****************** | |. |**************** | |. |************** | |. |************* | |. |*********** | |. |********** | |. |********** | |. |********* | |. |********* | |. |******** | "." marks two standard errors Z series ACF

16
The ARIMA Procedure Augmented Dickey-Fuller Unit Root Tests Type Lags Rho Pr F Zero Mean Single Mean Trend Tests on Y

17
Tests on Z The ARIMA Procedure Augmented Dickey-Fuller Unit Root Tests Type Lags Rho Pr F Zero Mean Single Mean Trend

18
Higher Order Processes Y t Y t-1 Y t-2 Y t-3 e t Y t = Y t -Y t-1 = Y t-1 Y t-1 Y t-2 e t [ coefficient ] Augmenting lags ADF stands for Augmented Dickey-Fuller Testing for no mean reversion: H 0 : Regress Y t -Y t-1 on 1, Y t-1, Y t-1 -Y t-2, Y t-2 -Y t-3 Nonstandard | N(__, __) |

19
Higher Order Processes Q1: How many lags??? Regress Y t on 1,Y t-1, Y t-1 Y t-2 | N(__, __) | so... Just use usual t tests and p-values!!! Q2: Why Unit Root Tests ?? B(Y t )= Y t-1 ( B B 2 B 3 )(Y t = e t root of B B 2 B 3 at B=1 means = 0

20
Check Silver Series for Augmenting Lags PROC REG; MODEL DEL= LSILVER DEL1 DEL2 DEL3 DEL4; TEST DEL2=0, DEL3=0, DEL4=0; Mean Source DF Square F Value Pr > F Numerator Denominator

21
Unit Root test in PROC REG PROC REG; MODEL DEL= LSILVER DEL1; Parameter Variable DF Estimate t Value Pr > |t| Intercept LSILVER DEL <.0001

22
Unit Root test in PROC ARIMA PROC ARIMA DATA=SILVER; I VAR=SILVER STATIONARITY=(ADF=(1)); Augmented Dickey-Fuller Unit Root Tests Type Lags Tau Pr < Tau Zero Mean Single Mean Trend

23
And now...the rest of the story

24
Type Lags Tau Pr < Tau Zero Mean ????? (A) Single Mean Trend ????? (B) (A) Assumes mean is 0 (or known and subtracted off) Has different (pair of) distributions !! (B) Allows for TREND under H1 Has third (pair of) distributions !!!!

25
Silver - Need 2 nd Difference? D t = Y t = Y t -Y t-1 Q: Does D (also) have a unit root ?

26
Regress D t on D t-1 using /NOINT (why?) No augmenting lags (why?) No augmenting lags (why?) I VAR=Y(1) STATIONARITY =... I VAR=Y(1) STATIONARITY =... Type Lags Tau Pr < Tau Zero Mean Single Mean Trend

27

28
Autocorrelations Lag Covariance Correlation Lag Covariance Correlation | |********************| | |********************| |.|********************| |.|********************| |.|********************| |.|********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| |. |********************| "." marks two standard errors "." marks two standard errors

29
Output from SAS PROC ARIMA Augmented Dickey-Fuller Unit Root Tests Augmented Dickey-Fuller Unit Root Tests Type Lags Rho Pr < Rho Type Lags Rho Pr < Rho Zero Mean Zero Mean Single Mean Single Mean Trend Trend

30
Differences

31
Autocorrelations Lag Covariance Correlation Lag Covariance Correlation | |********************| | |********************| |.|* | |.|* | | *|. | | *|. | | *|. | | *|. | |.|. | |.|. | |.|. | |.|. | |.|. | |.|. | | *|. | | *|. | |.|. | |.|. | |.|* | |.|* | |.|** | |.|** | | *|. | | *|. | |.|* | |.|* | "." marks two standard errors "." marks two standard errors

32
n Inverse Autocorrelation n Ming Chang thesis n Dual model (1 B) Y t = e t dual is Y t = (1 B) e t (1 B) Y t = e t dual is Y t = (1 B) e t AR(1) MA(1) AR(1) MA(1) n Chang shows IACF dies off slowly if you overdifference.

33
Differenced DJIA IACF Inverse Autocorrelations Lag Correlation | **********|. | |.|. | |.|. | |.|. | |.|. | |.|. | |.|. | |.|. | |.|* | | *|. | |.|* | |.|. |

34
2 nd Differenced DJIA IACF Just for illustration, here is the inverse autocorrelation you would get if you differenced these differences once more, that is, if you took the second difference of the original series. Note the roughly triangular appearance, suggesting that you should have stopped after the first difference Inverse Autocorrelations Lag Correlation |.|****************** | |.|**************** | |.|************** | |.|************ | |.|********** | |.|******** | |.|******* | |.|***** | |.|*** | |.|** | |.|* | |.|. |

35
Rho and F Y t Y t-1 Y t-2 e t Factor: Y t Y t-1 Y t-1 e t Rho (1) Estimate ( H 0 ) by regression (2) Divide n[ estimate] by ( estimate-1)F Regress on 1, t, Regress Y t on 1, t, Y t-1, Y t-1 Test underlined items with F (3 numerator df)

36
Trend is not Unit Root Y t = a + b t + Z t with Z t stationary Y t-1 = a + b(t-1) + Z t-1 Y t = b + Z t with Z t an overdifferenced Y t = b + Z t with Z t an overdifferenced series !! series !!Example:

37
Amazon.com Example (volume)

38
PROC REG; MODEL DV = DATE LAGV DV1-DV4; TEST DV3=0, DV4=0; Parameter Variable DF Estimate t Value Pr > |t| Type I SS Intercept < date < LAGV < DV DV DV DV Test 1 Results for Dependent Variable DV Mean Source DF Square F Value Pr > F Numerator Denominator

39
ACF Levels: Lag Covariance Correlation | |********************| |. |******************* | |. |****************** | |. |****************** | |. |***************** | |. |***************** | |. |***************** | |. |***************** | |. |**************** | |. |**************** | |. |**************** | |. |**************** | |. |**************** | |. |**************** | |. |**************** | |. |**************** | |. |*************** | |. |*************** | |. |*************** | |. |*************** | |. |*************** | |. |*************** | |. |*************** | |. |*************** | |. |*************** | "." marks two standard errors

40
IACF - Differences Lag Correlation |. |********** | |. |********* | |. |******* | |. |****** | |. |***** | |. |***** | |. |***** | |. |**** | |. |*** | |. |**** | |. |*** | |. |** | |. |*** | |. |** | |. |** | |. |** | |. |** | |. |*. | |. |*. | |. |** | |. |*. | |. |*. | |. |*. | |. |.

41
The ARIMA Procedure Augmented Dickey-Fuller Unit Root Tests Type Lags Rho Pr F Zero Mean Single Mean Trend < Do the test: Fit AR(3) plus trend. Diagnostics: Autocorrelation Check of Residuals To Chi- Pr > Lag Square DF ChiSq -----Autocorrelations

42
Extensions S. E. Said shows that models with lagged e t terms can still be tested by ADF tests. Nobel Prize cointegration idea: Two or more unit root processes have Two or more unit root processes have stationary linear combination. stationary linear combination. Compute, e.g. Y t = ln(S t /L t ) and test for stationarity. stationarity. n n n n Click: SAS Code from Presentations

43
Thanks ! Questions ?

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google