Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
simmconfigurationcalibration.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2023 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/simmconfigurationcalibration.hpp
20 \brief SIMM configuration built for SIMM calibration
21*/
22
23#pragma once
24
25
27
28namespace ore {
29namespace analytics {
30
31/*! Class giving the SIMM configuration as outlined in the document
32 <em>ISDA SIMM Methodology, version 2.6.
33 Effective Date: December 2, 2023.</em>
34*/
36public:
37 SimmConfigurationCalibration(const QuantLib::ext::shared_ptr<SimmBucketMapper>& simmBucketMapper,
38 const QuantLib::ext::shared_ptr<SimmCalibration>& simmCalibration,
39 const QuantLib::Size& mporDays = 10,
40 const std::string& name = "SIMM Calibration");
41
42 //! Return the SIMM <em>Label2</em> value for the given interest rate index
43 std::string label2(const QuantLib::ext::shared_ptr<QuantLib::InterestRateIndex>& irIndex) const override;
44
45 //! Add SIMM <em>Label2</em> values under certain circumstances.
46 void addLabels2(const CrifRecord::RiskType& rt, const std::string& label_2) override;
47
48 QuantLib::Real curvatureMarginScaling() const override;
49
50 QuantLib::Real weight(const CrifRecord::RiskType& rt, boost::optional<std::string> qualifier = boost::none,
51 boost::optional<std::string> label_1 = boost::none,
52 const std::string& calculationCurrency = "") const override;
53
54 QuantLib::Real correlation(const CrifRecord::RiskType& firstRt, const std::string& firstQualifier,
55 const std::string& firstLabel_1, const std::string& firstLabel_2,
56 const CrifRecord::RiskType& secondRt, const std::string& secondQualifier,
57 const std::string& secondLabel_1, const std::string& secondLabel_2,
58 const std::string& calculationCurrency = "") const override;
59
60 virtual bool isSimmConfigCalibration() const override { return true; }
61
62private:
63 //! Find the group of the \p qualifier
64 std::string group(const std::string& qualifier, const std::map<std::string, std::set<std::string>>& groups) const;
65
66 /*! Map giving a currency's FX Volatility group (High or Regular). This concept
67 was introduced in ISDA Simm 2.2
68 */
69 std::map<std::string, std::set<std::string>> ccyGroups_;
70
71 //! IR Historical volatility ratio
72 QuantLib::Real hvr_ir_;
73};
74
75} // namespace analytics
76} // namespace ore
QuantLib::Size mporDays() const
MPOR in days.
const std::string & name() const override
Returns the SIMM configuration name.
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
std::map< std::string, std::set< std::string > > ccyGroups_
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::string group(const std::string &qualifier, const std::map< std::string, std::set< std::string > > &groups) const
Find the group of the qualifier.
QuantLib::Real hvr_ir_
IR Historical volatility ratio.
Base SIMM configuration class.