arch.univariate.volatility.VolatilityProcess.forecast

VolatilityProcess.forecast(parameters: ndarray | Series, resids: ndarray[Any, dtype[float64]], backcast: float | ndarray[Any, dtype[float64]], var_bounds: ndarray[Any, dtype[float64]], start: int | None = None, horizon: int = 1, method: 'analytic' | 'simulation' | 'bootstrap' = 'analytic', simulations: int = 1000, rng: Callable[[int | tuple[int, ...]], ndarray[Any, dtype[float64]]] | None = None, random_state: RandomState | None = None) VarianceForecast[source]

Forecast volatility from the model

Parameters:
parameters: ndarray | Series

Parameters required to forecast the volatility model

resids: ndarray[Any, dtype[float64]]

Residuals to use in the recursion

backcast: float | ndarray[Any, dtype[float64]]

Value to use when initializing the recursion

var_bounds: ndarray[Any, dtype[float64]]

Array containing columns of lower and upper bounds

start: int | None = None

Index of the first observation to use as the starting point for the forecast. Default is len(resids).

horizon: int = 1

Forecast horizon. Must be 1 or larger. Forecasts are produced for horizons in [1, horizon].

method: 'analytic' | 'simulation' | 'bootstrap' = 'analytic'

Method to use when producing the forecast. The default is analytic.

simulations: int = 1000

Number of simulations to run when computing the forecast using either simulation or bootstrap.

rng: Callable[[int | tuple[int, ...]], ndarray[Any, dtype[float64]]] | None = None

Callable random number generator required if method is ‘simulation’. Must take a single shape input and return random samples numbers with that shape.

random_state: RandomState | None = None

NumPy RandomState instance to use when method is ‘bootstrap’

Returns:

forecasts – Class containing the variance forecasts, and, if using simulation or bootstrap, the simulated paths.

Return type:

arch.univariate.volatility.VarianceForecast

Raises:

Notes

The analytic method is not supported for all models. Attempting to use this method when not available will raise a ValueError.