VariablePath#

class impulso.scenario.VariablePath(*, variable, values)[source]#

Bases: ImpulsoBaseModel

Pin a future endogenous variable’s path (hard condition, forecast axis).

Values run from forecast step 1; a scalar broadcasts to all steps, an array of length L < steps pins steps 1..L and leaves the rest free, and NaN entries mark unconstrained steps. Designed for the forecast-side conditioning methods (conditional_forecast, structural_scenario), which arrive with the next layers of the scenario stack.

Parameters:
variable#

Name of the endogenous variable to pin.

Type:

str

values#

Scalar (broadcast) or 1-D array of pinned values with NaN marking free steps.

Type:

float | np.ndarray

Expand for references to impulso.scenario.VariablePath

Counterfactuals, conditional forecasts, and structural scenarios / “What if” analysis in the style of Antolín-Díaz, Petrella & Rubio-Ramírez (2021) / The Lucas critique still applies

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

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