This program uses maximum likelihood estimation for calibration of GARCH(1,1) Heston Nandi process as described in paper
A Closed-Form GARCH Option Valuation ModelInputs considered are :
1. Risk free rate
2. File containing array of asset prices eg.,
stockprices.txtFollowing is an example scenario for testing:
1.Execute octave script
nandigen.m2.stock prices are generated in C:\ Program Files\ GNU Octave 2.1.73\ octave_files\ stockprices.txt
3.Compile and run the Garch fitting program. (refer FAQ
HOW TO USE GSL in Dev C++ for details)
Following is example of input parameters in genrating file:
%------ Enter parameters --------------
lambda = 4;
omega = 8e-7; %constant intercept of model
alpha = 6e-7; %alpha of model - should control kurtosis
beta = 0.8;
gamma = 80; %gamma of model - should control skewness
r = 0.0; %continuosuly compounded rate
nstart=1; %no. of points after which the series is noted
nend=10000; %no. of observations
S0 = 100; %initial spot price
%--------------------------------------
Following is output values after running grachfit program:
lambda=7.61782 omega=6.91513e-007 alpha=5.82825e-007 beta=0.822984 gamma=85.0409
testval=0.827199
tmpsum=35799.2
converged to minimum after 300 iteration(s) at
Edit : Here is a link to the same program if you would like to use GSL in Visual C++ 2010:
http://www.quantcode.com/modules/docmanager/view_file.php?curent_file=361&curent_dir=19