s-broda / ARCHModels.jl

A Julia package for estimating ARMA-GARCH models.
https://juliaeconometrics.wordpress.com/
Other
90 stars 18 forks source link

Multi-step forecast error #84

Closed azev77 closed 3 years ago

azev77 commented 3 years ago

Multi-step forecasts (for returns etc) were implemented in #61 The following works

using ARCHModels;

BG96
am = fit(GARCH{1, 1}, BG96)
predict.(am, :volatility, 1:3)
predict.(am, :return, 1:3)

am = fit(ARCH{0}, BG96)
predict.(am, :volatility, 1:3)
predict.(am, :return, 1:3)

am = fit(ARCH{0}, BG96, meanspec=ARMA{12,0})
predict.(am, :volatility, 1:3)

I get the following errors:

julia> predict.(am, :return, 1:3)
ERROR: BoundsError: attempt to access 1974-element Array{Float64,1} at index [1975]
azev77 commented 3 years ago

@SebRollen's PR https://github.com/s-broda/ARCHModels.jl/pull/83 fixes this