Category Archives: Forecasting

GARCH model in R

A much more practical approach than calculating GARCH parameters on a calculator is to do it in R. Not only is there is available packages, retrieving financial data for experimenting is also a piece of cake as the facilities built-in offered convenient access to historical data.

To use GARCH in R the library must be installed first.

fgarch1

To test the library, data are imported using the tSeries package.

fgarch2

 

A plot of the log return.

fgarch3a

fgarch3

 

Before running the GARCH model, a QQ plot is reviewed.

fgarch4a
fgarch4

 

Finally, the GARCH model is created using the command below.

fgarch6

 

Density plot.

fgarch5a

fgarch5

 

With trace=off a clean model can be printed after running the model.

fgarch7

ARIMA ACF/PACF Correlogram in Nspire

During the identification phase of the Box-Jenkins models, a correlogram charting the ACF and PACF are useful. The color screen of the TI Nspire is perfect to visualize the output from the program calculating these values. Here is the classical plot on the example airline passenger data from the original time series analysis text: Time Series Analysis: Forecasting and Control.

arima-acf