Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
simmconfigurationisdav2_3_8.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2021 Quaternion Risk Management Ltd.
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file orea/simm/simmconfigurationisdav2_3_8.hpp
20 \brief SIMM configuration for SIMM version 2.3.8
21*/
22
23#pragma once
24
26
27namespace ore {
28namespace analytics {
29
30/*! Class giving the SIMM configuration as outlined in the document
31 <em>ISDA SIMM Methodology, version 2.3.8.
32 Effective Date: December 4, 2021.</em>
33*/
35public:
36 SimmConfiguration_ISDA_V2_3_8(const QuantLib::ext::shared_ptr<SimmBucketMapper>& simmBucketMapper,
37 const QuantLib::Size& mporDays = 10,
38 const std::string& name = "SIMM ISDA 2.3.8 (26 July 2021)",
39 const std::string version = "2.3.8");
40
41 //! Return the SIMM <em>Label2</em> value for the given interest rate index
42 std::string label2(const QuantLib::ext::shared_ptr<QuantLib::InterestRateIndex>& irIndex) const override;
43
44 //! Add SIMM <em>Label2</em> values under certain circumstances.
45 void addLabels2(const CrifRecord::RiskType& rt, const std::string& label_2) override;
46
47 QuantLib::Real curvatureMarginScaling() const override;
48
49 QuantLib::Real weight(const CrifRecord::RiskType& rt, boost::optional<std::string> qualifier = boost::none,
50 boost::optional<std::string> label_1 = boost::none,
51 const std::string& calculationCurrency = "") const override;
52
53 QuantLib::Real correlation(const CrifRecord::RiskType& firstRt, const std::string& firstQualifier,
54 const std::string& firstLabel_1, const std::string& firstLabel_2,
55 const CrifRecord::RiskType& secondRt, const std::string& secondQualifier,
56 const std::string& secondLabel_1, const std::string& secondLabel_2,
57 const std::string& calculationCurrency = "") const override;
58
59private:
60 //! Find the group of the \p qualifier
61 QuantLib::Size group(const std::string& qualifier,
62 const std::map<QuantLib::Size, std::set<std::string>>& groups) const;
63
64 /*! Map giving a currency's FX Volatility group (High or Regular). This concept
65 was introduced in ISDA Simm 2.2
66 */
67 std::map<QuantLib::Size, std::set<std::string>> ccyGroups_;
68
69 //! FX risk weight matrix
70 QuantLib::Matrix rwFX_;
71
72 //! FX Correlations when the calculation ccy is in the Regular Volatility group
73 QuantLib::Matrix fxRegVolCorrelation_;
74
75 //! FX Correlations when the calculation ccy is in the High Volatility group
76 QuantLib::Matrix fxHighVolCorrelation_;
77
78 //! IR Historical volatility ratio
79 QuantLib::Real hvr_ir_;
80};
81
82} // namespace analytics
83} // namespace ore
QuantLib::Real correlation(const CrifRecord::RiskType &firstRt, const std::string &firstQualifier, const std::string &firstLabel_1, const std::string &firstLabel_2, const CrifRecord::RiskType &secondRt, const std::string &secondQualifier, const std::string &secondLabel_1, const std::string &secondLabel_2, const std::string &calculationCurrency="") const override
QuantLib::Real weight(const CrifRecord::RiskType &rt, boost::optional< std::string > qualifier=boost::none, boost::optional< std::string > label_1=boost::none, const std::string &calculationCurrency="") const override
QuantLib::Matrix fxRegVolCorrelation_
FX Correlations when the calculation ccy is in the Regular Volatility group.
QuantLib::Matrix fxHighVolCorrelation_
FX Correlations when the calculation ccy is in the High Volatility group.
std::string label2(const QuantLib::ext::shared_ptr< QuantLib::InterestRateIndex > &irIndex) const override
Return the SIMM Label2 value for the given interest rate index.
void addLabels2(const CrifRecord::RiskType &rt, const std::string &label_2) override
Add SIMM Label2 values under certain circumstances.
std::map< QuantLib::Size, std::set< std::string > > ccyGroups_
QuantLib::Real hvr_ir_
IR Historical volatility ratio.
QuantLib::Size group(const std::string &qualifier, const std::map< QuantLib::Size, std::set< std::string > > &groups) const
Find the group of the qualifier.
QuantLib::Size mporDays() const
MPOR in days.
const std::string & name() const override
Returns the SIMM configuration name.
const std::string & version() const override
Returns the SIMM configuration version.
Base SIMM configuration class.