Documente Academic
Documente Profesional
Documente Cultură
things
I assume that R and Rmetrics packages on your system have been installed.
"The Console version of Ox may be used without paying a fee for academic
research, study and teaching purposes only!"
- Check your email after a couple minutes, find link at bottom of message that
looks like
===========================================================
*** For Ox Console downloads (all platforms), go to :
http://www.doornik.com/download/..../....
===========================================================
The current version of Ox Console is 5.10 for Windows 2000/NT/9x. Now choose a
download site (you can use right-click to save to installation file):
Install 'oxcons510.exe' use the default directory C:\Program Files\OxMetr..
Finally copy the subdirectory 'Ox' to 'C:\'
2. You need a special G@RCH package. Despite the availability of the version
6, we will use the older 4.2
since the new one does not seem to work produce correct results. As a first
step, create a new directory(folder) on your PC: C:\Ox\Packages
[The subdirectory "packages" may exist already. In this case, you do not need
to create one.]
Put the file "Garchv42.zip" in it and unzip it into "C:\Ox\Packages"
####################################
3. Installation of the interface:
The interface file is GarchOxModelling_w.ox and can be downloaded from my
website
Copy this file to "C:\Ox\lib".
####################################
4. Place the function code garchoxfit_R_w.txt in your R work folder with
personal functions/libraries; you will have to access this file from within R
####################################
5) Using garchOxFit function in R:
Begin each R session with the following commands after changing your working
directory:
library(help="timeSeries")
######################################
### NOW back to the modeling
## Very important: A GARCH(r,m) model in the textbook and S-Plus is called a
GARCH(m, r) model in R.
## In other words, ARCH order is the 2nd argument in R.
## For example in the statement bellow: formula.var=~garch(0,4) specifies
that there are 4 terms in r_t (or a_t in the book) -- this is an ARCH(4) model
## The logic in R is the following: formula.var=~garch(m,r) specifies a formul
for variance. The first argument refers to itself (variance) and the second to
another argument (returns)
m1=garchOxFit(formula.mean=~arma(0,0),formula.var=~garch(0,5),series=intel.ret
urns)
m2=garchOxFit(formula.mean=~arma(0,0),formula.var=~garch(0,18),series=intel.re
turns) ## Why 5 and 11? recall the pacf(retuns^2) plot
m3=garchOxFit(formula.mean=~arma(0,0),formula.var=~garch(0,33),series=intel.re
turns) ## Why 5 and 11? recall the pacf(retuns^2) plot