MJK_ch5a

advertisement

Time Series Building

1. Model Identification

-Simple time series plot : preliminary assessment tool for stationarity

-Non stationarity: consider time series plot of first (d th ) differences

-Unit root test of Dickey & Fuller : check for the need of differencing

-Sample ACF & PACF plots of the original time series or d th differences

-20-25 sample autocorrelations sufficient

2. Parameter Estimation

- Methods of moments, maximum likelihood, least squares

3. Diagnostic checking- check for adequacy

-Residual analysis:

 ˆ t

 y t



 ˆ  p i

1

 ˆ i y t

 i q    i

1

 ˆ i

 ˆ t

 i



Residuals behave like a white noise

Autocorrelation function of the residuals r e

(k) not differ significantly from zero

- check the first k residual autocorrelations together

Q

N

 d

 K r e

2

  k

1

~ X

2

( K

 p

 q )

1

May exist some autocorrelation between the number of applications in the current week & the number of loan applications in the previous weeks

2

Weekly data:

-Short runs

-Autocorrelation

-A slight drop in the mean for the 2 nd year (53-104 weeks) :

-Safe to assume stationarity

Sample ACF plot:

-Cuts off after lag 2 (or 3)

MA(2) or MA(3) model

-- Exponential decay pattern

AR(p) model

Sample PACF plot:

-Cuts off after lag 2

Use AR(2) model

3

- Parameter estimates:

Significant

 ˆ

1

0 .

27 &

 ˆ

2

- Box-Pierce test: no autocorrelation

-sample ACF & PACF: confirm also

0 .

42

4

Acceptable fit

Fitted values: smooth out the highs and lows in the data

5

Signs of non-stationarity:

-changing mean & variance

-Sample ACF: slow decreasing

-Sample PACF: significant value at lag 1, close to 1

Significant sample PACF value at lag 1: AR(1) model

6

Residuals plot: changing variance

- Violates the constant variance assumption

7

- AR(1) model coefficient:

Significant

 ˆ 

0 .

9045

- Box-Pierce test: no autocorrelation

-sample ACF & PACF: confirm also

8

Plot of the first difference:

-level of the first difference remains the same

Sample ACF & PACF plots: first difference white noise

RANDOM WALK MODEL, ARIMA(0,1,0)

9

Decide between the 2 models AR(1) & ARIMA(0,1,0)

-Use specific criteria

-Use subjective matter /process knowledge

Do we expect a financial index as the Dow Jones Index to be around a fixed mean, as implied by AR(1)?

ARIMA(0,1,0) takes into account the inherent non stationarity of the process

However

A random walk model means the price changes are random and cannot be predicted

Not reliable and effective forecasting model

Random walks models for financial data

10

Forecast ARIMA process

How to obtain Best forecast

The mean square error for which the expected value of the squared forecast errors is minimized

E

 y

T

 

 y

T

 

  

2

E

 e

T

 

2

Best forecast in the mean square sense

ˆ

T

 

E

 y

T

 

/ y

T , y

T

1

, 

  

  i

  i

T

   i

Forecast error e

T

 y

T

 

 y

ˆ

T

 

 i

1 

0

 i

T

   i

11

E

 e

T

Mean & variance

0

Var

 e

T

Var

 i

1 

0

 i

T

   i

 

2

 i

1 

0

 i

2  

2

 

1  i

0

 i

2

Var (

T

   i

)

Variance of the forecast errors: bigger with increasing forecast lead times

Prediction Intervals

P y

ˆ

T

 

 z a

2

  y

T

 

 ˆ

T

 

 z a

2

 

1

 a

100(1-a) percent prediction interval y

ˆ

T

 

 

 z a

  

2

12

ˆ

T

 

E

 y

T

 

/ y

T , y

T

1

, 

  

 

  i i

T

   i

2 problems

-Infinite many terms in the past, in practice have finite number of data

-Need to know the magnitude of random shocks in the past

-Estimate past random shocks through one-step forecasts

ARIMA model

 ˆ t

 y t

  i p

 d

1

 i y t

 i

 i q 

1

 i

 ˆ t

 i

13

ARIMA(1,1,1) process forecast

1

 

B



1

B

 y

T

 

1

 

B

 

T

 

1. Infinite MA representation of the model y

T

 

 i

1

 i

T

   i

 

1

T

  

1

 

2

T

  

2

  forecast y

ˆ

T

 

 

T

 

 

1

T

1

  weights

 

0

 

1

B

 

 

1

 

1

B

    p

B p

 

1

B

 

1

 

B

Random shocks e

T

 y

T

 y

T

T

1

14

2. Use difference equations y

T

 

1

   y

T

  

1

  y

T

  

2

 

T

 

 

T

  

1

 y

ˆ

T

1

1

 

E

 y

T

1

\ y

T

, y

T

1

, 

 

1

   y

T

  y

T

1

  e

T

 y

ˆ

T

 

2

  

1

   

T

 

1

  y

ˆ

T

  

2

15

Seasonality in a time series is a regular pattern of changes that repeats over S time periods, where S defines the number of time periods until the pattern repeats again.

16

Model N t with ARMA

S t

S t

 s

1

B s

S t

0

SEASONAL PROCESS y t

S t

N t

S t

N t deterministic with periodicity s stochastic, modeled ARMA

Assume after seasonal differencing

1

B s

  t

1

B s

  t

1

B s

N t w t

1

B s

N t w t seasonally stationary process

   w t

1

B s

    t w t

1

B s

 y t becomes stationary

Seasonal ARMA model

1

 

1

*

B s  

2

*

B

2 s    

* p

B

Ps

  t

1

 

1

*

B s  

2

*

B

2 s     q

*

B

Qs

 t

17

ARIMA model (p,d,q)x(P,D,Q) with period s

 *

 

 

1

B

 d

1

B s

D y t

    *

 

   t

18

Monthly seasonality, s=12:

-ACF values at lags 12, 24,36 are significant & slowly decreasing

-PACF values: lag 12 significant value close to 1

-Non-stationarity: slowly decreasing ACF

Remedy of non-stationarity: take first differences & seasonal differencing w t

 

1

B

 

1

B

12

 y t

-Eliminates seasonality

-stationary

Sample ACF: significant value at lag 1

Sample PACF : exponentially decaying values at the first 8 lags

Use non seasonal MA(1) model

Remaining seasonality:

Sample ACF: significant value at lag 12

Sample PACF : lags 12, 24,36 alternate in sign

Use seasonal MA(1) model

19

ARIMA(0,1,1)x(0,1,1)

12

Coefficient estimates: MA(1) & seasonal MA(1) significant

Sample ACF & PACF plots: still some significant values

Box-Pierce statistic: most of the autocorrelation is out

20

ARIMA(0,1,1)x(0,1,1)

12

: reasonable fit

21

Download