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:

Raises:
  • TypeError – If nobs or burn is not an integer, rng is not callable, or initial_value is not a number or an array of numbers.

  • ValueError – If parameters has the wrong length, nobs is smaller than 1, burn is negative or initial_value is NaN, inf, out of range or has the wrong length.

Notes

initial_value is 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_value is ignored by ConstantVariance, and FixedVariance does not support simulation.