[R-SIG-Finance] Implied volatility as external regressors in rugarch?

Milos Cipovic pastirs at gmail.com
Mon Aug 25 05:59:28 CEST 2014


Hi there,
I was trying to redo in R excel exercises from Peter F. Christoffersen's
book Elements of Financial Risk Management.

I have different results for problem 3 on page 92 (chapter 4)
You can read it here:

http://books.google.rs/books?id=YkcMBGYbRasC&printsec=frontcover&dq=Elements+of+Financial+Risk+Management&hl=sr&sa=X&ei=K676U6PEJIb6PKWsgZAD&ved=0CBwQ6AEwAA#v=onepage&q&f=false

Here is my R code:


#################################################

library(gdata)
library(rugarch)
#   I downloaded data directly from book's companion site#
data=read.xls("http://booksite.elsevier.com/
               9780123744487/chapter_data_results/
               Chapter4_Results.xls",perl="C:\\Perl64\\bin\\perl.exe",
               sheet=3)
#  where perl="C:\\Perl64\\bin\\perl.exe" is location of pearl.exe file on
my machine,on your's it may differ   #

sandp=as.data.frame(data[,2])

returns=diff(log(sandp))

vix=as.data.frame(data[-1,4])

#scale to one day
ex.reg=(vix^2)/252

spec=ugarchspec(variance.model=list(model="fGARCH",garchOrder=c(1,1),submodel="NAGARCH",
external.regressors=ex.reg),mean.model=list(armaOrder=c(0,0),include.mean=F))

result=(ugarchfit(spec,returns))

coef(result)
likelihood(result)

# If you download excel sheet from
http://booksite.elsevier.com/9780123744487/chapter_data_results/Chapter4_Results.xls
#You'll see the difference in results in maximum likelihoods.
#SO,AM I DOING SOMETHING WRONG OR IS THIS JUST A NUMERICAL ERROR??
#(This may be a amateur question and I apologize for that) but I'm not
shore can I use implied volatility as an external regressor like I did here?

	[[alternative HTML version deleted]]



More information about the R-SIG-Finance mailing list