SVForecastResult#

class impulso.results.SVForecastResult(*, idata, series_name, steps, index=None)[source]#

Bases: VARResultBase

Density forecast from a univariate SV model.

Parameters:
  • idata (InferenceData)

  • series_name (str)

  • steps (int)

  • index (Index | None)

idata#

InferenceData-schema container with ‘forecast’ in posterior_predictive.

series_name#

Name of the forecast series.

Type:

str

steps#

Number of forecast steps.

Type:

int

index#

Forecast axis, normally supplied by FittedSV.forecast — a DatetimeIndex continuing the observed calendar when the data’s frequency is detectable. None (the default) falls back to a step-numbered RangeIndex.

Type:

pandas.Index | None

hdi(prob=0.89)[source]#

Highest-density interval for the density forecast.

Parameters:

prob (float) – Probability mass for the HDI. Default 0.89.

Returns:

HDIResult with lower/upper DataFrames sharing the index of median().

Return type:

HDIResult

median()[source]#

Posterior median of the density forecast.

Returns:

DataFrame of median forecasts indexed by the forecast axis — calendar dates when available, otherwise step number.

Return type:

DataFrame

model_config = {'arbitrary_types_allowed': True, 'frozen': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

plot()[source]#

Plot the density forecast with HDI bands.

Returns:

Matplotlib Figure of the density forecast.

Return type:

Figure

to_dataframe()[source]#

Density forecast posterior median as a DataFrame.

Returns:

DataFrame of median forecasts indexed by the forecast axis.

Return type:

DataFrame