ScenarioType

class quantsupport.risk.ScenarioType

How a scenario shock is applied to a quote value.

Use the named class values or parse(); no value constructor is exposed.

Source declaration

Methods

static parse(s: str) → ScenarioType

Parse the interpretation of a market shock.

Parameters:

s (str) – Absolute or Relative, matched case-insensitively.

Returns:

Absolute for an additive shock or Relative for a fractional shock.

Return type:

ScenarioType

Raises:

QuantSupportError – If s is not a recognized scenario-type name.

Class Attributes

Absolute: ClassVar[ScenarioType]
Relative: ClassVar[ScenarioType]