arch.univariate.volatility.VolatilityProcess.forecast¶
-
VolatilityProcess.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[source]¶ 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)andlen(resids). A negative value counts from the end, as in Python indexing, so that -1 is the last observation. Default islen(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:¶
- Raises:¶
If method is not supported
If
start,horizonorsimulationsis not an integer * Ifmethodis not a string * Ifrngis not callable, or is missing when the method is ‘simulation’ * Ifrandom_stateis not a RandomState or None * Ifasym_weightis not a real number
If the method is not known * If
startis not in [-len(resids), len(resids)],horizonorsimulationsis smaller than 1, orasym_weightis not in [0, 1]
Notes
The analytic
methodis not supported for all models. Attempting to use this method when not available will raise a ValueError.