Open waynelapierre opened 3 years ago
That's certainly possible, though I feel that this is more flexibly handled on the user side. It's just a few lines of code really. There's an example for VaR backtesting in this notebook: https://github.com/s-broda/brownbag2018/blob/master/brownbag.ipynb
Basically the code amounts to
T = length(data)
windowsize = 1000
vars = similar(data); fill!(vars, NaN)
for t = windowsize+1:T-1
m = fit(GARCH{1, 1}, data[t-windowsize:t])
vars[t+1] = predict(m, :VaR; level=0.05)
end
Fitting these 7334 models takes 20 seconds :)
Having said that, I'm not necessarily opposed to the idea. I just lack the time at the moment. If somebody wants to take this up, they are more than welcome to.
It would be great if this package could provide some rolling estimation features. rugarch has this feature: https://cran.r-project.org/web/packages/rugarch/vignettes/Introduction_to_the_rugarch_package.pdf