mario.Database.shock_calc

Database.shock_calc(io, z=False, e=False, v=False, Y=False, notes=[], scenario=None, force_rewrite=False, **clusters)

Implements shocks on different matrices with the possibility of defining clusters on every level of information.

Note

  • Shocks can be implemented only with respect to the baseline

  • Shocks will be implemented only on coefficients

Parameters:
  • io (str, Dict[pd.DataFrame]) – pass a str defining the excel file containing the shock data or pass a dict of dataframes in which keys are the name of matrices and values are the dataframes of the shock (exactly the same format of excel file)

  • z (boolean) – if True will implement shock on the Z or z

  • e (boolean) – if True will implement shock on the E or e

  • v (boolean) – if True will implement shock on the V or v

  • Y (boolean) – if True will implement shock on Y

  • notes (list) – extra info can be recoreded in the metadata

  • scenario (str, Optional) – the name for the scenario implemented, in the instance.matrices. If nothing passed, default names will be considered (shock #)

  • fore_rewrite (boolean) – if False will avoid overwriting existing scenario

  • **cluster (dict) – can be used to implement complex shocks by defining clusters (refer to tutorials)