代写代考 CORPFIN 2503 – Business Data Analytics: Forecasting

ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
CORPFIN 2503 – Business Data Analytics: Forecasting
Week 10: October 11th, 2021
£ius CORPFIN 2503, Week 10 1/39

Copyright By PowCoder代写 加微信 powcoder

ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models
Forecasting
ACF and PACF plots
Finding AR order
Finding MA order
Estimating ARMA models
Forecasting
CORPFIN 2503, Week 10 2/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Introduction
In the previous lecture, we identi􏰔ed whether our time series is stationary or not.
The next step is to identify the model; that is, the values of p and q parameters (of ARMA(p,q) process).
We will use the auto correlation function (ACF) and partial auto correlation function (PACF) plots to identify the model.
£ius CORPFIN 2503, Week 10 3/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Auto correlation function
Auto correlation is the correlation between Yt upon its lagged values such as Yt−1.
The auto correlation function is a function of all such correlations at di􏰓erent lags.
The ACF is denoted by ρh, where h indicates the lag:
• ACF(0): Correlation at lag0 (ρ0) = Correlation of Yt with
itself = 1
• ACF(1): Correlation at lag1 (ρ1) = Correlation between Yt
• ACF(2): Correlation at lag2 (ρ2) = Correlation between Yt
• ACF(3): Correlation at lag3 (ρ3) = Correlation between Yt and Yt−3.
£ius CORPFIN 2503, Week 10 4/39

ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models
Forecasting
Partial auto correlation function
The partial auto correlation function is the partial correlations between Y and its previous values calculated at di􏰓erent lags.
Partial auto correlation is found by regressing Y on its lagged values.
The PACF is denoted by θh, where h indicates the lag:
• PACF(0): Partial correlation at lag0 (θ0) = Regression
coe􏰚cient of Yt when Yt is regressed on Yt = 1
• PACF(1): Partial correlation at lag1 (θ1) = Regression
coe􏰚cient of Yt−1 when Yt is regressed on Yt−1
• PACF(2): Partial correlation at lag2 (θ2) = Regression
coe􏰚cient of Yt−2 when Yt is regressed on Yt−1 and Yt−2
• PACF(3): Partial correlation at lag3 (θ3) = Regression
coe􏰚cient of Yt−3 when Yt is regressed on Yt−1, Yt−2, and Yt−3 .
£ius CORPFIN 2503, Week 10 5/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
ACF and PACF plots
SAS provides ACF and PACF plots as part of procedure ARIMA output.
Figure from last week:
IACF is the inverse autocorrelation function (beyond the scope of our course).
£ius CORPFIN 2503, Week 10 6/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
ACF and PACF plots II
In AR models, the current values of the series depend on its previous values.
=⇒ One can expect the auto correlation to follow a pattern in AR models.
In MA models, the current errors in the series depend on its previous error values.
=⇒ One can expect the partial auto correlation to follow a pattern in MA models.
£ius CORPFIN 2503, Week 10 7/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Finding AR order
The ACF for the AR process tails o􏰓 or dies down to zero.
If an ACF plot shows a reducing tendency toward zero, one can conclude that the process type is AR. E.g.:
Source: Konasani, V. R. and Kadre, S. (2015). 􏰐Practical Business Analytics Using SAS: A Hands-on Guide􏰑, p. 477 (part of Fig. 12-33).
£ius CORPFIN 2503, Week 10 8/39

ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Finding AR order II
If we identi􏰔ed that the process is AR(p), then we need to identify the order of the AR process (i.e., p).
One needs to look at the PACF to know the order of the series.
The cuto􏰓 lag of the PACF indicates the order of the AR process.
The signi􏰔cant (outside the shaded area) lag number indicates the order of the series.
£ius CORPFIN 2503, Week 10 9/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Finding AR order III
Figure below shows that the AR process is 2:
Source: Konasani, V. R. and Kadre, S. (2015). 􏰐Practical Business Analytics Using SAS: A Hands-on Guide􏰑, p. 478 (part of Fig. 12-34).
£ius CORPFIN 2503, Week 10 10/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Finding MA order
The method of identifying the MA process is almost the same as the AR process.
For an MA process, the PACF process (also IACF) slowly dies down.
Source: Konasani, V. R. and Kadre, S. (2015). 􏰐Practical Business Analytics Using SAS: A Hands-on Guide􏰑, p. 488 (part of Fig. 12-44).
£ius CORPFIN 2503, Week 10 11/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Finding MA order II
One needs to look at the ACF to know the order of the series.
The cuto􏰓 lag of the ACF indicates the order of the MA process.
The signi􏰔cant (outside the shaded area) lag number indicates the order of the series.
£ius CORPFIN 2503, Week 10 12/39

ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Finding MA order III
Figure below shows that the MA process is 2:
Source: Konasani, V. R. and Kadre, S. (2015). 􏰐Practical Business Analytics Using SAS: A Hands-on Guide􏰑, p. 488 (part of Fig. 12-44).
£ius CORPFIN 2503, Week 10 13/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Finding ARMA orders
When compared with pure AR and pure MA processes, it’s di􏰚cult to identify the orders of an ARMA process.
If the ACF dampens to zero, then it’s an AR process, and the PACF gives the order of the AR process.
If the PACF (IACF) dampens to zero, then it’s an MA process, and the order is decided by looking at the ACF plot.
But for an ARMA process, the ACF, PACF, and IACF will all behave the same way.
Though one can quickly identify that the process is an ARMA process, one will not be able to decide the orders.
£ius CORPFIN 2503, Week 10 14/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models
Finding ARMA orders
To determine the orders, one should to calculate:
• the smallest canonical correlation (SCAN) and
• extended sample auto correlation function (ESACF).
This is done by adding SCAN and ESACF options to SAS procedure ARIMA.
Forecasting
£ius CORPFIN 2503, Week 10
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models
Finding ARMA orders II
• Both SCAN and ESACF give a few options for p and q.
• SAS will recommend certain values for p+d and q; if time
series is stationary, then d is 0, thus p+d=p.
• Generally, a less complicated model with fewer parameters should be chosen over more complicated ones.
• Simple models yield better forecasts.
Forecasting
£ius CORPFIN 2503, Week 10

ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Finding ARMA orders III
SAS code for D_SALE and RET variables:
proc arima data=work.ibm2;
identify var=d_sale stationarity=(DICKEY) SCAN ESACF;
proc arima data=work.ibm;
identify var=ret stationarity=(DICKEY) SCAN ESACF;
£ius CORPFIN 2503, Week 10 17/39
ACF and PACF plots
Finding AR order Finding MA order Estimating ARMA models Forecasting
Finding ARMA orders IV
• Recommended model by both methods is ARMA(0,1).
£ius CORPFIN 2503, Week 10 18/39
ACF and PACF plots
Finding AR order Finding MA order Estimating ARMA models Forecasting
Finding ARMA orders V
• Recommended model by SCAN is ARMA(1,1).
• Recommended model by ESACF is ARMA(3,3).
• We should probably go with ARMA(1,1) as this is a simpler model.
CORPFIN 2503, Week 10
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Finding ARMA orders VI
Another way to select the model is to use:
• Akaike’s information criterion (AIC) and • Schwarz’s Bayesian criterion (SBC).
They are both provided as the standard output for SAS procedure ARIMA.
One can estimate several models and pick the one with the lowest values of AIC and SBC.
£ius CORPFIN 2503, Week 10 20/39

ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models
Forecasting
Estimating ARMA models
Let’s estimate ARMA(0,1) model for D_SALE variable using maximum likelihood (ML) estimator.
SAS code is as follows:
proc arima data=work.ibm2;
identify var=d_sale;
estimate p=0 q=1 method=ML;
£ius CORPFIN 2503, Week 10
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
SAS output:
Estimating ARMA models II
£ius CORPFIN 2503, Week 10 22/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models
Estimating ARMA models III
Mean (MU) is 1155.0.
MA(1) parameter is 􏰒0.46492.
The estimated model is:
Yt =μ+εt −MA(1)×εt−1
Yt =1155.0 + εt + 0.46492εt−1.
Forecasting
£ius CORPFIN 2503, Week 10
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models
Notation of AR models in SAS
The general format of AR(1) process is:
Yt = βYt−1 + εt. This can be rewritten taken into account μ:
Yt −μ=β(Yt−1 −μ)+εt or Yt =μ+β(Yt−1 −μ)+εt.
For AR(1) model, SAS procedure ARIMA provides estimates for MU and AR(1):
Yt =μ+AR(1)×(Yt−1 −μ)+εt. £ius CORPFIN 2503, Week 10
Forecasting

ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Estimating ARMA models IV
Let’s estimate ARMA(1,1) model for RET variable using maximum likelihood (ML) estimator.
SAS code is as follows:
proc arima data=work.ibm;
identify var=ret;
estimate p=1 q=1 method=ML;
£ius CORPFIN 2503, Week 10 25/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
SAS output:
Estimating ARMA models V
£ius CORPFIN 2503, Week 10 26/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models
Estimating ARMA models VI
Mean (MU) is 0.006.
MA(1) parameter is 0.32111.
AR(1) parameter is 0.35968.
The estimated model is:
Yt = 0.006 + 0.35968(Yt−1 − 0.006) + εt − 0.32111εt−1.
Forecasting
£ius CORPFIN 2503, Week 10
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models
Estimating ARMA models VII
Now let’s estimate ARMA(3,3) model for RET variable using maximum likelihood (ML) estimator.
SAS code is as follows:
proc arima data=work.ibm;
identify var=ret;
estimate p=3 q=3 method=ML;
Forecasting
£ius CORPFIN 2503, Week 10

ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
SAS output:
Estimating ARMA models VIII
£ius CORPFIN 2503, Week 10 29/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Estimating ARMA models VI
The estimated model is:
0.006 + 2.39970(Yt−1 − 0.006) − 2.27509(Yt−2 − 0.006)
+ 0.80949(Yt−3 − 0.006) + εt
− 2.44129εt−1 + 2.39493εt−2 − 0.91235εt−3.
According to AIC, ARMA(3,3) is superior.
According to SBC, ARMA(1,1) is superior.
Given the con􏰕icting results, ARMA(1,1) is a better model due to its simpler structure, but using ARMA(3,3) is also 􏰔ne.
£ius CORPFIN 2503, Week 10 30/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Forecasting
Once we estimated the parameters and created the 􏰔nal model equation, we need to substitute the historical values to get the forecasts.
We can also use SAS procedure ARIMA with FORECAST option in the code.
Let’s forecast the next 3 observations for D_SALE variable using SAS:
proc arima data=work.ibm2;
identify var=d_sale;
estimate p=0 q=1 method=ML;
forecast lead=3;
£ius CORPFIN 2503, Week 10 31/39
ACF and PACF plots Finding AR order
SAS output:
Finding MA order Estimating ARMA models Forecasting
Forecasting II
D_SALE forecast
􏰒30.5087 1155.0009 1155.0009
SALE SALE forecast Calculation 79139
79108.4913 =79139􏰒30.5087 80263.4922 =79108.4913+1155.0 81418.4931 =80263.4922+1155.0
Underlined values are computed (see the last column).
£ius CORPFIN 2503, Week 10 32/39

ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Additional SAS output:
Forecasting III
£ius CORPFIN 2503, Week 10 33/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Forecasting IV
Let’s forecast the next 3 observations for RET variable using SAS:
proc arima data=work.ibm;
identify var=ret;
estimate p=1 q=1 method=ML;
forecast lead=3;
proc arima data=work.ibm;
identify var=ret;
estimate p=3 q=3 method=ML;
forecast lead=3;
£ius CORPFIN 2503, Week 10 34/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Forecasting V
SAS output for ARMA(1,1) model:
£ius CORPFIN 2503, Week 10 35/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Forecasting VI
Additional SAS output:
£ius CORPFIN 2503, Week 10 36/39

ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models
Forecasting
Forecasting VII
SAS output for ARMA(3,3) model:
Results are somewhat di􏰓erent from those obtained using ARMA(1,1) model.
£ius CORPFIN 2503, Week 10
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Additional SAS output:
Forecasting VIII
£ius CORPFIN 2503, Week 10 38/39
ACF and PACF plots Finding AR order Finding MA order Estimating ARMA models Forecasting
Required reading
Konasani, V. R. and Kadre, S. (2015). 􏰐Practical Business Analytics Using SAS: A Hands-on Guide􏰑: chapter 12 (pp. 465-507).
£ius CORPFIN 2503, Week 10 39/39

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com