ShockPath#

class impulso.scenario.ShockPath(*, shock, values, start=None, end=None)[source]#

Bases: ImpulsoBaseModel

Set a structural shock’s path over a window.

Values are in one-standard-deviation shock units — 0.0 switches the shock off. A scalar broadcasts to the full window; an explicit array must match the resolved window length. start/end are in-sample timestamps resolved against the lag-trimmed index (the historical_decomposition convention) and default to the full sample; forecast-side prescriptions (consumed by structural_scenario, arriving with that method) are positional from step 1 and must not carry start/end.

Parameters:
shock#

Name of the structural shock to set (a shock coordinate of the identification scheme; unidentified_* columns are rejected at application time).

Type:

str

values#

Scalar (broadcast) or 1-D array of replacement values in one-standard-deviation units.

Type:

float | np.ndarray

start#

Optional window start (in-sample edits only).

Type:

pd.Timestamp | None

end#

Optional window end, inclusive (in-sample edits only).

Type:

pd.Timestamp | None

Expand for references to impulso.scenario.ShockPath

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].