arch.univariate.FIGARCH.simulate¶
-
FIGARCH.simulate(parameters: Sequence[int | float] | ndarray[tuple[int], dtype[float64]] | Series, nobs: int, rng: Callable[[int | tuple[int, ...]], ndarray[tuple[int, ...], dtype[float64]]], burn: int =
500, initial_value: float | ndarray[tuple[int, ...], dtype[float64]] | None =None) tuple[ndarray[tuple[int, ...], dtype[float64]], ndarray[tuple[int, ...], dtype[float64]]][source]¶ Simulate data from the model.
- Parameters:¶
- parameters: Sequence[int | float] | ndarray[tuple[int], dtype[float64]] | Series¶
Parameters required to simulate the volatility model.
- nobs: int¶
Number of data points to simulate. Must be 1 or larger.
- rng: Callable[[int | tuple[int, ...]], ndarray[tuple[int, ...], dtype[float64]]]¶
Callable function that takes a single integer input and returns a vector of random numbers.
- burn: int =
500¶ Number of additional observations to generate when initializing the simulation. Must be 0 or larger.
- initial_value: float | ndarray[tuple[int, ...], dtype[float64]] | None =
None¶ Scalar or array of initial values to use when initializing the simulation. The units depend on the process, see Notes. The values must be finite, and not negative except for EGARCH. An array has one element or as many as the process has initial values (the largest lag for most processes). EWMAVariance and RiskMetrics2006 accept a scalar only.
- Returns:¶
resids (
numpy.ndarray) – The simulated residuals.variance (
numpy.ndarray) – The simulated variance.
- Raises:¶
TypeError – If
nobsorburnis not an integer,rngis not callable, orinitial_valueis not a number or an array of numbers.ValueError – If
parametershas the wrong length,nobsis smaller than 1,burnis negative orinitial_valueis NaN, inf, out of range or has the wrong length.
Notes
initial_valueis the initial value of the quantity that the process updates, which is not always the variance \(\sigma^2\):\(\sigma^2\): ARCH, GARCH with
power=2, HARCH, MIDASHyperbolic, EWMAVariance and RiskMetrics2006.\(\sigma^{p}\): GARCH and FIGARCH with
power=p, which includes the absolute value (power=1) models.\(\sigma^{\delta}\): APARCH and FIAPARCH, where \(\delta\) is the power parameter of the process.
\(\ln \sigma^2\): EGARCH.
initial_valueis ignored by ConstantVariance, and FixedVariance does not support simulation.