time series analysis
play

Time Series Analysis Henrik Madsen hm@imm.dtu.dk Informatics and - PowerPoint PPT Presentation

H. Madsen, Time Series Analysis, Chapmann Hall Time Series Analysis Henrik Madsen hm@imm.dtu.dk Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs. Lyngby Henrik Madsen 1 H. Madsen, Time Series Analysis,


  1. H. Madsen, Time Series Analysis, Chapmann Hall Time Series Analysis Henrik Madsen hm@imm.dtu.dk Informatics and Mathematical Modelling Technical University of Denmark DK-2800 Kgs. Lyngby Henrik Madsen 1

  2. H. Madsen, Time Series Analysis, Chapmann Hall Outline of the lecture Identification of univariate time series models Introduction, Sec. 6.1 Estimation of auto-covariance and -correlation, Sec. 6.2.1 (and the intro. to 6.2) Using SACF, SPACF, and SIACF for suggesting model structure, Sec. 6.3 Estimation of model parameters, Sec. 6.4 Examples... Cursory material: The extended linear model class in Sec. 6.4.2 (we’ll come back to the extended model class later) Henrik Madsen 2

  3. H. Madsen, Time Series Analysis, Chapmann Hall Model building in general Data 1. Identification (Specifying the model order) Theory physical insight 2. Estimation (of the model parameters) 3. Model checking No Is the model OK ? Yes Applications using the model (Prediction, simulation, etc.) Henrik Madsen 3

  4. H. Madsen, Time Series Analysis, Chapmann Hall Identification of univariate time series models What ARIMA structure would be appropriate for the data at hand? (If any) 12 2 4 6 8 0 20 40 60 80 100 Given the structure we will then consider how to estimate the parameters (next lecture) What do we know about ARIMA models which could help us? Henrik Madsen 4

  5. H. Madsen, Time Series Analysis, Chapmann Hall Estimation of the autocovariance function Estimate of γ ( k ) N −| k | � γ ( k ) = 1 C Y Y ( k ) = C ( k ) = � ( Y t − Y )( Y t + | k | − Y ) N t =1 It is enough to consider k > 0 S-PLUS: acf(x, type = "covariance") Henrik Madsen 5

  6. H. Madsen, Time Series Analysis, Chapmann Hall Some properties of C ( k ) The estimate is a non-negative definite function (as γ ( k ) ) The estimator is non-central : N −| k | � E [ C ( k )] = 1 γ ( k ) = (1 − | k | N ) γ ( k ) N t =1 Asymptotically central (consistent) for fixed k : E [ C ( k )] → γ ( k ) for N → ∞ The estimates are autocorrelated them self (don’t trust apparent correlation at high lags too much) Henrik Madsen 6

  7. H. Madsen, Time Series Analysis, Chapmann Hall How does C ( k ) behave for non-stationary series? N −| k | � C ( k ) = 1 ( Y t − Y )( Y t + | k | − Y ) N t =1 Henrik Madsen 7

  8. H. Madsen, Time Series Analysis, Chapmann Hall How does C ( k ) behave for non-stationary series? N −| k | � C ( k ) = 1 ( Y t − Y )( Y t + | k | − Y ) N t =1 Series : arima.sim(model = list(ar = 0.9, ndiff = 1), n = 500) 8000 7800 7600 7400 7200 0 5 10 15 20 25 Henrik Madsen 7

  9. H. Madsen, Time Series Analysis, Chapmann Hall Autocorrelation and Partial Autocorrelation Sample autocorrelation function (SACF): ρ ( k ) = r k = C ( k ) /C (0) � For white noise and k � = 1 it holds that E [ � ρ ( k )] ≃ 0 and √ V [ � ρ ( k )] ≃ 1 /N , this gives the bounds ± 2 / N for deciding when it is not possible to distinguish a value from zero. S-PLUS: acf(x) Sample partial autocorrelation function (SPACF): Use the Yule-Walker equations on � ρ ( k ) (exactly as for the theoretical relations) √ It turns out that ± 2 / N is also appropriate for deciding when the SPACF is zero (more in the next lecture) S-PLUS: acf(x, type="partial") Henrik Madsen 8

  10. H. Madsen, Time Series Analysis, Chapmann Hall What would be an appropriate structure? 2 1.2 1 0 1.1 −1 −2 0 20 40 60 80 100 1.0 • 1 0.2 1.0 0.1 0.9 0.6 Partial ACF ACF 0.0 0.2 −0.1 0.8 −0.2 −0.2 0 0.8 5 10 0.9 15 20 1.0 0 5 1.1 10 15 1.2 20 Lag Lag 1 Henrik Madsen 9

  11. H. Madsen, Time Series Analysis, Chapmann Hall What would be an appropriate structure? 4 1.2 2 0 1.1 −2 0 20 40 60 80 100 1.0 • 1 1.0 0.6 0.9 0.4 0.6 Partial ACF ACF 0.2 0.2 0.8 0.0 −0.2 −0.2 0 0.8 5 10 0.9 15 20 1.0 0 5 1.1 10 15 1.2 20 Lag Lag 1 Henrik Madsen 10

  12. H. Madsen, Time Series Analysis, Chapmann Hall What would be an appropriate structure? 4 1.2 2 0 −2 1.1 −4 −6 0 20 40 60 80 100 1.0 • 1 1.0 0.8 0.9 0.6 Partial ACF 0.4 ACF 0.2 0.0 0.8 −0.2 −0.4 0 0.8 5 10 0.9 15 20 1.0 0 5 1.1 10 15 1.2 20 Lag Lag 1 Henrik Madsen 11

  13. H. Madsen, Time Series Analysis, Chapmann Hall What would be an appropriate structure? 4 1.2 2 0 1.1 −2 −4 0 20 40 60 80 100 1.0 • 1 1.0 0.2 0.0 0.9 0.5 Partial ACF −0.2 ACF 0.0 0.8 −0.5 −0.6 0 0.8 5 10 0.9 15 20 1.0 0 5 1.1 10 15 1.2 20 Lag Lag 1 Henrik Madsen 12

  14. H. Madsen, Time Series Analysis, Chapmann Hall What would be an appropriate structure? 3 1.2 2 1 0 1.1 −1 −2 0 20 40 60 80 100 1.0 • 1 1.0 0.6 0.9 0.4 0.6 Partial ACF ACF 0.2 0.2 0.0 0.8 −0.2 −0.2 0 0.8 5 10 0.9 15 20 1.0 0 5 1.1 10 15 1.2 20 Lag Lag 1 Henrik Madsen 13

  15. H. Madsen, Time Series Analysis, Chapmann Hall What would be an appropriate structure? 3 1.2 2 1 0 1.1 −1 −2 0 20 40 60 80 100 1.0 • 1 0.4 1.0 0.9 0.2 0.6 Partial ACF ACF 0.0 0.2 0.8 −0.2 −0.2 0 0.8 5 10 0.9 15 20 1.0 0 5 1.1 10 15 1.2 20 Lag Lag 1 Henrik Madsen 14

  16. H. Madsen, Time Series Analysis, Chapmann Hall What would be an appropriate structure? −90 1.2 −110 −130 1.1 −150 0 20 40 60 80 100 1.0 • 1 1.0 0.8 0.9 0.6 Partial ACF 0.4 ACF 0.2 0.0 0.8 −0.4 −0.2 0 0.8 5 10 0.9 15 20 1.0 0 5 1.1 10 15 1.2 20 Lag Lag 1 Henrik Madsen 15

  17. H. Madsen, Time Series Analysis, Chapmann Hall Example of data from an MA (2) -process 4 1.2 2 0 1.1 −2 −4 0 20 40 60 80 100 1.0 • 1 1.0 0.2 0.0 0.9 0.5 Partial ACF −0.2 ACF 0.0 0.8 −0.5 −0.6 0 0.8 5 10 0.9 15 20 1.0 0 5 1.1 10 15 1.2 20 Lag Lag 1 Henrik Madsen 16

  18. H. Madsen, Time Series Analysis, Chapmann Hall Example of data from a non-stationary process 80 1.2 60 40 20 0 1.1 −40 0 20 40 60 80 100 1.0 • 1 1.0 1.0 0.9 0.6 0.6 Partial ACF ACF 0.2 0.2 0.8 −0.2 −0.2 0 0.8 5 10 0.9 15 20 1.0 0 5 1.1 10 15 1.2 20 Lag Lag 1 Henrik Madsen 17

  19. H. Madsen, Time Series Analysis, Chapmann Hall Same series; analysing ∇ Y t = (1 − B ) Y t = Y t − Y t − 1 4 1.2 2 0 −2 1.1 −4 0 20 40 60 80 100 1.0 • 1 1.0 0.6 0.9 0.6 Partial ACF ACF 0.2 0.2 0.8 −0.2 −0.2 0 0.8 5 10 0.9 15 1.0 0 5 1.1 10 1.2 15 Lag Lag 1 Henrik Madsen 18

  20. H. Madsen, Time Series Analysis, Chapmann Hall Identification of the order of differencing Select the order of differencing d as the first order for which the autocorrelation decreases sufficiently fast towards 0 In practice d is 0, 1, or maybe 2 Sometimes a periodic difference is required, e.g. Y t − Y t − 12 Remember to consider the practical application . . . it may be that the system is stationary, but you measured over a too short period Henrik Madsen 19

  21. H. Madsen, Time Series Analysis, Chapmann Hall Stationarity vs. length of measuring period US/CA 30 day interest rate differential 0.3 0.1 −0.1 −0.5 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 US/CA 30 day interest rate differential 0.0 −0.1 −0.2 −0.3 −0.4 −0.5 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Q1 Q2 Q3 1990 1991 1992 1993 1994 1995 1996 Henrik Madsen 20

  22. H. Madsen, Time Series Analysis, Chapmann Hall Identification of the ARMA-part Characteristics for the autocorrelation functions: ACF ρ ( k ) PACF φ kk AR ( p ) Damped exponential φ kk = 0 for k > p and/or sine functions MA ( q ) Dominated by damped ρ ( k ) = 0 for k > q exponential and or/sine functions ARMA ( p, q ) Damped exponential Dominated by damped and/or sine functions exponential and/or sine after lag q − p functions after lag p − q The IACF is similar to the PACF; see the book page 133 Henrik Madsen 21

  23. H. Madsen, Time Series Analysis, Chapmann Hall Behaviour of the SACF ˆ ρ ( k ) (based on N obs.) If the process is white noise then � 1 ± 2 N is an approximate 95% confidence interval for the SACF for lags different from 0 If the process is a MA ( q ) -process then � ρ 2 (1) + . . . + ˆ ρ 2 ( q )) 1 + 2(ˆ ± 2 N is an approximate 95% confidence interval for the SACF for lags larger than q Henrik Madsen 22

  24. H. Madsen, Time Series Analysis, Chapmann Hall Behaviour of the SPACF ˆ φ kk (based on N obs.) If the process is a AR ( p ) -process then � 1 ± 2 N is an approximate 95% confidence interval for the SPACF for lags larger than p Henrik Madsen 23

  25. H. Madsen, Time Series Analysis, Chapmann Hall Model building in general Data 1. Identification (Specifying the model order) Theory physical insight 2. Estimation (of the model parameters) 3. Model checking No Is the model OK ? Yes Applications using the model (Prediction, simulation, etc.) Henrik Madsen 24

Recommend


More recommend