AR
AR stands for autoregressive model. Its basic concept is that future values depend on past values and they are estimated using a weighted average of the past values. The order of the AR model can be estimated by plotting the autocorrelation function and partial autocorrelation function of the series. In time series autocorrelation function measures correlation between series and it's lagged values. Whereas partial autocorrelation function measures correlation of a time series with its own lagged values, controlling for the values of the time series at all shorter lags. So first let us plot the acf
and pcf
of the series. Let us first plot the acf
plot by executing the following code:
> PriceData<-ts(StockData$Adj.Close, frequency = 5) > acf(PriceData, lag.max = 10)
This generates the autocorrelation plot as displayed here:
Figure 4.5: acf plot of price
Now let us plot pacf
by executing the following code:
> pacf(PriceData, lag.max = 10)
This generates the partial autocorrelation...