### MJK_ch5a

```Time Series Building
1. Model Identification
-Simple time series plot : preliminary assessment tool for stationarity
-Non stationarity: consider time series plot of first (dth) differences
-Unit root test of Dickey & Fuller : check for the need of differencing
-Sample ACF & PACF plots of the original time series or dth differences
-20-25 sample autocorrelations sufficient
2. Parameter Estimation
- Methods of moments, maximum likelihood, least squares
3. Diagnostic checking- check for adequacy
-Residual analysis:

p
q


i 1
i 1

ˆt  yt   ˆ   ˆi yt i   ˆiˆt i 
Residuals behave like a white noise
Autocorrelation function of the residuals re(k) not differ significantly from zero
- check the first k residual autocorrelations together
K
Q  N  d  re2 k  ~ X 2 ( K  p  q)
k 1
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 2nd
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: ˆ1  0.27 &ˆ2  0.42
Significant
- Box-Pierce test: no autocorrelation
-sample ACF & PACF: confirm also
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: ˆ  0.9045
Significant
- 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  yT   yˆT  T   E eT  
2
2

Best forecast in the mean square sense

yˆT  T   EyT  / yT , yT 1 ,     i T  i
i 
Forecast error
 1
eT    yT   yˆT  T    i T  i
i 0
11
Mean & variance
E eT    0
  1
  1
VareT    Var  i T  i    i2Var ( T  i )
 i 0
 i 0
Variance of the forecast errors: bigger with
 1
  2  i2   2  
i 0
Prediction Intervals
P yˆT  T   z a     yT   yˆT  T   z a     1  a
2
2


100(1-a) percent prediction interval
yˆT  T   z a   
2
12

yˆT  T   EyT  / yT , yT 1 ,     i T  i
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
pd
q


ˆt  yt     i yt i    iˆt i 
i 1
i 1


13
ARIMA(1,1,1) process
forecast
1  B1  ByT   1 BT 
1. Infinite MA representation of the model

yT    i T  i
i 1
  1 T  1  2 T  2  
forecast
yˆT  T      T   1 T 1  
weights
 0 1B 11B p B p 1 B  1B
Random shocks
eT 1  yT  yˆT T  1
14
2. Use difference equations
yT   1    yT  1  yT   2   T   T  1
 1
yˆT 1 T   E  yT 1 \ yT , yT 1 ,   1    yT  yT 1  eT 1
 2
yˆT  T   1    yˆ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
SEASONAL PROCESS
St deterministic with periodicity s
Nt stochastic, modeled ARMA
yt  St  Nt


St  St s  1  Bs St  0
1  B y  1  B S  1  B N
s
s
t
s
t

t

wt  1  B s Nt
wt seasonally stationary process
Bwt  1  Bs B t
Model Nt with ARMA
wt  1  B s yt
Assume after seasonal differencing
becomes stationary
Seasonal ARMA model
1 B
*
1
s



 2*B2s   p* BPs wt  1 1*Bs 2*B2s q*BQs  t
17
ARIMA model (p,d,q)x(P,D,Q) with period s
 

 * B s B 1  B  1  B s
d

D
 
yt    * B s B  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


wt  1  B 1  B12 yt
-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
```