s-broda / ARCHModels.jl

Compare 0ab2ae0 ... +4 ... 77e5741

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 2 files from the diff.
Other files ignored by Codecov
test/runtests.jl has changed.

@@ -205,9 +205,11 @@
Loading
205 205
206 206
"""
207 207
    predict(am::UnivariateARCHModel, what=:volatility; level=0.01, horizon=1)
208 -
Form a 1-step ahead prediction from `am`. `what` controls which object is predicted.
208 +
Form a `horizon`-step ahead prediction from `am`. `what` controls which object is predicted.
209 209
The choices are `:volatility` (the default), `:variance`, `:return`, and `:VaR`. The VaR
210 210
level can be controlled with the keyword argument `level`.
211 +
212 +
For `what=:VaR`, only a `horizon = 1` horizon is currently supported.
211 213
"""
212 214
function predict(am::UnivariateARCHModel{T, VS, SD}, what=:volatility, horizon=1; level=0.01) where {T, VS, SD, MS}
213 215
	ht = volatilities(am).^2
@@ -218,13 +220,15 @@
Loading
218 220
	if horizon > 1 && what == :VaR
219 221
		error("Predicting VaR more than one period ahead is not implemented. Consider predicting one period ahead and scaling by `sqrt(horizon)`.")
220 222
	end
221 -
	for t = length(am.data) .+ (1 : horizon)
223 +
    data = copy(am.data)
224 +
	for t = length(data) .+ (1 : horizon)
222 225
		if what == :return || what == :VaR
223 226
			themean = mean(at, ht, lht, am.data, am.meanspec, am.meanspec.coefs, t)
224 227
		end
225 228
		update!(ht, lht, zt, at, VS, am.spec.coefs)
226 229
		push!(zt, 0.)
227 230
		push!(at, 0.)
231 +
        push!(data, themean)
228 232
	end
229 233
	if what == :return
230 234
		return themean

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
src +<.01% 99.55%
Project Totals (12 files) 99.55%
Loading