I have a time series of S&P500 prices, for which I have calculated log-returns and roll-volatility. My goal is to forecast daily realized volatility and test a straddle strategy based on it (I have the full option chain time series on the same future underlying).
For the purpose, I am pondering 4 different R libraries. Being new to R, for all of them I would like to have the whole series of fitted values in a list, same for forecast ones.
These are the specs:
res <- svsample(op$ret, priormu = c(-10, 1), priorphi = c(20, 1.1), priorsigma = 0.1) pred <- predict(res, 2)
spec <- ugarchspec(mean.model = list(armaOrder = c(1, 1)), variance.model = list(model = 'eGARCH', garchOrder = c(2, 1)), distribution = 'nig') forecast <- ugarchforecast(spec, data = op$ret)
fit2=garchFit(~ garch(1,1), data = op$ret, include.mean=FALSE, trace=F)
fit1=garch(op$ret, order = c(1, 1), control = garch.control(trace = F)) predict(fit1, n.ahead=1, doplot=F)
Do you guys can help? Many thanks