Adventures in Forecasting David A. Dickey NC State University

Size: px
Start display at page:

Download "Adventures in Forecasting David A. Dickey NC State University"

Transcription

1 (Previously presented at SAS Global Forum, Dallas, 2015) Adventures in Forecasting David A. Dickey NC State University Learning objectives: Understand ARIMA models. Interpret ARIMA output from PROC ARIMA Forecast with forecast intervals Understand when to difference data Understand advantages/disadvantages of deterministic vs. stochastic inputs Compare forecasts from deterministic versus stochastic input models. Incorporate Trends Incorporate Seasonality (optional) Introduce Cointegration Note: Examples here are run in SAS TM TM SAS and its products is the registered trademark of SAS Institute, Cary NC, USA 1

2 Pg. Topic Brief index 3 Overview 4 Autoregressive Models 8 Model checking 10 Prediction Intervals 11 Moving Average Models 14 Model Selection - AIC 19 Stationarity Unit Roots 26 Determining Lag Differences for Unit Root Tests 33 Models with Inputs (PROC AUTOREG) 47 Detecting Outliers 52 Seasonal Models 63 (optional) Nonlinear Trends 67 (optional) St. Petersburg Visitor Example 72 (optional) Seasonal Unit Roots 77 (optional) Cointegrated Series Real data examples Silver pg. 5, 24, 36 Iron &Steel 12 Brewers 14, 23 Corn Yields 24 Harley 33 NCSU Energy 40 Deer Crash 52 Ice Classic 63 St. Pete Visits 67 T-bill rates 78 2

3 Overview of Time Series and Forecasting: Data taken over time (usually equally spaced) Yt = data at time t = mean (constant over time) Simplest model: Yt = + et where et ~ N(0, 2 ) independent. Forecast: Y S Example 0: Yt = + Zt, corr(zt,zt-1)=0.8 Model (Yt (Yt 1 et, et ~ N(0, 2 ) independent 3

4 ARIMA Models: AR(p): Autoregressive ( Yt ) 1( Yt 1 ) 2( Yt 2 ) ( Y ) e p t p t et independent, constant variance: White Noise How to find p? Regress Y on lags. PACF Partial Autocorrelation Function (1) Regress Yt on Yt-1 then Yt on Yt-1 and Yt-2 then Yt on Yt-1,Yt-2, Yt-3 etc. (2) Plot last lag coefficients versus lags. Red series example: Partial Autocorrelations 4

5 Example 1: Supplies of Silver in NY commodities exchange: Getting PACF (and other identifying plots). SAS code: PROC ARIMA data=silver plots(unpack) = all; IDENTIFY var=silver; run; 5

6 PACF Spikes outside 2 standard error bands are statistically significant Two spikes p=2 ( Y ) ( Y ) ( Y ) e t 1 t 1 2 t 2 t How to estimate and s? PROC ARIMA s ESTIMATE statement. Use maximum likelihood (ml option) PROC ARIMA data=silver plots(unpack) = all; identify var=silver; ESTIMATE p=2 ml; 6

7 Maximum Likelihood Estimation Parameter Estimate Standard Error t Value Approx Pr > t Lag MU < AR1, < AR1, < ( Y ) ( Y ) ( Y ) e t 1 t 1 2 t 2 t ( Y 668) 1.57( Y 668) 0.67( Y 668) e t t 1 t 2 t ( Y 668) 1.57( Y 668) 0.67( Y 668) e t t 1 t 2 t 7

8 Backshift notation: B(Yt)=Yt-1, B 2 (Yt)=B(B(Yt))=Yt-2 2 (1 1.57B 0.67 B )( Y 668) e SAS output: (uses backshift) t t Autoregressive Factors Factor 1: B**(1) B**(2) Checks: (1) Overfit (try AR(3) ) ESTIMATE p=3 ml; Parameter Maximum Likelihood Estimation Estimate Standard Error t Value Approx Pr > t Lag MU < AR1, < AR1, AR1, (2) Residual autocorrelations Residual rt Residual autocorrelation at lag j: Corr(rt, rt-j) = (j) 8

9 Box-Pierce Q statistic: Estimate, square, and sum k of these. Multiply by sample size n. PROC ARIMA: k in sets of 6. Limit distribution Chi-square if errors independent. Later modification: Box-Ljung statistic for H0:residuals uncorrelated n k j 1 n n 2 j 2 j SAS output: To Lag Chi- Square Autocorrelation Check of Residuals DF Pr > ChiSq Autocorrelations Residuals uncorrelated Residuals are White Noise Residuals are unpredictable 9

10 SAS computes Box-Ljung on original data too. To Lag Chi- Square Autocorrelation Check for White Noise DF Pr > ChiSq Autocorrelations < < Data autocorrelated predictable! Note: All p-values are based on an assumption called stationarity discussed later. How to predict? ( Y ) ( Y ) ( Y ) e t 1 t 1 2 t 2 t One step prediction Y ( Y ) ( Y ), future error e t 1 1 t 2 t 1 t 1 Two step prediction Yt ( Yt 1 ) 2( Yt ), error et 1et Prediction error variance ( 2 = variance(et) ), (1 ),

11 From prediction error variances, get 95% prediction intervals. Can estimate variance of et from past data. SAS PROC ARIMA does it all for you! Moving Average, MA(q), and ARMA(p,q) models MA(1) Yt = + et et-1 Variance (1+ 2 ) 2 Yt-1 = + et-1 et-2 (1)=- /(1+ 2 ) Yt-2 = + et-2 et-3 (2)=0/(1+ 2 )=0 11

12 Autocorrelation function ACF ( (j)) is 0 after lag q for MA(q). PACF is useless for identifying q in MA(q). PACF drops to 0 after lag 3 AR(3) p=3 ACF drops to 0 after lag 2 MA(2) q=2 Neither drops ARMA(p,q) p= q= ( Y ) ( Y )... ( Y ) e e e t 1 t 1 p t p t 1 t 1 q t q Example 2: Iron and Steel Exports. PROC ARIMA plots(unpack)=all; IDENTIFY var=export; 12

13 ACF: could be MA(1) PACF: could be AR(1) Spike at lags 0, 1 (No spike displayed at lag 0) ESTIMATE P=1 ML; ESTIMATE Q=2 ML; ESTIMATE Q=1 ML; Maximum Likelihood Estimation Approx Parameter Estimate t Value Pr> t Lag MU < AR1, MU < MA1, MA1, MU < MA1, How to choose? AIC - smaller is better 13

14 AIC: -2 ln(lmax)+2(# parameters) Lmax = max of likelihood function AIC (MA(1)) AIC (AR(1)) AIC (MA(2)) FORECAST lead=5 out=out1 id=date interval=year; Example 3: Brewers Proportion Won Mean of Working Series Standard Deviation

15 Autocorrelations Lag Correlation Std Error ******************** ********** **** ** ** *** *** * * **** **** ***** "." marks two standard errors Could be MA(1) Autocorrelation Check for White Noise To Chi- Pr > Lag Square DF ChiSq Autocorrelations NOT White Noise! SAS Code: PROC ARIMA data=brewers; IDENTIFY var=win_pct nlag=12; run; ESTIMATE q=1 ml; 15

16 Maximum Likelihood Estimation Standard Approx Parameter Estimate Error t Value Pr > t Lag MU < MA1, AIC Autocorrelation Check of Residuals To Chi- Pr > Lag Square DF ChiSq Autocorrelations Estimated Mean Moving Average Factors Factor 1: B**(1) Partial Autocorrelations Lag Correlation ********** ** ** * *** *** **** * ****. OR could be AR(1) 16

17 ESTIMATE p=1 ml; Maximum Likelihood Estimation Standard Approx Parameter Estimate Error t Value Pr > t Lag MU < AR1, < AIC (vs ) Autocorrelation Check of Residuals To Chi- Pr > Lag Square DF ChiSq Autocorrelations Model for variable Win_pct Estimated Mean Autoregressive Factors Factor 1: B**(1) Conclusions for Brewers: Both models have statistically significant parameters. Both models are sufficient (no lack of fit) 17

18 Predictions from MA(1): First one uses correlations The rest are on the mean. Predictions for AR(1): Converge exponentially fast toward mean Not much difference but AIC prefers AR(1) 18

19 Stationarity (1) Mean constant (no trends) (2) Variance constant (3) Covariance (j) and correlation (j) = (j)/ (0) between Yt and Yt-j depend only on j ARMA(p,q) model: ( Y ) ( Y )... ( Y ) e e e t 1 t 1 p t p t 1 t 1 q t q Stationarity guaranteed whenever solutions of equation (roots of characteristic polynomial ) X p 1X p-1 2X p-2 p =0 are all <1 in magnitude. 19

20 Examples (1) Yt =.8(Yt-1 ) + et X-.8=0 X=.8 stationary (2) Yt = 1.00(Yt-1 ) + et nonstationary Note: Yt= Yt-1 + et Random walk (3) Yt = 1.6(Yt-1 ) 0.6(Yt-2 )+ et characteristic polynomial X 2 1.6X+0.6=0 X=1 or X=0.6 nonstationary (unit root X=1) (Yt ) (Yt-1 ) =0.6[(Yt-1 ) (Yt-2 )]+ et (Yt Yt-1) =0.6(Yt-1 Yt-2) + et First differences form stationary AR(1) process! No mean no mean reversion no gravity pulling toward the mean. 20

21 (4) Yt = 1.60(Yt-1 ) 0.63(Yt-1 )+ et X X+0.63=0 X=0.9 or X=0.7 roots <1 stationary (Yt ) (Yt-1 ) = 0.03(Yt-1 ) [(Yt-1 ) (Yt-2 )]+ et Yt Yt-1 = 0.03(Yt-1 ) (Yt-1 Yt-2)+ et * Unit Root testing (H0: Series has a unit root) Regress Yt Yt-1 on Yt-1 and (Yt-1 Yt-2) Look at t test for Yt-1. If it is significantly negative then stationary. *Note: If X=1 then (X X+0.63) = 0.3 (always equals lag Y coefficient so 0 unit root) 21

22 Problem: Distribution of t statistic on Yt-1 is not t distribution under unit root hypothesis. Distribution looks like this histogram: (1 million random walks of length n=100) Overlays: N(sample mean & variance) N(0,1) Correct distribution: Dickey-Fuller test in PROC ARIMA is the correct (left) 5 th %ile 46% of t s are less than (the normal 5 th percentile) 22

23 Example 3 revisited: Brewers PROC ARIMA data=brewers; IDENTIFY var=wins nlag=12 stationarity=(adf=0); run; Dickey-Fuller Unit Root Tests Type Lags Rho Pr < Rho Tau Pr < Tau Zero Mean Single Mean Trend Why single mean? Series has nonzero mean and no trend. Conclusion reject H0:unit roots so Brewers series is stationary (mean reverting). 0 lags do not need lagged differences in model (just regress Yt-Yt-1 on Yt-1) 23

24 Example 1 revisited: Stocks of silver Needed AR(2) (2 lags) so regress Yt-Yt-1 (D_Silver) on Yt-1 (L_Silver) and Yt-1-Yt-2 (D_Silver_1) PROC REG: Parameter Variable DF Estimate t Value Pr> t Intercept L_Silver wrong distn. D_Silver_ <.0001 OK 24

25 PROC ARIMA: Augmented Dickey-Fuller Unit Root Tests Type Lags Rho Pr<Rho Tau Pr<Tau Zero Mean Single Mean OK Trend Same t statistic, corrected p-value! Conclusion: Unit root difference the series. 1 lag need 1 lagged difference in model (regress Yt-Yt-1 on Yt-1 and Yt-1-Yt-2 ) PROC ARIMA data=silver; IDENTIFY var=silver(1) stationarity=(adf=(0)); ESTIMATE p=1 ml; FORECAST lead=24 out=outn ID=date Interval=month; 25

26 Unit root forecast & forecast interval HOW MANY LAGGED DIFFERENCES? Regression: (Yt Yt 1) = b0 + b1yt 1 + b2(yt 1 Yt 2) + + bp(yt p 1 Yt p) not. standard distributions for these standard Dickey & Fuller (1979) 26

27 Lagged difference coefficients b2 bp have standard (asymptotically normal) distributions. Trust their t test p-values in PROC REG. b0 and b1 have t statistics with same nonstandard limit distributions as in the AR(1) model. Implication: Just use PROC REG to determine appropriate number of lagged differences. o Too few => invalid tests o Too many => loss of power Said & Dickey (1984, 1985) prove that methods work even if moving average terms are present. Chang and Dickey (1993) show that the Inverse Autocorrelation Function (IACF) can be used to check for overdifferencing. Y t = (Y t 1 ) + e t e t 1 ( <1) Autoregressive Moving Average Dual model: Y t = (Y t 1 ) + e t e t 1 Definition: Inverse Autocorrelation Function is Autocorrelation Function of dual model. 27

28 IACF estimation: (a) Fit long autoregression, (b) move coefficients to moving average (MA) side, (c) calculate ACF as if estimated MA is true. Chang (1993) Moving average unit root (e.g. =1) slow decay in IACF (Inverse AutoCorrelation Function) Differencing whenever you see a trend is NOT appropriate: Y Y t t 1 Y t e t ( t e t t 1) e e t 1 e t t N(0, ) IACF from generated linear trend plus white noise: ~ independent ( Non invertible moving average ) 28

29 Example 4: Corn yields in the U.S. (bushels per acre and ) Analysis of post 1942 yields. Levels data: PROC ARIMA; IDENTIFY var=yield stationarity=(adf=0); 29

30 Dickey-Fuller Unit Root Tests Type Lags Tau Pr<Tau Zero Mean Single Mean Trend <.0001 Autocorrelation Check of Residuals (from linear trend plus white noise) To Chi- Pr > Lag Square DF ChiSq --Autocorrelations Suppose we difference anyway: IACF 30

31 Example 2 revisited again: Silver Series DATA CHECK; SET SILVER; Lag_silver = LAG(silver); Diff = silver-lag_silver; OUTPUT; RETAIN; Diff5=Diff4; Diff4=Diff3; Diff3=Diff2; Diff2=Diff1; Diff1=Diff; PROC REG; MODEL Diff = Lag_silver Diff1-Diff5; REMOVE_2andup: TEST Diff2=0, Diff3=0, Diff4=0, Diff5=0; run Parameter Standard Variable DF Estimate Error t Value Pr > t Intercept X Lag_silver X Diff OK ** Diff OK Diff OK Diff OK Diff OK Test REMOVE_2andup Results for Dependent Variable Diff 31

32 Mean Source DF Square F Value Pr > F Numerator OK Denominator What actually happened next in Silver series? (1) Fit stationary (AR(2)) and nonstationary models (differences~ AR(1)) to the data. (2) Compute forecasts, stationary and nonstationary 32

33 PROC AUTOREG Fits a regression model (least squares) Fits stationary autoregressive model to error terms Refits accounting for autoregressive errors. Example 5-A: AUTOREG Harley-Davidson closing stock prices 2009-present. PROC AUTOREG data=harley; MODEL close=date/ nlag=15 backstep; run; 33

34 One by one, AUTOREG eliminates insignificant lags then: Estimates of Autoregressive Parameters Lag Coefficient Standard Error t Value Final model: Parameter Estimates Variable DF Estimate Standard Error t Value Approx Pr > t Intercept <.0001 Date <.0001 In PROC AUTOREG model is Zt+ Zt-1=et rather than Zt Zt-1=et so with = , error term Zt satisfies Zt 0.97Zt-1=et. 34

35 ARIMA Harley-Davidson closing stock prices 01/01/2009through 05/13/ (vs. AUTOREG) Apparent upward movement: Linear trend or nonstationary? Regress Yt Yt-1 on 1, t, Yt-1 (& lagged differences) H0: Yt= + Yt-1 + et random walk with drift H1: Yt= t + Zt with Zt stationary AR(p) * New distribution for t-test on Yt-1 35

36 With trend * Yt= t + Zt general model so Yt Yt-1 = t-(t-1) + Zt Zt-1 and if Zt=Zt-1+et (unit root) then Yt Yt-1 = + et or Yt Yt-1 + et Random walk with drift 36

37 Without trend With trend 1 million simulations - runs in 7 seconds! 37

38 SAS code for Harley stock closing price PROC ARIMA data=harley; IDENTIFY var=close stationarity=(adf) crosscor=(date) noprint; ESTIMATE input=(date) p=1 ml; FORECASE lead=120 id=date interval=weekday out=out1; run; Stationarity test (0,1,2 lagged differences): Augmented Dickey-Fuller Unit Root Tests Type Lags Rho Pr < Rho Tau Pr < Tau Zero Mean Single Mean Trend Conclusion: stationary around a linear trend. 38

39 Estimates: trend + AR(1) Parameter Maximum Likelihood Estimation Estimate Standard Error t Value Approx Pr > t Lag Variable Shift MU < Close 0 AR1, < Close 0 NUM < Date 0 39

40 Autocorrelation Check of Residuals To Lag Chi-Square DF Pr > ChiSq Autocorrelations What actually happened? 40

41 Example 6 (with inputs): NCSU Energy Demand Type of day Class Days Work Days (no classes) Holidays & weekends. Temperature Season of Year Step 1: Make some plots of energy demand vs. temperature and season. Use type of day as color. Seasons: S = A sin(2 t/365), C=B cos(2 t/365) Temperature Season of Year 41

42 Step 2: PROC AUTOREG with all inputs: PROC AUTOREG data=energy; MODEL demand = temp tempsq class work s c /nlag=15 backstep dwprob; output out=out3 predicted = p predictedm=pm residual=r residualm=rm; run; Estimates of Autoregressive Parameters Lag Coefficient Standard Error t Value Autocorrelation at 1, 7, 14, and others. 42

43 After autocorrelation adjustments, trust t tests etc. Parameter Estimates Variable DF Estimate Standard Error t Value Approx Pr > t Intercept <.0001 TEMP <.0001 TEMPSQ <.0001 CLASS <.0001 WORK <.0001 S <.0001 C Need better model? Big negative residual on Jan. 2 rm JUL79 01AUG79 01SEP79 01OCT79 01NOV79 01DEC79 01JAN80 01FEB80 01MAR80 01APR80 01MAY80 01JUN80 01JUL80 DATE WC non work work class Residuals from regression part. Large residual on workday January 2. Add dummy variable. 43

44 Same idea: PROC ARIMA Step 1: Graphs Step 2: Regress on inputs, diagnose residual autocorrelation: Not white noise (bottom right) Activity (bars) at lag 1, 7, 14 44

45 Step 3: Estimate resulting model from diagnostics plus trial and error: e input = (temp tempsq class work s c) p=1 q=(1,7,14) ml; Parameter Maximum Likelihood Estimation Estimate Standard Error t Value Approx Pr > t Lag Variable Shift MU < DEMAND 0 MA1, DEMAND 0 MA1, DEMAND 0 MA1, DEMAND 0 AR1, < DEMAND 0 NUM < TEMP 0 NUM < TEMPSQ 0 NUM < CLASS 0 NUM < WORK 0 NUM < S 0 NUM C 0 Note: class days get class effect 913 plus work effect Note 2: Lags are sensible. 45

46 Step 4: Check model fit (stats look OK): Autocorrelation Check of Residuals To Lag Chi-Square DF Pr > ChiSq Autocorrelations

47 Looking for outliers that can be explained PROC ARIMA, OUTLIER statement Available types (1) Additive (single outlier) (2) Level shift (sudden change in mean) (3) Temporary change (level shift for k contiguous time points you specify k) NCSU energy: tested every point 365 tests. Adjust for multiple testing Require p < 0.05/365 = (Bonferroni) OUTLIER type=additive alpha= id=date; FORMAT date weekdate.; run; /***************************************** January 2, 1980 Wednesday: Hangover Day :-) March 3,1980 Monday: On the afternoon and evening of March 2, 1980, North Carolina experienced a major winter storm with heavy snow across the entire state and near blizzard conditions in the eastern part of the state. Widespread snowfall totals of 12 to 18 47

48 inches were observed over Eastern North Carolina, with localized amounts ranging up to 22 inches at Morehead City and 25 inches at Elizabeth City, with unofficial reports of up to 30 inches at Emerald Isle and Cherry Point (Figure 1). This was one of the great snowstorms in Eastern North Carolina history. What made this storm so remarkable was the combination of snow, high winds, and very cold temperatures. May 10,1980 Saturday. Graduation! ****************************************/; Outlier Details Obs Time ID Type Estimate Chi-Square Approx Prob>ChiSq 186 Wednesday Additive < Saturday Additive < Monday Additive <.0001 Outlier Details Obs Time ID Type Estimate Chi-Square Approx Prob>ChiSq JAN-1980 Additive < MAY-1980 Additive < MAR-1980 Additive <

49 Outliers: Jan 2 (hangover day!), March 3 (snowstorm), May 10 (graduation day). AR(1) produces 3 rebound outlying next day residuals ( ). Add dummy variables for explainable outliers data next; merge outarima energy; by date; hangover = (date="02jan1980"d); storm = (date="03mar1980"d); graduation = (date="10may1980"d); 49

50 PROC ARIMA data=next; IDENTIFY var=demand crosscor=(temp tempsq class work s c hangover graduation storm) noprint; ESTIMATE input = (temp tempsq class work s c hangover graduation storm) p=1 q=(7,14) ml; FORECAST lead=0 out=outarima2 id=date interval=day; run; Parameter Maximum Likelihood Estimation Estimate Standard Error t Value Approx Pr > t Lag Variable Shift MU < DEMAND 0 MA1, < DEMAND 0 MA1, DEMAND 0 AR1, < DEMAND 0 NUM < TEMP 0 NUM < TEMPSQ 0 NUM < CLASS 0 NUM < WORK 0 NUM < S 0 NUM C 0 NUM < hangover 0 NUM < graduation 0 NUM < storm 0 50

51 Model looks fine. Comparison: Workday = Non workday Jan 2 = Workday 3473 = Non workday Jan 2 is like a non workday Class day = Non workday AUTOREG - regression with AR(p) errors versus ARIMA regression with differencing, ARMA(p,q) errors. 51

52 SEASONALITY Many economic and environmental series show seasonality. (1) Very regular ( deterministic ) or (2) Slowly changing ( stochastic ) Example 7: NC accident reports involving deer. Method 1: regression PROC REG data=deer; MODEL deer=date X11; run; (X11: 1 in Nov, 0 otherwise) Parameter Standard Variable DF Estimate Error t Value Pr > t Intercept <.0001 X <

53 Looks like December and October need dummies too! PROC REG data=deer; MODEL deer=date X10 X11 X12; run; Parameter Standard Variable DF Estimate Error t Value Pr > t Intercept <.0001 X <.0001 X <.0001 X <.0001 Average of Jan through Sept. is 929 crashes per month. Add 1391 in October, 2830 in November, 1377 in December. 53

54 Try dummies for all but one month (need average of rest so must leave out at least one) PROC REG data=deer; MODEL deer=x1-x11; OUTPUT out=out1 predicted=p residual=r; run; Parameter Standard Variable DF Estimate Error t Value Pr > t Intercept <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X X <

55 Average of rest is just December mean Subtract 886 in January, add 1452 in November. October (X10) is not significantly different than December. Residuals for Deer Crash data: Looks like a trend add trend (date): PROC REG data=deer; MODEL deer=date X1-X11; OUTPUT out=out1 predicted=p residual=r; run; 55

56 Parameter Standard Variable DF Estimate Error t Value Pr > t Intercept X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X X <.0001 date <.0001 Trend is 0.22 more accidents per day (1 per 5 days) and is significantly different from 0. What about autocorrelation? Method 2: PROC AUTOREG PROC AUTOREG data=deer; MODEL deer=date X1-X11/nlag=13 backstep; run; 56

57 Backward Elimination of Autoregressive Terms Lag Estimate t Value Pr > t Preliminary MSE Estimates of Autoregressive Parameters Standard Lag Coefficient Error t Value

58 Parameter Estimates Standard Approx Variable DF Estimate Error t Value Pr > t Intercept date <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X <.0001 X X <.0001 Method 3: PROC ARIMA PROC ARIMA plots=(forecast(forecast)); IDENTIFY var=deer crosscor= (date X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11); ESTIMATE p=1 ML input= (date X1 X2 X3 X4 X5 X6 X7 X8 X9 X10 X11); FORECAST lead=12 id=date interval=month; run; 58

59 Maximum Likelihood Estimation Standard Approx Parameter Estimate Error t Value Pr> t Lag Variable MU deer AR1, deer NUM < date NUM < X1 NUM < X2 NUM < X3 NUM < X4 NUM < X5 NUM < X6 NUM < X7 NUM < X8 NUM < X9 NUM X10 NUM < X11 Autocorrelation Check of Residuals To Chi- Pr > Lag Square DF ChiSq Autocorrelations Autoregressive Factors Factor 1: B**(1) 59

60 Method 4: Differencing Compute and model Dt = Yt-Yt-12 Removes seasonality Removes linear trend e t Y t Use (at least) q=(12) et- et-12 (A) if near 1, you ve overdifferenced (B) if 0< <1 this is seasonal exponential smoothing model. Y t Y e e t 12 t t 12 Y t Y ( e ) Y ( ) t Y Y Y e t t t 12 t 12 t 24 t 24 ( 1 )[ Y Y 2Y 3Y ] e t 12 t 24 t 36 t 48 t Forecast is a weighted (exponentially smoothed) average of past values: Yˆ t (1 )[ Y t 12 Y t 24 2Y t 36 3Y t 48 ] 60

61 IDENTIFY var=deer(12) nlag=25; ESTIMATE P=1 Q=(12) ml; run; Maximum Likelihood Estimation Standard Approx Parameter Estimate Error t Value Pr> t Lag MU < MA1, AR1, < Autocorrelation Check of Residuals To Chi- Pr > Lag Square DF ChiSq Autocorrelations Lag 12 MA somewhat close to 1 with large standard error, model OK but not best. Variance estimate 15,122 (vs. 13,431 for dummy variable model). 61

62 Forecasts are similar 2 years out. 62

63 OPTIONAL (time permitting) Trend Breaks Accounting for changes in trend Example 7: Nenana Ice Classic data (trend break) Exact time (day and time) of thaw of the Tanana river in Nenana Alaska: 1917 Apr 30 11:30 a.m May 11 9:33 a.m May 3 2:33 p.m. (more data) 2010 Apr 29 6:22 p.m May 04 4:24 p.m Apr 23 7:39 p.m. When the tripod moves downstream, that is the unofficial start of spring. 63

64 Get ramp with PROC NLIN / X= PROC NLIN data=all; PARMS point=1960 int=126 slope=-.2; X = (year-point)*(year>point); MODEL break = int + slope*x; OUTPUT out=out2 predicted=p residual=r; Approx Approximate 95% Confidence Parameter Estimate Std Error Limits point int slope

65 PROC SGPLOT data=out2; SERIES Y=break X=year; SERIES Y=p X=year/ lineattrs = (color=red thickness=2); REFLINE / axis=x; run;quit; What about autocorrelation? Final ramp: Xt = (year )*(year>1965); PROC ARIMA; IDENTIFY var=break crosscor=(ramp) noprint; ESTIMATE input=(ramp); FORECAST lead=5 id=year out=out1; run; 65

66 PROC ARIMA generates diagnostic plots: Autocorrelation Check of Residuals To Chi- Pr > Lag Square DF ChiSq Autocorrelations

67 Optional: more on seasonal, time permitting: Example 9: Visitors to St. Petersburg/Clearwater Model 1: Seasonal dummy variables + trend + AR(p) (REG - R 2 >97%) PROC REG data=aaem.stpete; MODEL visitors=t m1-m11; OUTPUT out=out4 predicted = P residual=r UCL=u95 LCL=l95; run; 67

68 PROC SGPLOT data=out3; BAND lower=l95 upper=u95 X=date; SERIES Y=P X=date; SCATTER Y=visitors X=date / datalabel=month datalabelattrs=(color=red size=0.3 cm); SERIES Y=U95 X=date/ lineattrs=(color=red thickness=0.8); SERIES Y=L95 X=date/ lineattrs=(color=red thickness=0.8); REFLINE "01apr2013"d / axis=x; where 2011<year(date)<2015; run; 68

69 PROC SGPLOT data=out4; NEEDLE Y=r X=date; run; Definitely autocorrelated Slowly changing mean? Try seasonal span difference model 69

70 PROC ARIMA data=stpete plots=forecast(forecast); IDENTIFY var=visitors(12); Typical ACF for ARMA(1,1) has initial dropoff followed by exponential decay try ARMA(1,1) on span 12 differences. ESTIMATE P=1 Q=1 ml; FORECAST lead=44 id=date interval = month out=outarima; run; 70

71 Standard Approx Parameter Estimate Error t Value Pr > t Lag MU MA1, AR1, < Autocorrelation Check of Residuals To Chi- Pr > Lag Square DF ChiSq Autocorrelations

72 PROC SGPLOT data=outarima; ; SERIES X=date Y=residual; run; We have seen deterministic (dummy variables) and dynamic (seasonal differences) models for St Pete visitors. How do decide between them? Seasonal unit root test! 72

73 Optional: Seasonal Multiplicative Model. Accommodates slowly changing seasonal patterns. Contrast - Indicator (dummy) variables assume same effect for every January (etc.) no matter what year. Simplest model seasonal random walk. Yt Yt-s+et Yt Yt-s=et Seasonal AR: (1 s )Yt=et Yt Yt-s +et Yt Yt-s=( -1)(Yt-s et Idea: Regress Yt Yt-s on (Yt-s to estimate and get a t test. Distribution of t is far from standard normal. Modification: replace Yt with deviations yt from seasonal means. 73

74 Visitors data: Estimate of : = Parameter Standard Variable DF Estimate Error t Value Pr> t Intercept <.0001 Y_ <.0001 XX Is t significant? What is the (null) distribution? Empirical (left) and N(0,1) (right) densities with means. Area to left of leftmost line ( =-4.50, see next model) is Critical value for 5% is -5.84, median is (Dickey, Hasza & Fuller, 1984, table 7). DHF 74

75 Conclusion: Insufficient evidence against seasonal dynamic model (seasonal unit roots). What if it s seasonal with more lags? Multiplicative seasonal model is popular. (1 B s )(1 1B 2B 2 pb p )(Yt- s)=et s=seasonal mean Step 1: Regress Dt=Yt Yt-s on Dt-1, Dt-2, Dt-p to estimate s. Residuals are et. Using these estimates, estimate filtered lags Ft-s= (1 1B 2B 2 pb p )(Yt-s- s) (note t-s subscript). Step 2: Regress Dt on Ft-s, Dt-1, Dt-2,, Dt-p to get test statistic and improvements for q estimates. For visitor data with p=2: 75

76 Parameter Estimates Parameter Standard Variable DF Estimate Error t Value Pr > t Intercept Filter <.0001 D D From normal curve graph above, p-value is about , not <.0001 Optional (time permitting) Cointegration Two unit root processes Xt and Yt (nonstationary) are said to be cointegrated if there is a linear combination of them St=aXt+bYt such that St is stationary. Usually a and b are unknown but sometimes the situation suggests values and in that case all that is needed to show Cointegration is a unit root test on St. 76

77 Cointegration analogy: Drunk man walking a dog Man > unit root process Dog > unit root process Distance from man to dog stationary! Red path = man Blue path = dog Example 10: T-bill rates for two maturities Data: 10 year t bill yields 30 year t bill yields (in logarithms) 77

78 Unit root tests show (1) Both series are nonstationary (can t reject unit roots using trend tests) (2) Neither requires more than 1 difference Let St = log(30 year) log(10 year) = log(30 year rate / 10 year rate) 78

79 Graph of St Unit root test on St Augmented Dickey-Fuller Unit Root Tests Type Lags Rho Pr < Rho Tau Pr < Tau Zero Mean Single Mean Trend

80 Final model: log(30 yr. rate/10 yr. rate) is stationary with estimated mean and autoregressive order 1 structure with =0.92 Summary: Use ACF, PACF to identify p=# autoregressive lags and q= # moving average lags. Stationarity mean reverting models versus unit roots (random walk type models). Graphics and DF test (and others) available. Diagnostics errors should be white noise Ljung Box test to check. Regression with autoregressive or ARMA errors Nonlinear regression to estimate slope changes (least squares). Seasonal models dynamic or deterministic. 80

81 References for unit roots: Chang, M. C. and D. A. Dickey, (1993) "Recognizing Overdifferenced Time Series," Journal of Time Series Analysis, 15, 1-8. Dickey, D. A. and W. A. Fuller (1979). Distribution of the Estimators for Autoregressive Time Series with a Unit Root. Journal of the American Statistical Association, 74, p Dickey, D. A. and W. A. Fuller (1981). Likelihood Ratio Statistics for Autoregressive Time Series with a unit Root. Econometrica 49, Dickey, D. A., D. P. Hasza, and W. A. Fuller (1984). Testing for Unit Roots in Seasonal Time Series, Journal of the American Statistical Association, 79, Said, S. E. and D. A. Dickey (1984). Testing for Unit Roots in Autoregressive-Moving Average Models of Unknown Order, Biometrika, 71, Said, S. E. and D. A. Dickey (1985). Hypothesis Testing in ARIMA (p, 1, q) Models, Journal of the American Statistical Association, 80, Dickey, D. A., W.R. Bell and R. B. Miller (1986). Unit Roots in Time Series Models: Tests and Implications, American Statistician 40,

The ARIMA Procedure: The ARIMA Procedure

The ARIMA Procedure: The ARIMA Procedure Page 1 of 120 Overview: ARIMA Procedure Getting Started: ARIMA Procedure The Three Stages of ARIMA Modeling Identification Stage Estimation and Diagnostic Checking Stage Forecasting Stage Using ARIMA Procedure

More information

TIME SERIES ANALYSIS AND FORECASTING USING THE STATISTICAL MODEL ARIMA

TIME SERIES ANALYSIS AND FORECASTING USING THE STATISTICAL MODEL ARIMA CHAPTER 6 TIME SERIES ANALYSIS AND FORECASTING USING THE STATISTICAL MODEL ARIMA 6.1. Introduction A time series is a sequence of observations ordered in time. A basic assumption in the time series analysis

More information

Paper SA-08. Are Sales Figures in Line With Expectations? Using PROC ARIMA in SAS to Forecast Company Revenue

Paper SA-08. Are Sales Figures in Line With Expectations? Using PROC ARIMA in SAS to Forecast Company Revenue Paper SA-08 Are Sales Figures in Line With Expectations? Using PROC ARIMA in SAS to Forecast Company Revenue Saveth Ho and Brian Van Dorn, Deluxe Corporation, Shoreview, MN ABSTRACT The distribution of

More information

Case Studies in Time Series David A. Dickey, North Carolina State Univ., Raleigh, NC

Case Studies in Time Series David A. Dickey, North Carolina State Univ., Raleigh, NC Paper 5-8 Case Studies in Time Series David A. Dickey, North Carolina State Univ., Raleigh, NC ABSTRACT This paper reviews some basic time series concepts then demonstrates how the basic techniques can

More information

Stat 5100 Handout #12.e Notes: ARIMA Models (Unit 7) Key here: after stationary, identify dependence structure (and use for forecasting)

Stat 5100 Handout #12.e Notes: ARIMA Models (Unit 7) Key here: after stationary, identify dependence structure (and use for forecasting) Stat 5100 Handout #12.e Notes: ARIMA Models (Unit 7) Key here: after stationary, identify dependence structure (and use for forecasting) (overshort example) White noise H 0 : Let Z t be the stationary

More information

Suan Sunandha Rajabhat University

Suan Sunandha Rajabhat University Forecasting Exchange Rate between Thai Baht and the US Dollar Using Time Series Analysis Kunya Bowornchockchai Suan Sunandha Rajabhat University INTRODUCTION The objective of this research is to forecast

More information

Decision 411: Class 9. HW#3 issues

Decision 411: Class 9. HW#3 issues Decision 411: Class 9 Presentation/discussion of HW#3 Introduction to ARIMA models Rules for fitting nonseasonal models Differencing and stationarity Reading the tea leaves : : ACF and PACF plots Unit

More information

Circle the single best answer for each multiple choice question. Your choice should be made clearly.

Circle the single best answer for each multiple choice question. Your choice should be made clearly. TEST #1 STA 4853 March 6, 2017 Name: Please read the following directions. DO NOT TURN THE PAGE UNTIL INSTRUCTED TO DO SO Directions This exam is closed book and closed notes. There are 32 multiple choice

More information

SAS/ETS 14.1 User s Guide. The ARIMA Procedure

SAS/ETS 14.1 User s Guide. The ARIMA Procedure SAS/ETS 14.1 User s Guide The ARIMA Procedure This document is an individual chapter from SAS/ETS 14.1 User s Guide. The correct bibliographic citation for this manual is as follows: SAS Institute Inc.

More information

Prof. Dr. Roland Füss Lecture Series in Applied Econometrics Summer Term Introduction to Time Series Analysis

Prof. Dr. Roland Füss Lecture Series in Applied Econometrics Summer Term Introduction to Time Series Analysis Introduction to Time Series Analysis 1 Contents: I. Basics of Time Series Analysis... 4 I.1 Stationarity... 5 I.2 Autocorrelation Function... 9 I.3 Partial Autocorrelation Function (PACF)... 14 I.4 Transformation

More information

Time Series Analysis of United States of America Crude Oil and Petroleum Products Importations from Saudi Arabia

Time Series Analysis of United States of America Crude Oil and Petroleum Products Importations from Saudi Arabia International Journal of Applied Science and Technology Vol. 5, No. 5; October 2015 Time Series Analysis of United States of America Crude Oil and Petroleum Products Importations from Saudi Arabia Olayan

More information

at least 50 and preferably 100 observations should be available to build a proper model

at least 50 and preferably 100 observations should be available to build a proper model III Box-Jenkins Methods 1. Pros and Cons of ARIMA Forecasting a) need for data at least 50 and preferably 100 observations should be available to build a proper model used most frequently for hourly or

More information

Ross Bettinger, Analytical Consultant, Seattle, WA

Ross Bettinger, Analytical Consultant, Seattle, WA ABSTRACT DYNAMIC REGRESSION IN ARIMA MODELING Ross Bettinger, Analytical Consultant, Seattle, WA Box-Jenkins time series models that contain exogenous predictor variables are called dynamic regression

More information

Ch 8. MODEL DIAGNOSTICS. Time Series Analysis

Ch 8. MODEL DIAGNOSTICS. Time Series Analysis Model diagnostics is concerned with testing the goodness of fit of a model and, if the fit is poor, suggesting appropriate modifications. We shall present two complementary approaches: analysis of residuals

More information

CHAPTER 8 MODEL DIAGNOSTICS. 8.1 Residual Analysis

CHAPTER 8 MODEL DIAGNOSTICS. 8.1 Residual Analysis CHAPTER 8 MODEL DIAGNOSTICS We have now discussed methods for specifying models and for efficiently estimating the parameters in those models. Model diagnostics, or model criticism, is concerned with testing

More information

MODELING INFLATION RATES IN NIGERIA: BOX-JENKINS APPROACH. I. U. Moffat and A. E. David Department of Mathematics & Statistics, University of Uyo, Uyo

MODELING INFLATION RATES IN NIGERIA: BOX-JENKINS APPROACH. I. U. Moffat and A. E. David Department of Mathematics & Statistics, University of Uyo, Uyo Vol.4, No.2, pp.2-27, April 216 MODELING INFLATION RATES IN NIGERIA: BOX-JENKINS APPROACH I. U. Moffat and A. E. David Department of Mathematics & Statistics, University of Uyo, Uyo ABSTRACT: This study

More information

Ch 6. Model Specification. Time Series Analysis

Ch 6. Model Specification. Time Series Analysis We start to build ARIMA(p,d,q) models. The subjects include: 1 how to determine p, d, q for a given series (Chapter 6); 2 how to estimate the parameters (φ s and θ s) of a specific ARIMA(p,d,q) model (Chapter

More information

Circle a single answer for each multiple choice question. Your choice should be made clearly.

Circle a single answer for each multiple choice question. Your choice should be made clearly. TEST #1 STA 4853 March 4, 215 Name: Please read the following directions. DO NOT TURN THE PAGE UNTIL INSTRUCTED TO DO SO Directions This exam is closed book and closed notes. There are 31 questions. Circle

More information

Minitab Project Report - Assignment 6

Minitab Project Report - Assignment 6 .. Sunspot data Minitab Project Report - Assignment Time Series Plot of y Time Series Plot of X y X 7 9 7 9 The data have a wavy pattern. However, they do not show any seasonality. There seem to be an

More information

Estimation and application of best ARIMA model for forecasting the uranium price.

Estimation and application of best ARIMA model for forecasting the uranium price. Estimation and application of best ARIMA model for forecasting the uranium price. Medeu Amangeldi May 13, 2018 Capstone Project Superviser: Dongming Wei Second reader: Zhenisbek Assylbekov Abstract This

More information

Chapter 2: Unit Roots

Chapter 2: Unit Roots Chapter 2: Unit Roots 1 Contents: Lehrstuhl für Department Empirische of Wirtschaftsforschung Empirical Research and undeconometrics II. Unit Roots... 3 II.1 Integration Level... 3 II.2 Nonstationarity

More information

ARIMA Models. Jamie Monogan. January 16, University of Georgia. Jamie Monogan (UGA) ARIMA Models January 16, / 27

ARIMA Models. Jamie Monogan. January 16, University of Georgia. Jamie Monogan (UGA) ARIMA Models January 16, / 27 ARIMA Models Jamie Monogan University of Georgia January 16, 2018 Jamie Monogan (UGA) ARIMA Models January 16, 2018 1 / 27 Objectives By the end of this meeting, participants should be able to: Argue why

More information

Testing for non-stationarity

Testing for non-stationarity 20 November, 2009 Overview The tests for investigating the non-stationary of a time series falls into four types: 1 Check the null that there is a unit root against stationarity. Within these, there are

More information

FE570 Financial Markets and Trading. Stevens Institute of Technology

FE570 Financial Markets and Trading. Stevens Institute of Technology FE570 Financial Markets and Trading Lecture 5. Linear Time Series Analysis and Its Applications (Ref. Joel Hasbrouck - Empirical Market Microstructure ) Steve Yang Stevens Institute of Technology 9/25/2012

More information

Topic 4 Unit Roots. Gerald P. Dwyer. February Clemson University

Topic 4 Unit Roots. Gerald P. Dwyer. February Clemson University Topic 4 Unit Roots Gerald P. Dwyer Clemson University February 2016 Outline 1 Unit Roots Introduction Trend and Difference Stationary Autocorrelations of Series That Have Deterministic or Stochastic Trends

More information

Ross Bettinger, Analytical Consultant, Seattle, WA

Ross Bettinger, Analytical Consultant, Seattle, WA ABSTRACT USING PROC ARIMA TO MODEL TRENDS IN US HOME PRICES Ross Bettinger, Analytical Consultant, Seattle, WA We demonstrate the use of the Box-Jenkins time series modeling methodology to analyze US home

More information

Asitha Kodippili. Deepthika Senaratne. Department of Mathematics and Computer Science,Fayetteville State University, USA.

Asitha Kodippili. Deepthika Senaratne. Department of Mathematics and Computer Science,Fayetteville State University, USA. Forecasting Tourist Arrivals to Sri Lanka Using Seasonal ARIMA Asitha Kodippili Department of Mathematics and Computer Science,Fayetteville State University, USA. akodippili@uncfsu.edu Deepthika Senaratne

More information

Lecture 6a: Unit Root and ARIMA Models

Lecture 6a: Unit Root and ARIMA Models Lecture 6a: Unit Root and ARIMA Models 1 2 Big Picture A time series is non-stationary if it contains a unit root unit root nonstationary The reverse is not true. For example, y t = cos(t) + u t has no

More information

5 Transfer function modelling

5 Transfer function modelling MSc Further Time Series Analysis 5 Transfer function modelling 5.1 The model Consider the construction of a model for a time series (Y t ) whose values are influenced by the earlier values of a series

More information

Chapter 12: An introduction to Time Series Analysis. Chapter 12: An introduction to Time Series Analysis

Chapter 12: An introduction to Time Series Analysis. Chapter 12: An introduction to Time Series Analysis Chapter 12: An introduction to Time Series Analysis Introduction In this chapter, we will discuss forecasting with single-series (univariate) Box-Jenkins models. The common name of the models is Auto-Regressive

More information

FinQuiz Notes

FinQuiz Notes Reading 9 A time series is any series of data that varies over time e.g. the quarterly sales for a company during the past five years or daily returns of a security. When assumptions of the regression

More information

Univariate ARIMA Models

Univariate ARIMA Models Univariate ARIMA Models ARIMA Model Building Steps: Identification: Using graphs, statistics, ACFs and PACFs, transformations, etc. to achieve stationary and tentatively identify patterns and model components.

More information

Time Series and Forecasting

Time Series and Forecasting Time Series and Forecasting Introduction to Forecasting n What is forecasting? n Primary Function is to Predict the Future using (time series related or other) data we have in hand n Why are we interested?

More information

Univariate linear models

Univariate linear models Univariate linear models The specification process of an univariate ARIMA model is based on the theoretical properties of the different processes and it is also important the observation and interpretation

More information

Non-Stationary Time Series and Unit Root Testing

Non-Stationary Time Series and Unit Root Testing Econometrics II Non-Stationary Time Series and Unit Root Testing Morten Nyboe Tabor Course Outline: Non-Stationary Time Series and Unit Root Testing 1 Stationarity and Deviation from Stationarity Trend-Stationarity

More information

Financial Time Series Analysis: Part II

Financial Time Series Analysis: Part II Department of Mathematics and Statistics, University of Vaasa, Finland Spring 2017 1 Unit root Deterministic trend Stochastic trend Testing for unit root ADF-test (Augmented Dickey-Fuller test) Testing

More information

Read Section 1.1, Examples of time series, on pages 1-8. These example introduce the book; you are not tested on them.

Read Section 1.1, Examples of time series, on pages 1-8. These example introduce the book; you are not tested on them. TS Module 1 Time series overview (The attached PDF file has better formatting.)! Model building! Time series plots Read Section 1.1, Examples of time series, on pages 1-8. These example introduce the book;

More information

Economics 618B: Time Series Analysis Department of Economics State University of New York at Binghamton

Economics 618B: Time Series Analysis Department of Economics State University of New York at Binghamton Problem Set #1 1. Generate n =500random numbers from both the uniform 1 (U [0, 1], uniformbetween zero and one) and exponential λ exp ( λx) (set λ =2and let x U [0, 1]) b a distributions. Plot the histograms

More information

ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests

ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests ECON/FIN 250: Forecasting in Finance and Economics: Section 7: Unit Roots & Dickey-Fuller Tests Patrick Herb Brandeis University Spring 2016 Patrick Herb (Brandeis University) Unit Root Tests ECON/FIN

More information

Empirical Approach to Modelling and Forecasting Inflation in Ghana

Empirical Approach to Modelling and Forecasting Inflation in Ghana Current Research Journal of Economic Theory 4(3): 83-87, 2012 ISSN: 2042-485X Maxwell Scientific Organization, 2012 Submitted: April 13, 2012 Accepted: May 06, 2012 Published: June 30, 2012 Empirical Approach

More information

Time Series Forecasting Model for Chinese Future Marketing Price of Copper and Aluminum

Time Series Forecasting Model for Chinese Future Marketing Price of Copper and Aluminum Georgia State University ScholarWorks @ Georgia State University Mathematics Theses Department of Mathematics and Statistics 11-18-2008 Time Series Forecasting Model for Chinese Future Marketing Price

More information

Applied Time Series Notes ( 1) Dates. ñ Internal: # days since Jan 1, ñ Need format for reading, one for writing

Applied Time Series Notes ( 1) Dates. ñ Internal: # days since Jan 1, ñ Need format for reading, one for writing Applied Time Series Notes ( 1) Dates ñ Internal: # days since Jan 1, 1960 ñ Need format for reading, one for writing ñ Often DATE is ID variable (extrapolates) ñ Program has lots of examples: options ls=76

More information

FORECASTING SUGARCANE PRODUCTION IN INDIA WITH ARIMA MODEL

FORECASTING SUGARCANE PRODUCTION IN INDIA WITH ARIMA MODEL FORECASTING SUGARCANE PRODUCTION IN INDIA WITH ARIMA MODEL B. N. MANDAL Abstract: Yearly sugarcane production data for the period of - to - of India were analyzed by time-series methods. Autocorrelation

More information

Time Series and Forecasting

Time Series and Forecasting Time Series and Forecasting Introduction to Forecasting n What is forecasting? n Primary Function is to Predict the Future using (time series related or other) data we have in hand n Why are we interested?

More information

3 Time Series Regression

3 Time Series Regression 3 Time Series Regression 3.1 Modelling Trend Using Regression Random Walk 2 0 2 4 6 8 Random Walk 0 2 4 6 8 0 10 20 30 40 50 60 (a) Time 0 10 20 30 40 50 60 (b) Time Random Walk 8 6 4 2 0 Random Walk 0

More information

Part 1. Multiple Choice (50 questions, 1 point each) Part 2. Problems/Short Answer (10 questions, 5 points each)

Part 1. Multiple Choice (50 questions, 1 point each) Part 2. Problems/Short Answer (10 questions, 5 points each) GROUND RULES: This exam contains two parts: Part 1. Multiple Choice (50 questions, 1 point each) Part 2. Problems/Short Answer (10 questions, 5 points each) The maximum number of points on this exam is

More information

Part II. Time Series

Part II. Time Series Part II Time Series 12 Introduction This Part is mainly a summary of the book of Brockwell and Davis (2002). Additionally the textbook Shumway and Stoffer (2010) can be recommended. 1 Our purpose is to

More information

arxiv: v1 [stat.me] 5 Nov 2008

arxiv: v1 [stat.me] 5 Nov 2008 arxiv:0811.0659v1 [stat.me] 5 Nov 2008 Estimation of missing data by using the filtering process in a time series modeling Ahmad Mahir R. and Al-khazaleh A. M. H. School of Mathematical Sciences Faculty

More information

Univariate, Nonstationary Processes

Univariate, Nonstationary Processes Univariate, Nonstationary Processes Jamie Monogan University of Georgia March 20, 2018 Jamie Monogan (UGA) Univariate, Nonstationary Processes March 20, 2018 1 / 14 Objectives By the end of this meeting,

More information

Non-Stationary Time Series and Unit Root Testing

Non-Stationary Time Series and Unit Root Testing Econometrics II Non-Stationary Time Series and Unit Root Testing Morten Nyboe Tabor Course Outline: Non-Stationary Time Series and Unit Root Testing 1 Stationarity and Deviation from Stationarity Trend-Stationarity

More information

Time Series Analysis -- An Introduction -- AMS 586

Time Series Analysis -- An Introduction -- AMS 586 Time Series Analysis -- An Introduction -- AMS 586 1 Objectives of time series analysis Data description Data interpretation Modeling Control Prediction & Forecasting 2 Time-Series Data Numerical data

More information

Forecasting using R. Rob J Hyndman. 2.4 Non-seasonal ARIMA models. Forecasting using R 1

Forecasting using R. Rob J Hyndman. 2.4 Non-seasonal ARIMA models. Forecasting using R 1 Forecasting using R Rob J Hyndman 2.4 Non-seasonal ARIMA models Forecasting using R 1 Outline 1 Autoregressive models 2 Moving average models 3 Non-seasonal ARIMA models 4 Partial autocorrelations 5 Estimation

More information

Classic Time Series Analysis

Classic Time Series Analysis Classic Time Series Analysis Concepts and Definitions Let Y be a random number with PDF f Y t ~f,t Define t =E[Y t ] m(t) is known as the trend Define the autocovariance t, s =COV [Y t,y s ] =E[ Y t t

More information

Lecture 5: Unit Roots, Cointegration and Error Correction Models The Spurious Regression Problem

Lecture 5: Unit Roots, Cointegration and Error Correction Models The Spurious Regression Problem Lecture 5: Unit Roots, Cointegration and Error Correction Models The Spurious Regression Problem Prof. Massimo Guidolin 20192 Financial Econometrics Winter/Spring 2018 Overview Stochastic vs. deterministic

More information

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MAS451/MTH451 Time Series Analysis TIME ALLOWED: 2 HOURS

NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION MAS451/MTH451 Time Series Analysis TIME ALLOWED: 2 HOURS NANYANG TECHNOLOGICAL UNIVERSITY SEMESTER II EXAMINATION 2012-2013 MAS451/MTH451 Time Series Analysis May 2013 TIME ALLOWED: 2 HOURS INSTRUCTIONS TO CANDIDATES 1. This examination paper contains FOUR (4)

More information

Lesson 13: Box-Jenkins Modeling Strategy for building ARMA models

Lesson 13: Box-Jenkins Modeling Strategy for building ARMA models Lesson 13: Box-Jenkins Modeling Strategy for building ARMA models Facoltà di Economia Università dell Aquila umberto.triacca@gmail.com Introduction In this lesson we present a method to construct an ARMA(p,

More information

Advanced Econometrics

Advanced Econometrics Advanced Econometrics Marco Sunder Nov 04 2010 Marco Sunder Advanced Econometrics 1/ 25 Contents 1 2 3 Marco Sunder Advanced Econometrics 2/ 25 Music Marco Sunder Advanced Econometrics 3/ 25 Music Marco

More information

APPLIED ECONOMETRIC TIME SERIES 4TH EDITION

APPLIED ECONOMETRIC TIME SERIES 4TH EDITION APPLIED ECONOMETRIC TIME SERIES 4TH EDITION Chapter 2: STATIONARY TIME-SERIES MODELS WALTER ENDERS, UNIVERSITY OF ALABAMA Copyright 2015 John Wiley & Sons, Inc. Section 1 STOCHASTIC DIFFERENCE EQUATION

More information

CHAPTER 21: TIME SERIES ECONOMETRICS: SOME BASIC CONCEPTS

CHAPTER 21: TIME SERIES ECONOMETRICS: SOME BASIC CONCEPTS CHAPTER 21: TIME SERIES ECONOMETRICS: SOME BASIC CONCEPTS 21.1 A stochastic process is said to be weakly stationary if its mean and variance are constant over time and if the value of the covariance between

More information

Final Examination 7/6/2011

Final Examination 7/6/2011 The Islamic University of Gaza Faculty of Commerce Department of Economics & Applied Statistics Time Series Analysis - Dr. Samir Safi Spring Semester 211 Final Examination 7/6/211 Name: ID: INSTRUCTIONS:

More information

Dynamic Time Series Regression: A Panacea for Spurious Correlations

Dynamic Time Series Regression: A Panacea for Spurious Correlations International Journal of Scientific and Research Publications, Volume 6, Issue 10, October 2016 337 Dynamic Time Series Regression: A Panacea for Spurious Correlations Emmanuel Alphonsus Akpan *, Imoh

More information

Nonstationary Time Series:

Nonstationary Time Series: Nonstationary Time Series: Unit Roots Egon Zakrajšek Division of Monetary Affairs Federal Reserve Board Summer School in Financial Mathematics Faculty of Mathematics & Physics University of Ljubljana September

More information

Classical Decomposition Model Revisited: I

Classical Decomposition Model Revisited: I Classical Decomposition Model Revisited: I recall classical decomposition model for time series Y t, namely, Y t = m t + s t + W t, where m t is trend; s t is periodic with known period s (i.e., s t s

More information

ARIMA Models. Jamie Monogan. January 25, University of Georgia. Jamie Monogan (UGA) ARIMA Models January 25, / 38

ARIMA Models. Jamie Monogan. January 25, University of Georgia. Jamie Monogan (UGA) ARIMA Models January 25, / 38 ARIMA Models Jamie Monogan University of Georgia January 25, 2012 Jamie Monogan (UGA) ARIMA Models January 25, 2012 1 / 38 Objectives By the end of this meeting, participants should be able to: Describe

More information

Analysis. Components of a Time Series

Analysis. Components of a Time Series Module 8: Time Series Analysis 8.2 Components of a Time Series, Detection of Change Points and Trends, Time Series Models Components of a Time Series There can be several things happening simultaneously

More information

MODELING MAXIMUM MONTHLY TEMPERATURE IN KATUNAYAKE REGION, SRI LANKA: A SARIMA APPROACH

MODELING MAXIMUM MONTHLY TEMPERATURE IN KATUNAYAKE REGION, SRI LANKA: A SARIMA APPROACH MODELING MAXIMUM MONTHLY TEMPERATURE IN KATUNAYAKE REGION, SRI LANKA: A SARIMA APPROACH M.C.Alibuhtto 1 &P.A.H.R.Ariyarathna 2 1 Department of Mathematical Sciences, Faculty of Applied Sciences, South

More information

Empirical Market Microstructure Analysis (EMMA)

Empirical Market Microstructure Analysis (EMMA) Empirical Market Microstructure Analysis (EMMA) Lecture 3: Statistical Building Blocks and Econometric Basics Prof. Dr. Michael Stein michael.stein@vwl.uni-freiburg.de Albert-Ludwigs-University of Freiburg

More information

BUSI 460 Suggested Answers to Selected Review and Discussion Questions Lesson 7

BUSI 460 Suggested Answers to Selected Review and Discussion Questions Lesson 7 BUSI 460 Suggested Answers to Selected Review and Discussion Questions Lesson 7 1. The definitions follow: (a) Time series: Time series data, also known as a data series, consists of observations on a

More information

9) Time series econometrics

9) Time series econometrics 30C00200 Econometrics 9) Time series econometrics Timo Kuosmanen Professor Management Science http://nomepre.net/index.php/timokuosmanen 1 Macroeconomic data: GDP Inflation rate Examples of time series

More information

Some Time-Series Models

Some Time-Series Models Some Time-Series Models Outline 1. Stochastic processes and their properties 2. Stationary processes 3. Some properties of the autocorrelation function 4. Some useful models Purely random processes, random

More information

11. Further Issues in Using OLS with TS Data

11. Further Issues in Using OLS with TS Data 11. Further Issues in Using OLS with TS Data With TS, including lags of the dependent variable often allow us to fit much better the variation in y Exact distribution theory is rarely available in TS applications,

More information

Homework 2. For the homework, be sure to give full explanations where required and to turn in any relevant plots.

Homework 2. For the homework, be sure to give full explanations where required and to turn in any relevant plots. Homework 2 1 Data analysis problems For the homework, be sure to give full explanations where required and to turn in any relevant plots. 1. The file berkeley.dat contains average yearly temperatures for

More information

Chapter 9: Forecasting

Chapter 9: Forecasting Chapter 9: Forecasting One of the critical goals of time series analysis is to forecast (predict) the values of the time series at times in the future. When forecasting, we ideally should evaluate the

More information

2. An Introduction to Moving Average Models and ARMA Models

2. An Introduction to Moving Average Models and ARMA Models . An Introduction to Moving Average Models and ARMA Models.1 White Noise. The MA(1) model.3 The MA(q) model..4 Estimation and forecasting of MA models..5 ARMA(p,q) models. The Moving Average (MA) models

More information

Romanian Economic and Business Review Vol. 3, No. 3 THE EVOLUTION OF SNP PETROM STOCK LIST - STUDY THROUGH AUTOREGRESSIVE MODELS

Romanian Economic and Business Review Vol. 3, No. 3 THE EVOLUTION OF SNP PETROM STOCK LIST - STUDY THROUGH AUTOREGRESSIVE MODELS THE EVOLUTION OF SNP PETROM STOCK LIST - STUDY THROUGH AUTOREGRESSIVE MODELS Marian Zaharia, Ioana Zaheu, and Elena Roxana Stan Abstract Stock exchange market is one of the most dynamic and unpredictable

More information

Time Series I Time Domain Methods

Time Series I Time Domain Methods Astrostatistics Summer School Penn State University University Park, PA 16802 May 21, 2007 Overview Filtering and the Likelihood Function Time series is the study of data consisting of a sequence of DEPENDENT

More information

Is the Basis of the Stock Index Futures Markets Nonlinear?

Is the Basis of the Stock Index Futures Markets Nonlinear? University of Wollongong Research Online Applied Statistics Education and Research Collaboration (ASEARC) - Conference Papers Faculty of Engineering and Information Sciences 2011 Is the Basis of the Stock

More information

Non-Stationary Time Series and Unit Root Testing

Non-Stationary Time Series and Unit Root Testing Econometrics II Non-Stationary Time Series and Unit Root Testing Morten Nyboe Tabor Course Outline: Non-Stationary Time Series and Unit Root Testing 1 Stationarity and Deviation from Stationarity Trend-Stationarity

More information

STAT 436 / Lecture 16: Key

STAT 436 / Lecture 16: Key STAT 436 / 536 - Lecture 16: Key Modeling Non-Stationary Time Series Many time series models are non-stationary. Recall a time series is stationary if the mean and variance are constant in time and the

More information

NATCOR Regression Modelling for Time Series

NATCOR Regression Modelling for Time Series Universität Hamburg Institut für Wirtschaftsinformatik Prof. Dr. D.B. Preßmar Professor Robert Fildes NATCOR Regression Modelling for Time Series The material presented has been developed with the substantial

More information

Lab: Box-Jenkins Methodology - US Wholesale Price Indicator

Lab: Box-Jenkins Methodology - US Wholesale Price Indicator Lab: Box-Jenkins Methodology - US Wholesale Price Indicator In this lab we explore the Box-Jenkins methodology by applying it to a time-series data set comprising quarterly observations of the US Wholesale

More information

Multiple Regression Analysis

Multiple Regression Analysis 1 OUTLINE Basic Concept: Multiple Regression MULTICOLLINEARITY AUTOCORRELATION HETEROSCEDASTICITY REASEARCH IN FINANCE 2 BASIC CONCEPTS: Multiple Regression Y i = β 1 + β 2 X 1i + β 3 X 2i + β 4 X 3i +

More information

7 Introduction to Time Series Time Series vs. Cross-Sectional Data Detrending Time Series... 15

7 Introduction to Time Series Time Series vs. Cross-Sectional Data Detrending Time Series... 15 Econ 495 - Econometric Review 1 Contents 7 Introduction to Time Series 3 7.1 Time Series vs. Cross-Sectional Data............ 3 7.2 Detrending Time Series................... 15 7.3 Types of Stochastic

More information

Lecture 8a: Spurious Regression

Lecture 8a: Spurious Regression Lecture 8a: Spurious Regression 1 Old Stuff The traditional statistical theory holds when we run regression using (weakly or covariance) stationary variables. For example, when we regress one stationary

More information

BCT Lecture 3. Lukas Vacha.

BCT Lecture 3. Lukas Vacha. BCT Lecture 3 Lukas Vacha vachal@utia.cas.cz Stationarity and Unit Root Testing Why do we need to test for Non-Stationarity? The stationarity or otherwise of a series can strongly influence its behaviour

More information

TIME SERIES ANALYSIS. Forecasting and Control. Wiley. Fifth Edition GWILYM M. JENKINS GEORGE E. P. BOX GREGORY C. REINSEL GRETA M.

TIME SERIES ANALYSIS. Forecasting and Control. Wiley. Fifth Edition GWILYM M. JENKINS GEORGE E. P. BOX GREGORY C. REINSEL GRETA M. TIME SERIES ANALYSIS Forecasting and Control Fifth Edition GEORGE E. P. BOX GWILYM M. JENKINS GREGORY C. REINSEL GRETA M. LJUNG Wiley CONTENTS PREFACE TO THE FIFTH EDITION PREFACE TO THE FOURTH EDITION

More information

Time series: Cointegration

Time series: Cointegration Time series: Cointegration May 29, 2018 1 Unit Roots and Integration Univariate time series unit roots, trends, and stationarity Have so far glossed over the question of stationarity, except for my stating

More information

5 Autoregressive-Moving-Average Modeling

5 Autoregressive-Moving-Average Modeling 5 Autoregressive-Moving-Average Modeling 5. Purpose. Autoregressive-moving-average (ARMA models are mathematical models of the persistence, or autocorrelation, in a time series. ARMA models are widely

More information

Elements of Multivariate Time Series Analysis

Elements of Multivariate Time Series Analysis Gregory C. Reinsel Elements of Multivariate Time Series Analysis Second Edition With 14 Figures Springer Contents Preface to the Second Edition Preface to the First Edition vii ix 1. Vector Time Series

More information

Forecasting. Simon Shaw 2005/06 Semester II

Forecasting. Simon Shaw 2005/06 Semester II Forecasting Simon Shaw s.c.shaw@maths.bath.ac.uk 2005/06 Semester II 1 Introduction A critical aspect of managing any business is planning for the future. events is called forecasting. Predicting future

More information

Cointegration, Stationarity and Error Correction Models.

Cointegration, Stationarity and Error Correction Models. Cointegration, Stationarity and Error Correction Models. STATIONARITY Wold s decomposition theorem states that a stationary time series process with no deterministic components has an infinite moving average

More information

EASTERN MEDITERRANEAN UNIVERSITY ECON 604, FALL 2007 DEPARTMENT OF ECONOMICS MEHMET BALCILAR ARIMA MODELS: IDENTIFICATION

EASTERN MEDITERRANEAN UNIVERSITY ECON 604, FALL 2007 DEPARTMENT OF ECONOMICS MEHMET BALCILAR ARIMA MODELS: IDENTIFICATION ARIMA MODELS: IDENTIFICATION A. Autocorrelations and Partial Autocorrelations 1. Summary of What We Know So Far: a) Series y t is to be modeled by Box-Jenkins methods. The first step was to convert y t

More information

TESTING FOR CO-INTEGRATION

TESTING FOR CO-INTEGRATION Bo Sjö 2010-12-05 TESTING FOR CO-INTEGRATION To be used in combination with Sjö (2008) Testing for Unit Roots and Cointegration A Guide. Instructions: Use the Johansen method to test for Purchasing Power

More information

ESSE Mid-Term Test 2017 Tuesday 17 October :30-09:45

ESSE Mid-Term Test 2017 Tuesday 17 October :30-09:45 ESSE 4020 3.0 - Mid-Term Test 207 Tuesday 7 October 207. 08:30-09:45 Symbols have their usual meanings. All questions are worth 0 marks, although some are more difficult than others. Answer as many questions

More information

SOME BASICS OF TIME-SERIES ANALYSIS

SOME BASICS OF TIME-SERIES ANALYSIS SOME BASICS OF TIME-SERIES ANALYSIS John E. Floyd University of Toronto December 8, 26 An excellent place to learn about time series analysis is from Walter Enders textbook. For a basic understanding of

More information

EXAMINATIONS OF THE ROYAL STATISTICAL SOCIETY

EXAMINATIONS OF THE ROYAL STATISTICAL SOCIETY EXAMINATIONS OF THE ROYAL STATISTICAL SOCIETY GRADUATE DIPLOMA, 011 MODULE 3 : Stochastic processes and time series Time allowed: Three Hours Candidates should answer FIVE questions. All questions carry

More information

Volatility. Gerald P. Dwyer. February Clemson University

Volatility. Gerald P. Dwyer. February Clemson University Volatility Gerald P. Dwyer Clemson University February 2016 Outline 1 Volatility Characteristics of Time Series Heteroskedasticity Simpler Estimation Strategies Exponentially Weighted Moving Average Use

More information

Unit root problem, solution of difference equations Simple deterministic model, question of unit root

Unit root problem, solution of difference equations Simple deterministic model, question of unit root Unit root problem, solution of difference equations Simple deterministic model, question of unit root (1 φ 1 L)X t = µ, Solution X t φ 1 X t 1 = µ X t = A + Bz t with unknown z and unknown A (clearly X

More information

10) Time series econometrics

10) Time series econometrics 30C00200 Econometrics 10) Time series econometrics Timo Kuosmanen Professor, Ph.D. 1 Topics today Static vs. dynamic time series model Suprious regression Stationary and nonstationary time series Unit

More information

Example: Baseball winning % for NL West pennant winner

Example: Baseball winning % for NL West pennant winner (38) Likelihood based statistics ñ ln( _) = log of likelihood: big is good. ñ AIC = -2 ln( _) + 2(p+q) small is good Akaike's Information Criterion ñ SBC = -2 ln( _) + (p+q) ln(n) Schwartz's Bayesian Criterion

More information