( Stationarity Check ) Does \(X_t\) look stationary?
( De-mean ) Is the mean of this process 0?
( Model Selection ) What model should we use? AR(p)? or something else?
( Order Selection ) How did we decide on the value of \(p\) to fit?
( Paramete Estimation ) What estimator was used for \(\phi_1, \phi_2, \phi_3\)? What is the accuracy of the estimation, and what does it say about the choice of \(p\)? Test for the parameter significance using the Standrad Error of the estimators. Can you reject he null hypothesis that \(\phi_i=0\)?
( Residual Analysis ) How was the residual calculated? What does it say about how the model fits the data?
# read in daily Dow Jones data from my website
D = read.csv("https://nmimoto.github.io/datasets/dowj.csv")
head(D) # see only first 6 lines
## dowj
## 1 110.94
## 2 110.69
## 3 110.43
## 4 110.56
## 5 110.75
## 6 110.84
## [1] FALSE
## [1] 110.94 110.69 110.43 110.56 110.75 110.84
## [1] TRUE
## [1] -0.0022560132 -0.0023516653 0.0011765240 0.0017170489 0.0008123111
## [6] -0.0034342555
layout(matrix(1:2, 1, 2)) # make next two plot side by side (you don't have to do this)
acf(X) # Sample ACF
pacf(X) # Sample Partial ACF (see below)
layout(1) # turn it back to 1 plot layout
#--- Fit AR(1) ---
library(forecast) # install.packages("forecast")
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
## Series: X
## ARIMA(1,0,0) with zero mean
##
## Coefficients:
## ar1
## 0.5042
## s.e. 0.0996
##
## sigma^2 estimated as 1.094e-05: log likelihood=330.89
## AIC=-657.78 AICc=-657.62 BIC=-653.09
In this example, \(Y_t\) was the original data: \[ Y_t = \mbox{daily colse price of Dow Jones from 1972} \] Then the series was transformed to log-difference, \[ X_t = \ln(Y_t)-\ln(Y_{t-1} = \ln(Y_t/Y_{t-1}) \] which represents apprximate percentage of daily gain/loss of any financial data.
To \(X_t\), AR(1) was fit. That means \(X_t\) was modeled by the model: \[
X_t = \phi_1 X_{t-1} + \epsilon_t
\hspace10mm \mbox{ where } \epsilon_t \sim WN(0,\sigma^2).
\] All parameter estimates, \(\hat \phi_1, \hat \sigma\), were calculated.
## Series: X
## ARIMA(1,0,0) with zero mean
##
## Coefficients:
## ar1
## 0.5042
## s.e. 0.0996
##
## sigma^2 estimated as 1.094e-05: log likelihood=330.89
## AIC=-657.78 AICc=-657.62 BIC=-653.09
- For large-sample MLE \(\hat \phi\), parameter significance can be tested by calculating CI \[ \hat \phi \pm 2(\mbox{Standard Error}) \] and checking if 0 is inside the CI or not. (0 is inside = not significant).