I am trying to fit a multiplicative garch model, following the instructions in http://www.unstarched.net/2013/03/20/high-frequency-garch-the-multiplicative-component-garch-mcsgarch-model/. Though I am using 15 minutes interval for one month. When I run the last command I get the following error: "Error in optim(init[mask], armaCSS, method = optim.method, hessian = TRUE, : initial value in 'vmmin' is not finite. " For the daily variance I am using a sample that starts in 2010, otherwise I cannot estimate the daily variance. Tough for the intradaily data, I have data for just one month. I need to estimate this volatility measure for 110 stocks.
I would really appreciate some help. I don't know how to deal with this problem.
I provide the code, and the error I get for the last command.
sub <- subset(ITCH_volat, ITCH_volat$tickerid == 2,
select=c(returnmidend, time))
sub_t <- xts(sub$returnmidend, sub$time)
C = quantmod::getSymbols('AAPL', from = '2010-03-02',auto.assign=FALSE)
C = quantmod::adjustOHLC(C, use.Adjusted = TRUE)
R_d = TTR::ROC(Cl(C), na.pad = FALSE)
spec_d = ugarchspec(mean.model = list(armaOrder = c(1, 1)), variance.model
= list(model = 'eGARCH', garchOrder = c(2, 1)), distribution = 'nig')
roll = ugarchroll(spec_d, data = R_d['/2013-03-28'], forecast.length = n,
refit.every = 5, refit.window = 'moving', moving.size = 5, calculate.VaR =
FALSE)# extract the sigma forecast
df = as.data.frame(roll)
f_sigma = as.xts(df[, 'Sigma', drop = FALSE])
spec = ugarchspec(mean.model = list(armaOrder = c(1, 1), include.mean =
TRUE), variance.model = list(model = 'mcsGARCH'), distribution = 'nig')
fit = ugarchfit(data = sub_t, spec = spec, DailyVar = f_sigma^2)
The last command gives me the following error:
Error in optim(init[mask], armaCSS, method = optim.method, hessian = TRUE, : initial value in 'vmmin' is not finite
Thank you!