derivitec.risk_engine.types.EqSpotScenario¶
- class derivitec.risk_engine.types.EqSpotScenario(scenario_description=None, scenario_name=None, shock_size=0, shocks_by_equity_asset=None, shocks_by_country=None, shocks_by_region=None, vol_surface_spot_model=SpotModel.StickyDelta, sticky_smile_ratio=0.0, bump_cash_dividends=False, equity_vol_index_vol_surface_spot_model_id=None, vol_surface_spot_model_definitions=None)[source]¶
- __init__(scenario_description=None, scenario_name=None, shock_size=0, shocks_by_equity_asset=None, shocks_by_country=None, shocks_by_region=None, vol_surface_spot_model=SpotModel.StickyDelta, sticky_smile_ratio=0.0, bump_cash_dividends=False, equity_vol_index_vol_surface_spot_model_id=None, vol_surface_spot_model_definitions=None)[source]¶
- Parameters:
scenario_description – The scenario description
scenario_name – The scenario name
shock_size – The shock size
shocks_by_equity_asset – The shocks by equity asset (overrides the shocks by country)
shocks_by_country – The shocks by country (overrides the shocks by region)
shocks_by_region – The shocks by region (overrides the global shock)
vol_surface_spot_model – The vol surface spot model
sticky_smile_ratio – The sticky smile ratio
bump_cash_dividends – Whether the equity spot shock should also bump cash dividends by the same amount
equity_vol_index_vol_surface_spot_model_id – Exact user-defined model_id used when uploading volatility-index spot-model betas (for example “ExampleVixBetas”). Definitions are selected for the scenario market-data date and portfolio volatility indices using the market-data provider priority. None, empty or whitespace disables database loading; inline definitions still apply.
vol_surface_spot_model_definitions – Optional list of VolSurfaceSpotModelDefinition objects. Each replaces the entire stored definition for its resolved volatility-index asset or adds a new asset. Duplicate assets are rejected. The inline model_id is a label and need not match the base ID. Definitions are scenario-only: nothing is uploaded or saved. None or [] adds no overrides.
Methods
IsKeyValuePairListType(key_class_instance, ...)__init__([scenario_description, ...])json_params()JSON param names.
rebuild(content)Recursive rebuild.
recursive_decompose(item)Helper function to recursively convert some types to a suitable format for json.
to_dict()typename()