ARMA Processes
ARMA Processes
ARMA Processes
ARMA processes
Jesús Ramirez
1. ARMA processes
4. Estimation
1
ARMA processes
Autoregressive Processes
AR processes
where ε ∼ WN(0, σ 2 )
2
Moving Average Processes
MA processes
where ε ∼ WN(0, σ 2 )
3
Autoregressive Moving Average Processes
ARMA processes
where ε ∼ WN(0, σ 2 )
4
Partial Autocorrelation Function
Definition
Let Yt be a AR process, the partial autocorrelation between Yt and
Yt−s is the autocorrelation that eliminates the effects of the
intermediate values Yt−1 through Yt−s+1 .
5
How to compute the PACF
Procedure
6
Plotting the ACF and PACF
8
Testing Sample Autocorrelation
Sample Autocorrelation
1∑ 1∑
T T
ȳ = yt , σ̂ 2 = (yt − ȳ)2
T t=1 T t=1
∑T
t=j+1 (yt − ȳ)(yt−j − ȳ)
1
T−j
ρ̂j = ∑T
T
1
t=1 (yt − ȳ)2
9
Test on Individual Autocorrelation Coefficients
Bartlett t-statistic
iid
If data ∼ N (µ, σ 2 ), then the asymptotic distribution of ρ̂ is
( )
1
ρ̂j ∼ N 0,
T
ρ̂j √
tρ̂j = = Tρ̂j ∼ N (0, 1)
s.e.(ρ̂j )
10
Test on Individual Autocorrelation Coefficients
Robust t-statistic
Yt = β0 + β1 Yt−j + et
11
Joint Test on many Autocorrelation
Ljung-Box Q-statistic
iid
If data ∼ N (µ, σ 2 ), we can test:
H0 : ρ1 = ρ2 = ... = ρL = 0 vs H1 : ρj ̸= 0, j = 1, 2, ..., L
∑
L
1 2
QLB (L) = T(T + 2) ρ̂ ∼ χ2L
T−j j
j=1
12
Joint Test on many Autocorrelation
Robust approach
You can test for serial correlation up to given lag L by estimating
the following regression:
H0 : β1 = β2 = ... = βL = 0 vs H1 : βj ̸= 0, j = 1, 2, ..., L
13
R2 and ARMA processes
Predictability
Var(εt+1 )
R2 = 1 −
Var(Yt+1 )
Challenge: Example 1
Let Y1 be an AR(1) process defined as Yt+1 = ϕ0 + ϕ1 Yt + εt+1 , where
εt+1 ∼ WN(0, σ 2 ). Compute the R2 from this model.
14
Challenge
Example 2
Let Yt and Xt be two AR(1) and MA(1) processes where
1. Find the variance of the forecast error for the optimal one-step
and two-step forescast of each Yt and Xt
2. Find the values of θ and σ 2 that makes Yt and Xt equally
predictable (according to the variance of the forecast errors) for
the one-step and two-step ahead forecast.
3. Given these values, which variable is easier to predict
three-steps ahead?
15
Choosing the best ARMA model
1∑
T
MSE = et
T t=1
1 Overfitting lowers MSE of a model, but ruins its ability for forecasting
16
Goodness of Fit Measures
1 ∑
T
s= et
T − k t=1
17
Goodness of Fit Measures
Information criteria
The AIC, HQIC and BIC2 , are defined as:
• The AIC and BIC are the two most widely-used model selection
criteria.
• The BIC choose smaller models, which is generally a good thing
for forecasting.
• The AIC tends to choose larger models.
2 AIC, HQIC and BIC stand for Akaike Information Criterion, Hannan-Quinn Information
Criterion and Schwartz’s Bayesian Information Criterion, respectively
18
Estimation
ARMA estimation
3 For example, you can perform the Ljung-Box with m − p degrees of freedom
19
MA(1) estimation
Procedure
εt = Yt − θ0 − θ1 εt−1
20
MA(1) estimation
iid
• If we assumed that εt ∼ N (0, σε2 ), then its density function is:
( )
1 ε2
f(εt ) = √ exp − t 2
2πσε2 2σε
21
MA(1) estimation
Procedure
∏
T ( )
1 ε2
L(Y1 , Y2 , ..., YT |θ0 , θ1 , σε2 ) = √ exp − t 2
2πσε2 2σε
i=1
T T ∑ ε2 T
t
l(Y1 , Y2 , ..., YT |θ0 , θ1 , σε2 ) = − ln(2π) − ln(σε2 ) −
2 2 2σε2
i=1
22
Estimation Procedure
Simple recipe
23
Programming Challenge
Example 1
Yt = −0.7Yt−1 + εt − 0.7εt−1
where Y0 and ε0 will be set to zero (In R set the random seed to
my favorite prime number, 2)
2. Now, imagine that you do not know the true data-generating
process and identify 3 potential models for your data.
3. Estimate those models and compute the statistics that are
mentioned in Simple recipe.
24