time series building
DESCRIPTION
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 - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/1.jpg)
1
Time Series Building
-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
1. Model Identification
2. Parameter Estimation- Methods of moments, maximum likelihood, least squares
3. Diagnostic checking- check for adequacy
-Residual analysis:
Residuals behave like a white noiseAutocorrelation function of the residuals re(k) not differ significantly from zero- check the first k residual autocorrelations together
p
i
q
iitiititt yy
1 1
ˆˆˆˆˆ
)(~ 2
1
2 qpKXkrdNQK
ke
![Page 2: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/2.jpg)
2
Example
May exist some autocorrelation between the number of applications in the current week & the number of loan applications in the previous weeks
![Page 3: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/3.jpg)
3
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 patternAR(p) model
Sample PACF plot: -Cuts off after lag 2Use AR(2) model
![Page 4: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/4.jpg)
4
- Parameter estimates:Significant - Box-Pierce test: no autocorrelation-sample ACF & PACF: confirm also
42.0ˆ&27.0ˆ21
![Page 5: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/5.jpg)
5
Acceptable fit
Fitted values: smooth out the highs and lows in the data
![Page 6: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/6.jpg)
6
Example
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
![Page 7: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/7.jpg)
7
Residuals plot: changing variance- Violates the constant variance assumption
![Page 8: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/8.jpg)
8
- AR(1) model coefficient:Significant - Box-Pierce test: no autocorrelation-sample ACF & PACF: confirm also
9045.0ˆ
![Page 9: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/9.jpg)
9
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)
![Page 10: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/10.jpg)
10
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
![Page 11: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/11.jpg)
11
Forecast ARIMA process
How to obtain Best forecast
The mean square error for which the expected value of the squared forecast errors is minimized
22ˆ TTT eETyyE
Best forecast in the mean square sense
iiTiTTTT yyyETy ,/ˆ 1,
Forecast error
1
0
ˆ
i
iTiTTT Tyye
![Page 12: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/12.jpg)
12
21
0
22
1
0
21
0
)(
0
ii
iiTi
iiTiT
T
VarVareVar
eEVariance of the forecast errors: bigger with increasing forecast lead times
Prediction Intervals
Mean & variance
azTyyzTyP aTTaT
1ˆˆ
22
100(1-a) percent prediction interval
2
ˆ aT zTy
![Page 13: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/13.jpg)
13
iiTiTTTT yyyETy ,/ˆ 1, 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
q
iiti
dp
iititt yy
11
ˆˆ
![Page 14: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/14.jpg)
14
ARIMA(1,1,1) process
TT ByBB 111
1. Infinite MA representation of the model
2211
1
TT
iiTiTy
11ˆ TTT Ty
forecast
weights
BBBBB pp 111 110
Random shocks 1ˆ1 Tyye TTT
forecast
![Page 15: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/15.jpg)
15
2. Use difference equations
2ˆ1ˆ1ˆ2
11,,\ˆ1
1
1111
121
TTT
TTTTTTT
TTTTT
yyTy
eyyyyyETy
yyy
![Page 16: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/16.jpg)
16
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.
![Page 17: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/17.jpg)
17
SEASONAL PROCESS
ttt NSy St deterministic with periodicity s Nt stochastic, modeled ARMA
01 ts
stt SBSS
ts
ts
ts NBSByB 111
wt seasonally stationary process
ts
t BBwB 1Model Nt with ARMA
Assume after seasonal differencing ts
t yBw 1 becomes stationary
Seasonal ARMA model
tQsq
sst
Psp
ss BBBwBBB *2*2
*1
*2*2
*1 11
ts
t NBw 1
![Page 18: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/18.jpg)
18
Example
ARIMA model (p,d,q)x(P,D,Q) with period s
ts
tDsds BByBBBB ** 11
![Page 19: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/19.jpg)
19
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
-Eliminates seasonality-stationary
tt yBBw 1211
Sample ACF: significant value at lag 1Sample PACF : exponentially decaying values at the first 8 lagsUse non seasonal MA(1) model
Remaining seasonality: Sample ACF: significant value at lag 12Sample PACF : lags 12, 24,36 alternate in signUse seasonal MA(1) model
Example
![Page 20: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/20.jpg)
20
Coefficient estimates: MA(1) & seasonal MA(1) significantSample ACF & PACF plots: still some significant valuesBox-Pierce statistic: most of the autocorrelation is out
ARIMA(0,1,1)x(0,1,1)12
![Page 21: Time Series Building](https://reader036.vdocuments.site/reader036/viewer/2022062315/568160ff550346895dd03ef4/html5/thumbnails/21.jpg)
21
ARIMA(0,1,1)x(0,1,1)12 : reasonable fit