Abstract base class defining the interface for a SIMM configuration. More...
#include <orea/simm/simmconfiguration.hpp>
Public Types | |
enum class | SimmSide { Call , Post } |
Enum indicating the relevant side of the SIMM calculation. | |
enum class | RiskClass { InterestRate , CreditQualifying , CreditNonQualifying , Equity , Commodity , FX , All } |
enum class | RiskType { Commodity , CommodityVol , CreditNonQ , CreditQ , CreditVol , CreditVolNonQ , Equity , EquityVol , FX , FXVol , Inflation , IRCurve , IRVol , InflationVol , BaseCorr , XCcyBasis , ProductClassMultiplier , AddOnNotionalFactor , Notional , AddOnFixedAmount , PV , All } |
enum class | MarginType { Delta , Vega , Curvature , BaseCorr , AdditionalIM , All } |
enum class | ProductClass { RatesFX , Rates , FX , Credit , Equity , Commodity , Empty , Other , AddOnNotionalFactor , AddOnFixedAmount , All } |
enum class | IMModel { Schedule , SIMM , SIMM_R , SIMM_P } |
enum | Regulation { APRA , CFTC , ESA , FINMA , KFSC , HKMA , JFSA , MAS , OSFI , RBI , SEC , SEC_unseg , USPR , NONREG , BACEN , SANT , SFC , UK , AMFQ , Included , Unspecified , Invalid } |
SIMM regulators. | |
Public Member Functions | |
virtual const std::string & | name () const =0 |
Returns the SIMM configuration name. | |
virtual const std::string & | version () const =0 |
Returns the SIMM configuration version. | |
virtual const boost::shared_ptr< SimmBucketMapper > & | bucketMapper () const =0 |
Returns the SIMM bucket mapper used by the configuration. | |
virtual std::vector< std::string > | buckets (const RiskType &rt) const =0 |
virtual bool | hasBuckets (const RiskType &rt) const =0 |
Return true if the SIMM risk type rt has buckets. | |
virtual std::string | bucket (const RiskType &rt, const std::string &qualifier) const =0 |
virtual std::vector< std::string > | labels1 (const RiskType &rt) const =0 |
virtual std::vector< std::string > | labels2 (const RiskType &rt) const =0 |
virtual std::string | labels2 (const boost::shared_ptr< QuantLib::InterestRateIndex > &irIndex) const =0 |
virtual std::string | labels2 (const QuantLib::Period &p) const =0 |
virtual void | addLabels2 (const RiskType &rt, const std::string &label_2)=0 |
virtual QuantLib::Real | weight (const RiskType &rt, boost::optional< std::string > qualifier=boost::none, boost::optional< std::string > label_1=boost::none, const std::string &calculationCurrency="") const =0 |
virtual QuantLib::Real | curvatureWeight (const RiskType &rt, const std::string &label_1) const =0 |
virtual QuantLib::Real | historicalVolatilityRatio (const RiskType &rt) const =0 |
virtual QuantLib::Real | sigma (const RiskType &rt, boost::optional< std::string > qualifier=boost::none, boost::optional< std::string > label_1=boost::none, const std::string &calculationCurrency="") const =0 |
virtual QuantLib::Real | curvatureMarginScaling () const =0 |
virtual QuantLib::Real | concentrationThreshold (const RiskType &rt, const std::string &qualifier) const =0 |
virtual bool | isValidRiskType (const RiskType &rt) const =0 |
virtual QuantLib::Real | correlationRiskClasses (const RiskClass &rc_1, const RiskClass &rc_2) const =0 |
Return the correlation between SIMM risk classes rc_1 and rc_2 . | |
virtual QuantLib::Real | correlation (const RiskType &firstRt, const std::string &firstQualifier, const std::string &firstLabel_1, const std::string &firstLabel_2, const RiskType &secondRt, const std::string &secondQualifier, const std::string &secondLabel_1, const std::string &secondLabel_2, const std::string &calculationCurrency="") const =0 |
Static Public Member Functions | |
static std::set< RiskClass > | riskClasses (bool includeAll=false) |
Give back a set containing the RiskClass values optionally excluding 'All'. | |
static std::set< RiskType > | riskTypes (bool includeAll=false) |
Give back a set containing the RiskType values optionally excluding 'All'. | |
static std::set< MarginType > | marginTypes (bool includeAll=false) |
Give back a set containing the MarginType values optionally excluding 'All'. | |
static std::set< ProductClass > | productClasses (bool includeAll=false) |
Give back a set containing the ProductClass values optionally excluding 'All'. | |
static bool | less_than (const ProductClass &lhs, const ProductClass &rhs) |
Define ordering for ProductClass according to a waterfall: | |
static bool | greater_than (const ProductClass &lhs, const ProductClass &rhs) |
static bool | less_than_or_equal_to (const ProductClass &lhs, const ProductClass &rhs) |
static bool | greater_than_or_equal_to (const ProductClass &lhs, const ProductClass &rhs) |
static ProductClass | maxProductClass (ProductClass pc1, ProductClass pc2) |
Return the "worse" ProductClass using a waterfall logic: | |
Static Protected Attributes | |
static const QuantLib::Size | numberOfRiskClasses |
Number of risk classes including RiskClass::All. | |
static const QuantLib::Size | numberOfRiskTypes |
Number of risk types including RiskType::All. | |
static const QuantLib::Size | numberOfMarginTypes |
Number of margin types including MarginType::All. | |
static const QuantLib::Size | numberOfProductClasses |
Number of product classes including ProductClass::All. | |
static const QuantLib::Size | numberOfRegulations |
Number of regulations. | |
Abstract base class defining the interface for a SIMM configuration.
|
strong |
|
strong |
Risk types plus an All type for convenience Internal methods rely on the last element being 'All' Note that the risk type inflation has to be treated as an additional, single tenor bucket in IRCurve
|
strong |
Margin types in SIMM plus an All type for convenience Internal methods rely on the last element being 'All'
|
strong |
Product class types in SIMM plus an All type for convenience Internal methods rely on the last element being 'All'
|
pure virtual |
Return the SIMM bucket names for the given risk type rt
An empty vector is returned if the risk type has no buckets
Implemented in SimmConfigurationBase.
|
pure virtual |
Return the SIMM bucket name for the given risk type rt
and qualifier
rt
Implemented in SimmConfigurationBase.
|
pure virtual |
Return the list of SIMM Label1 values for risk type rt
An empty vector is returned if the risk type does not use Label1
Implemented in SimmConfigurationBase.
|
pure virtual |
Return the list of SIMM Label2 values for risk type rt
An empty vector is returned if the risk type does not use Label2
Implemented in SimmConfigurationBase.
|
pure virtual |
Return the SIMM Label2 value for the given interest rate index irIndex
. For interest rate indices, this is the SIMM sub curve name e.g. 'Libor1m', 'Libor3m' etc.
Implemented in SimmConfiguration_ISDA_V2_6, SimmConfiguration_ISDA_V2_5A, SimmConfiguration_ISDA_V2_5, SimmConfiguration_ISDA_V2_3_8, SimmConfiguration_ISDA_V2_3, SimmConfiguration_ISDA_V2_2, SimmConfiguration_ISDA_V2_1, SimmConfiguration_ISDA_V2_0, SimmConfiguration_ISDA_V1_3_38, and SimmConfigurationBase.
|
pure virtual |
Return the SIMM Label2 value for the given Libor tenor p
. This is the SIMM sub curve name, e.g. 'Libor1m', 'Libor3m' etc.
Implemented in SimmConfigurationBase.
|
pure virtual |
Add SIMM Label2 values under certain circumstances.
For example, in v338 and later, CreditQ label2 should have the payment currency if sensitivty is not the result of a securitisation and "payment currency,Sec" if sensitivty is the result of a securitisation. Adding to label2 in the configuration means you do not have to have an exhaustive list up front.
Implemented in SimmConfiguration_ISDA_V2_6, SimmConfiguration_ISDA_V2_5A, SimmConfiguration_ISDA_V2_5, SimmConfiguration_ISDA_V2_3_8, SimmConfiguration_ISDA_V2_3, SimmConfiguration_ISDA_V2_2, SimmConfiguration_ISDA_V2_1, SimmConfiguration_ISDA_V2_0, SimmConfiguration_ISDA_V1_3_38, and SimmConfigurationBase.
|
pure virtual |
Return the SIMM risk weight for the given risk type rt
with the given qualifier
and the given label_1
. Three possibilities:
rt
rt
and qualifier
Implemented in SimmConfiguration_ISDA_V2_6, SimmConfiguration_ISDA_V2_5A, SimmConfiguration_ISDA_V2_5, SimmConfiguration_ISDA_V2_3_8, SimmConfiguration_ISDA_V2_3, SimmConfiguration_ISDA_V2_2, and SimmConfigurationBase.
|
pure virtual |
Gives back the value of the scaling function used in the calculation of curvature risk for the risk type rt
with SIMM Label1 value label_1
. The scaling function is:
\[ SF(t) = 0.5 \times \min \left(1, \frac{14}{t} \right) \]
where \(t\) is given in days.
Implemented in SimmConfigurationBase.
|
pure virtual |
Give back the SIMM historical volatility ratio for the risk type rt
Implemented in SimmConfigurationBase.
|
pure virtual |
Give back the value of \(\sigma_{kj}\) from the SIMM docs for risk type rt
. In general, rt
is a volatility risk type and the method returns:
\[ \sigma_{kj} = \frac{RW_k \sqrt{\frac{365}{14}}}{\Phi^{-1}(0.99)} \]
where \(RW_k\) is the corresponding delta risk weight and \(\Phi(z)\) is the cumulative standard normal distribution.
rt
Implemented in SimmConfigurationBase.
|
pure virtual |
Give back the scaling factor for the Interest Rate curvature margin
Implemented in SimmConfiguration_ISDA_V2_6, SimmConfiguration_ISDA_V2_5A, SimmConfiguration_ISDA_V2_5, SimmConfiguration_ISDA_V2_3_8, SimmConfiguration_ISDA_V2_3, SimmConfiguration_ISDA_V2_2, SimmConfiguration_ISDA_V2_1, and SimmConfigurationBase.
|
pure virtual |
Give back the SIMM concentration threshold for the risk type rt
and the SIMM qualifier
Implemented in SimmConfigurationBase.
|
pure virtual |
Return true if rt
is a valid SIMM RiskType under the current configuration. Otherwise, return false.
Implemented in SimmConfigurationBase.
|
pure virtual |
Return the correlation between the firstQualifier
with risk type firstRt
, Label1 value of firstLabel_1
and Label2 value of firstLabel_2
and the secondQualifier
with risk type secondRt
, Label1 value of secondLabel_1
and Label2 value of secondLabel_2
Implemented in SimmConfiguration_ISDA_V2_6, SimmConfiguration_ISDA_V2_5A, SimmConfiguration_ISDA_V2_5, SimmConfiguration_ISDA_V2_3_8, SimmConfiguration_ISDA_V2_3, SimmConfiguration_ISDA_V2_2, and SimmConfigurationBase.