Algostream_advanced_models.Garch11Variance-targeting GARCH(1,1) for forward-looking volatility forecasting.
Model: sigma2 at time t equals omega + alpha * (return at t-1)^2 + beta * (sigma2 at t-1), with long-run variance equal to omega / (1 - alpha - beta). Variance targeting fixes omega = sample_variance * (1 - alpha - beta), reducing the maximum-likelihood fit to a two-parameter optimization over (alpha, beta) on the stationarity simplex (alpha >= 0, beta >= 0, alpha + beta < 1). Optimization is by Nelder-Mead with multiple restarts.
type fit_result = {params : params;log_likelihood : float;iter : int;converged : bool;long_run_variance : float;}val fit :
returns:float array ->
?max_iter:int ->
?tol:float ->
unit ->
(fit_result, fit_error) Stdlib.resultQuasi-MLE under Gaussian innovations. Returns Error if returns has fewer than 32 entries or if no restart converged.
val of_fit : fit_result -> last_return:float -> last_variance:float -> tval update : t -> r:float -> floatApply one new return; returns the next σ² forecast.
val current_variance : t -> floatval forecast : t -> horizon:int -> float arrayMulti-step sigma2 forecasts at horizons 1, 2, ..., horizon. Mean-reverts to the long-run variance at rate (alpha + beta).