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

Advertisements

Exponential smoothing in Nspire

This is a program for exponential smoothing, originally for the TI-89 Titanium as published in the Advanced Placement Statistics with the TI-89. The plotting functions for TI-89 are not plotted but it is easy to obtain a similar plot in the Nspire. Below is the DJIA example in the original text, Topic 43.

exsmooth

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