Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
simmconfigurationisdav1_3.cpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2016 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
21
22#include <boost/make_shared.hpp>
23
24#include <ql/math/matrix.hpp>
25
26using QuantLib::Matrix;
27using QuantLib::Real;
28using std::set;
29using std::string;
30using std::vector;
31
32namespace ore {
33namespace analytics {
34
36
37SimmConfiguration_ISDA_V1_3::SimmConfiguration_ISDA_V1_3(const QuantLib::ext::shared_ptr<SimmBucketMapper>& simmBucketMapper,
38 const std::string& name, const std::string version)
39 : SimmConfiguration_ISDA_V1_0(simmBucketMapper, name, version) {
40
41 // Now add/modify the pieces that we need to amend
42
43 // Set up the correct concentration threshold getter
44 simmConcentration_ = QuantLib::ext::make_shared<SimmConcentration_ISDA_V1_3>(simmBucketMapper_);
45
46 // clang-format off
47
48 // Set up the members for this configuration
49 // Explanations of all these members are given in the hpp file
50
51 mapLabels_1_[RiskType::InflationVol] = { "2w", "1m", "3m", "6m", "1y", "2y", "3y", "5y", "10y", "15y", "20y", "30y" };
52
53 // Risk weights
54 rwRiskType_[RiskType::XCcyBasis] = 18;
55 rwRiskType_[RiskType::InflationVol] = 0.21;
56
57 // Curvature weights
58 curvatureWeights_[RiskType::InflationVol] = curvatureWeights_[RiskType::IRVol];
59
60 // Historical volatility ratios (no additions)
61
62 // Valid risk types
63 set<RiskType> temp = {
64 RiskType::InflationVol,
65 RiskType::BaseCorr,
66 RiskType::XCcyBasis,
67 RiskType::ProductClassMultiplier,
68 RiskType::AddOnNotionalFactor,
69 RiskType::PV,
70 RiskType::Notional
71 };
72 validRiskTypes_.insert(temp.begin(), temp.end());
73
74 // Initialise the single, ad-hoc type, correlations
75 xccyCorr_ = 0.18;
76 infVolCorr_ = 0.33;
77 basecorrCorr_ = 0.30;
78
79 // clang-format on
80}
81
82} // namespace analytics
83} // namespace ore
SimmConfiguration_ISDA_V1_3(const QuantLib::ext::shared_ptr< SimmBucketMapper > &simmBucketMapper, const std::string &name="SIMM ISDA V1_3 (1 April 2017)", const std::string version="1.3")
QuantLib::Real basecorrCorr_
Base correlation risk factor correlation.
std::map< CrifRecord::RiskType, QuantLib::Real > rwRiskType_
std::set< CrifRecord::RiskType > validRiskTypes_
Set of valid risk types for the current configuration.
QuantLib::ext::shared_ptr< SimmConcentration > simmConcentration_
Used to get the concentration thresholds for a given risk type and qualifier.
std::map< CrifRecord::RiskType, std::vector< std::string > > mapLabels_1_
QuantLib::Real infVolCorr_
Correlation between any yield volatility and inflation volatility in same currency.
std::map< CrifRecord::RiskType, std::vector< QuantLib::Real > > curvatureWeights_
QuantLib::ext::shared_ptr< SimmBucketMapper > simmBucketMapper_
Used to map SIMM Qualifier names to SIMM bucket values.
CrifRecord::RiskType RiskType
Definition: crifloader.cpp:92
SIMM concentration thresholds for SIMM version R1.3 (3.29)
SIMM configuration for SIMM version R1.3 (3.29)
string name