arch.univariate.ARCH.forecast

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

Forecast volatility from the model.

Parameters:
parameters: ndarray[tuple[int], dtype[float64]] | Series

Parameters required to forecast the volatility model.

resids: ndarray[tuple[int], dtype[float64]] | Series

Residuals to use in the recursion.

backcast: float | ndarray[tuple[int], dtype[float64]]

Value to use when initializing the recursion.

var_bounds: ndarray[tuple[int, int], dtype[float64]]

2-d 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, between -len(resids) and len(resids). A negative value counts from the end, as in Python indexing, so that -1 is the last observation. Default is len(resids) - 1.

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. Not case sensitive.

simulations: int = 1000

Number of simulations to run when computing the forecast using either simulation or bootstrap. Must be 1 or larger.

rng: Callable[[int | tuple[int, ...]], ndarray[tuple[int, ...], 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’.

asym_weight: float = 0.5

Expected value of z**2 when z < 0, E[z**2 1(z < 0)], for the standardized distribution, which weights the variance in the expected value of the asymmetric terms of analytic forecasts. The default, 0.5, is exact for symmetric distributions. Only used by processes with an asymmetric term when method is ‘analytic’. Must be in [0, 1].

Returns:

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

Return type:

arch.univariate.volatility.VarianceForecast

Raises:
  • NotImplementedError –

    • If method is not supported

  • TypeError –

    • If start, horizon or simulations is not an integer * If method is not a string * If rng is not callable, or is missing when the method is ‘simulation’ * If random_state is not a RandomState or None * If asym_weight is not a real number

  • ValueError –

    • If the method is not known * If start is not in [-len(resids), len(resids)], horizon or simulations is smaller than 1, or asym_weight is not in [0, 1]

Notes

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