[R-SIG-Finance] Different external regressor in rugarch give the same result
Dessy Anggraeni
dessy.anggraeni at gmail.com
Fri Mar 21 14:07:20 CET 2014
Hi all,
I use rugarch package 1.2-9 to measure rice price volatility volatility
with GARCH model including external regressor in the variance model.
This package works well, however, it seems like the result doesn't
response to change in value of external regressors.
I test 2 external regressors:
1.A matrix of dummy variable containing only 0 and 1
2.Cross-sectional stock level to price return data (attached)
Here is the code that I use. Can anybody advise me what's wrong?
Thanks a lot in advance.
Best Regards,
Dessy
*1.**With dummy variable (0 and 1) as external regressor*
# where the dummy variable is define as:
mat <- matrix(, nrow = n.row, ncol = 1)
for(i in 1:652){
mat[i,] <- 0
}
for(i in 501:n.row){
mat[i,] <- 1
}
spec2 <- ugarchspec(
variance.model =
list(model = "fGARCH", garchOrder = c(1,1), submodel = "GARCH",
external.regressors = mat, variance.targeting = FALSE),
mean.model =
list(armaOrder = c(12,0), external.regressors = NULL),
distribution.model = "norm")
fit = ugarchfit(spec = spec2, data=xz)
*2.**With crosssectional stock level estimation as external regressor*
# matrix m is cross sectional stock level data
m <- matrix(cross)
spec2 <- ugarchspec(
variance.model =
list(model = "fGARCH", garchOrder = c(1,1), submodel = "GARCH",
external.regressors = m, variance.targeting = FALSE),
mean.model =
list(armaOrder = c(12,0), external.regressors = NULL),
distribution.model = "norm")
fit = ugarchfit(spec = spec2, data=xz)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20140321/261446b4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rice return.csv
Type: application/vnd.ms-excel
Size: 62825 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20140321/261446b4/attachment.xlb>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cross sectional stock.csv
Type: application/vnd.ms-excel
Size: 53531 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20140321/261446b4/attachment-0001.xlb>
More information about the R-SIG-Finance
mailing list