Results¶
Result objects for VAR post-estimation output.
FEVDResult
¶
Bases: VARResultBase
Result from forecast error variance decomposition.
Attributes:
| Name | Type | Description |
|---|---|---|
idata |
InferenceData
|
ArviZ InferenceData with FEVD draws. |
horizon |
int
|
Number of FEVD horizons. |
var_names |
list[str]
|
Names of variables. |
ForecastResult
¶
Bases: VARResultBase
Result from VAR forecasting.
Attributes:
| Name | Type | Description |
|---|---|---|
idata |
InferenceData
|
ArviZ InferenceData with forecast draws. |
steps |
int
|
Number of forecast steps. |
var_names |
list[str]
|
Names of forecasted variables. |
HDIResult
¶
Bases: ImpulsoBaseModel
Structured HDI output with separate lower/upper bounds.
Attributes:
| Name | Type | Description |
|---|---|---|
lower |
DataFrame
|
DataFrame of lower HDI bounds. |
upper |
DataFrame
|
DataFrame of upper HDI bounds. |
prob |
float
|
HDI probability level. |
HistoricalDecompositionResult
¶
Bases: VARResultBase
Result from historical decomposition.
Attributes:
| Name | Type | Description |
|---|---|---|
idata |
InferenceData
|
ArviZ InferenceData with decomposition draws. |
var_names |
list[str]
|
Names of variables. |
hdi(prob=0.89)
¶
median()
¶
Posterior median historical decomposition.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame indexed by a |
DataFrame
|
(after lag-trimming and any |
DataFrame
|
decomposition time), with a |
DataFrame
|
on columns. |
plot()
¶
Plot historical decomposition.
to_dataframe()
¶
Convert historical decomposition to DataFrame (passthrough to median()).
IRFResult
¶
Bases: VARResultBase
Result from impulse response function computation.
Attributes:
| Name | Type | Description |
|---|---|---|
idata |
InferenceData
|
ArviZ InferenceData with IRF draws. |
horizon |
int
|
Number of IRF horizons. |
var_names |
list[str]
|
Names of variables. |
hdi(prob=0.89)
¶
median()
¶
Posterior median IRF.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame indexed by horizon (integer 0..H) with a |
DataFrame
|
|
plot()
¶
Plot impulse response functions.
to_dataframe()
¶
Convert IRF to DataFrame (passthrough to median()).
LagOrderResult
¶
Bases: ImpulsoBaseModel
Result from lag order selection.
Attributes:
| Name | Type | Description |
|---|---|---|
aic |
int
|
Optimal lag order by AIC. |
bic |
int
|
Optimal lag order by BIC. |
hq |
int
|
Optimal lag order by Hannan-Quinn. |
criteria_table |
DataFrame
|
DataFrame of all criteria values by lag order. |
summary()
¶
Return the full criteria table.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame with information criteria for each lag order. |
SVForecastResult
¶
Bases: VARResultBase
Density forecast from a univariate SV model.
Attributes:
| Name | Type | Description |
|---|---|---|
idata |
InferenceData
|
InferenceData with 'forecast' in posterior_predictive. |
series_name |
str
|
Name of the forecast series. |
steps |
int
|
Number of forecast steps. |
hdi(prob=0.89)
¶
Highest-density interval for the density forecast.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prob
|
float
|
Probability mass for the HDI. Default 0.89. |
0.89
|
Returns:
| Type | Description |
|---|---|
HDIResult
|
HDIResult with lower/upper DataFrames for each forecast step. |
median()
¶
Posterior median of the density forecast.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame of median forecasts indexed by step. |
plot()
¶
Plot the density forecast with HDI bands.
Returns:
| Type | Description |
|---|---|
Figure
|
Matplotlib Figure of the density forecast. |
to_dataframe()
¶
Density forecast posterior median as a DataFrame.
Returns:
| Type | Description |
|---|---|
DataFrame
|
DataFrame of median forecasts indexed by step. |
VARResultBase
¶
Bases: ImpulsoBaseModel
Base class for VAR post-estimation results.
Subclasses that hold a single named DataArray in
idata.posterior_predictive (IRF, FEVD) declare its key via the
class-level _PRIMARY_KEY; this drives the shared
_guard_no_time_dim check.
Attributes:
| Name | Type | Description |
|---|---|---|
idata |
InferenceData
|
ArviZ InferenceData holding the result draws. |
hdi(prob=0.89)
abstractmethod
¶
Compute highest density interval.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prob
|
float
|
Probability mass for the HDI. Default 0.89. |
0.89
|
median()
abstractmethod
¶
Compute posterior median of the result.
plot()
abstractmethod
¶
Plot the result. Subclasses must implement.
to_dataframe()
abstractmethod
¶
Convert result to a tidy DataFrame.
VolatilityResult
¶
Bases: VARResultBase
Result from univariate SV fit — posterior of conditional SD.
Conditional SD is sigma_t = exp(h_t / 2), where h_t is the posterior log-volatility path.
Attributes:
| Name | Type | Description |
|---|---|---|
idata |
InferenceData
|
InferenceData with 'h' in posterior. |
series_name |
str
|
Name of the fitted series. |
index |
DatetimeIndex
|
DatetimeIndex aligned with the fitted series. |