SV.prior_replications#

SV.prior_replications(n_replications=200, *, prior=None, seed=None)[source]#

Series the prior generates, one per prior draw of (mu, phi, sigma2).

The prior is the samplers’ prior, stated through the same record: Gaussian mu, Beta on (phi + 1) / 2, inverse-gamma sigma2; under heavy tails nu - 2 is exponential with the Gibbs sampler’s rate. The observation mean, on which the samplers put no informative prior, is held at the sample mean (or zero), as the particle chain holds it. Each replication starts its log variance from the stationary distribution the draw implies.

Parameters:
  • n_replications (int) – Replicated series.

  • prior (_VolatilityPrior | None) – The volatility prior; the Kim-Shephard-Chib default when omitted.

  • seed (int | Generator | None) – Seed or generator.

Return type:

NDArray[double]

Returns:

An array of shape (n_replications, n) aligned with observed.

Raises:

SpecificationError – If the count is not positive or the model carries leverage, on which the samplers state no prior.