UCSVPosterior.forecast#

UCSVPosterior.forecast(steps, *, n_paths=2000, seed=None)[source]#

Predictive draws of the series, (n_paths, steps).

Each path picks a kept draw, then propagates both random-walk log variances and the trend forward and adds the irregular.

Within a step both log variances are advanced first, and the trend then moves with the advanced variance of its innovation. That is one period ahead of the timing the sampler and state_space use, where the step from \(t\) to \(t + 1\) is scaled by \(q_t\).

Kept draws are picked with replacement. n_paths is not validated: zero returns an empty array, and a negative value raises NumPy’s ValueError.

Parameters:
  • steps (int) – Horizons ahead, at least 1.

  • n_paths (int) – Predictive paths.

  • seed (int | None) – Seed.

Return type:

NDArray[double]

Returns:

Simulated future values, one row per path and one column per horizon.

Raises:

SpecificationError – If steps is not positive.