gcubed.projections.shock_coordinates
Convert additive database-unit shocks into the model's stored coordinates.
def
validate_shock_values( shocks: pandas.DataFrame, *, sym_data: gcubed.sym_data.SymData, source: str) -> None:
Reject nonfinite CSV values, including ignored later state entries.
def
apply_database_shocks( previous: pandas.DataFrame, shocks: pandas.DataFrame, *, sym_data: gcubed.sym_data.SymData, scaling_factors: pandas.Series, coordinate_database: gcubed.data.database.Database, source: str) -> pandas.DataFrame:
Return selected updated coordinates without changing the preceding path.
Shocks are additive database increments. GDP normalization and, for actual nominal FX, the coordinate anchor convert them into internal level units. Logged rows then use log1p of the increment relative to the previous level. Zero cells retain their original coordinates exactly.
G-Cubed