src/univariatearchmodel.jl
changed.
Other files ignored by Codecov
test/runtests.jl
has changed.
215 | 215 | zt = residuals(am) |
|
216 | 216 | at = residuals(am, standardized=false) |
|
217 | 217 | themean = T(0) |
|
218 | - | if horizon > 1 && what == :VaR |
|
219 | - | error("Predicting VaR more than one period ahead is not implemented. Consider predicting one period ahead and scaling by `sqrt(horizon)`.") |
|
220 | - | end |
|
221 | - | for t = length(am.data) .+ (1 : horizon) |
|
222 | - | if what == :return || what == :VaR |
|
223 | - | themean = mean(at, ht, lht, am.data, am.meanspec, am.meanspec.coefs, t) |
|
224 | - | end |
|
218 | + | data = copy(am.data) |
|
219 | + | for t = length(data) .+ (1 : horizon) |
|
220 | + | themean = mean(at, ht, lht, data, am.meanspec, am.meanspec.coefs, t) |
|
225 | 221 | update!(ht, lht, zt, at, VS, am.spec.coefs) |
|
226 | 222 | push!(zt, 0.) |
|
227 | 223 | push!(at, 0.) |
|
224 | + | push!(data, themean) |
|
228 | 225 | end |
|
229 | 226 | if what == :return |
|
230 | 227 | return themean |
Files | Coverage |
---|---|
src | 99.55% |
Project Totals (12 files) | 99.55% |