VARData#

class impulso.data.VARData(*, endog, endog_names, exog=None, exog_names=None, index)[source]#

Bases: ImpulsoBaseModel

Immutable, validated container for VAR estimation data.

Parameters:
endog#

Endogenous variable array of shape (T, n) where T >= 1 and n >= 2.

Type:

numpy.ndarray

endog_names#

Names for each endogenous variable.

Type:

list[str]

exog#

Optional exogenous variable array of shape (T, k).

Type:

numpy.ndarray | None

exog_names#

Names for each exogenous variable. Required if exog is provided.

Type:

list[str] | None

index#

DatetimeIndex of length T.

Type:

pandas.DatetimeIndex

Expand for references to impulso.data.VARData

Preparing Data for VARData / From a pandas DataFrame

Impulso

The conjugate VAR: fast Bayesian estimation / When to reach for ConjugateVAR instead of the NUTS VAR / Scope

Probabilistic Forecasts

Identification in structural VARs: Cholesky vs sign restrictions / A case study using U.S. monetary policy data / Impulse Response Function

Estimating a VAR after March 2020 / What this reproduction does and does not match

Oil supply news with an external instrument / How the announcement surprise identifies one shock

Fitting Your First Bayesian VAR

Stochastic volatility: modelling time-varying uncertainty / Model / Stochastic volatility inside a VAR

Structural Shocks in the Atmosphere

classmethod from_df(df, endog, exog=None)[source]#

Construct VARData from a pandas DataFrame.

Parameters:
  • df (DataFrame) – DataFrame with a DatetimeIndex.

  • endog (list[str]) – Column names for endogenous variables.

  • exog (list[str] | None) – Column names for exogenous variables (optional).

Returns:

Validated VARData instance.

Return type:

Self

Expand for references to impulso.data.VARData.from_df

Preparing Data for VARData / From a pandas DataFrame

Impulso

Stochastic volatility: modelling time-varying uncertainty / Model / Stochastic volatility inside a VAR

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

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