Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
simmconfigurationisdav2_1.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 <ql/math/matrix.hpp>
23
24#include <boost/make_shared.hpp>
25#include <boost/algorithm/string/predicate.hpp>
26
27using QuantLib::InterestRateIndex;
28using QuantLib::Matrix;
29using QuantLib::Real;
30using std::string;
31using std::vector;
32
33namespace ore {
34namespace analytics {
35
37
38SimmConfiguration_ISDA_V2_1::SimmConfiguration_ISDA_V2_1(const QuantLib::ext::shared_ptr<SimmBucketMapper>& simmBucketMapper,
39 const std::string& name, const std::string version)
40 : SimmConfigurationBase(simmBucketMapper, name, version) {
41
42 // Set up the correct concentration threshold getter
43 simmConcentration_ = QuantLib::ext::make_shared<SimmConcentration_ISDA_V2_1>(simmBucketMapper_);
44
45 // clang-format off
46
47 // Set up the members for this configuration
48 // Explanations of all these members are given in the hpp file
49
50 mapBuckets_ = {
51 { RiskType::IRCurve, { "1", "2", "3" } },
52 { RiskType::CreditQ, { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "Residual" } },
53 { RiskType::CreditVol, { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "Residual" } },
54 { RiskType::CreditNonQ, { "1", "2", "Residual" } },
55 { RiskType::CreditVolNonQ, { "1", "2", "Residual" } },
56 { RiskType::Equity, { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "Residual" } },
57 { RiskType::EquityVol, { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "Residual" } },
58 { RiskType::Commodity, { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17" } },
59 { RiskType::CommodityVol, { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17" } }
60 };
61
62 mapLabels_1_ = {
63 { RiskType::IRCurve, { "2w", "1m", "3m", "6m", "1y", "2y", "3y", "5y", "10y", "15y", "20y", "30y" } },
64 { RiskType::CreditQ, { "1y", "2y", "3y", "5y", "10y" } },
65 { RiskType::CreditNonQ, { "1y", "2y", "3y", "5y", "10y" } },
66 { RiskType::IRVol, { "2w", "1m", "3m", "6m", "1y", "2y", "3y", "5y", "10y", "15y", "20y", "30y" } },
67 { RiskType::InflationVol, { "2w", "1m", "3m", "6m", "1y", "2y", "3y", "5y", "10y", "15y", "20y", "30y" } },
68 { RiskType::CreditVol, { "1y", "2y", "3y", "5y", "10y" } },
69 { RiskType::CreditVolNonQ, { "1y", "2y", "3y", "5y", "10y" } },
70 { RiskType::EquityVol, { "2w", "1m", "3m", "6m", "1y", "2y", "3y", "5y", "10y", "15y", "20y", "30y" } },
71 { RiskType::CommodityVol, { "2w", "1m", "3m", "6m", "1y", "2y", "3y", "5y", "10y", "15y", "20y", "30y" } },
72 { RiskType::FXVol, { "2w", "1m", "3m", "6m", "1y", "2y", "3y", "5y", "10y", "15y", "20y", "30y" } }
73 };
74
75 mapLabels_2_ = {
76 { RiskType::IRCurve, { "OIS", "Libor1m", "Libor3m", "Libor6m", "Libor12m", "Prime", "Municipal" } },
77 { RiskType::CreditQ, { "", "Sec" } }
78 };
79
80
81 // Risk weights
82 rwRiskType_ = {
83 { RiskType::Inflation, 48 },
84 { RiskType::XCcyBasis, 21 },
85 { RiskType::IRVol, 0.16 },
86 { RiskType::InflationVol, 0.16 },
87 { RiskType::CreditVol, 0.27 },
88 { RiskType::CreditVolNonQ, 0.27 },
89 { RiskType::CommodityVol, 0.27 },
90 { RiskType::FX, 8.1 },
91 { RiskType::FXVol, 0.30 },
92 { RiskType::BaseCorr, 19.0 }
93 };
94
95 rwBucket_ = {
96 {RiskType::CreditQ,
97 {{{"1", "", ""}, 69.0},
98 {{"2", "", ""}, 107.0},
99 {{"3", "", ""}, 72.0},
100 {{"4", "", ""}, 55.0},
101 {{"5", "", ""}, 48.0},
102 {{"6", "", ""}, 41.0},
103 {{"7", "", ""}, 166.0},
104 {{"8", "", ""}, 187.0},
105 {{"9", "", ""}, 177.0},
106 {{"10", "", ""}, 187.0},
107 {{"11", "", ""}, 129.0},
108 {{"12", "", ""}, 136.0},
109 {{"Residual", "", ""}, 187.0}}},
110 {RiskType::CreditNonQ,
111 {{{"1", "", ""}, 150.0},
112 {{"2", "", ""}, 1200.0},
113 {{"Residual", "", ""}, 1200.0}}},
114 {RiskType::Equity,
115 {{{"1", "", ""}, 24.0},
116 {{"2", "", ""}, 30.0},
117 {{"3", "", ""}, 31.0},
118 {{"4", "", ""}, 25.0},
119 {{"5", "", ""}, 21.0},
120 {{"6", "", ""}, 22.0},
121 {{"7", "", ""}, 27.0},
122 {{"8", "", ""}, 24.0},
123 {{"9", "", ""}, 33.0},
124 {{"10", "", ""}, 34.0},
125 {{"11", "", ""}, 17.0},
126 {{"12", "", ""}, 17.0},
127 {{"Residual", "", ""}, 34.0}}},
128 {RiskType::Commodity,
129 {{{"1", "", ""}, 19.0},
130 {{"2", "", ""}, 20.0},
131 {{"3", "", ""}, 17.0},
132 {{"4", "", ""}, 19.0},
133 {{"5", "", ""}, 24.0},
134 {{"6", "", ""}, 22.0},
135 {{"7", "", ""}, 26.0},
136 {{"8", "", ""}, 50.0},
137 {{"9", "", ""}, 27.0},
138 {{"10", "", ""}, 54.0},
139 {{"11", "", ""}, 20.0},
140 {{"12", "", ""}, 20.0},
141 {{"13", "", ""}, 17.0},
142 {{"14", "", ""}, 14.0},
143 {{"15", "", ""}, 10.0},
144 {{"16", "", ""}, 54.0},
145 {{"17", "", ""}, 16.0}}},
146 {RiskType::EquityVol,
147 {{{"1", "", ""}, 0.28},
148 {{"2", "", ""}, 0.28},
149 {{"3", "", ""}, 0.28},
150 {{"4", "", ""}, 0.28},
151 {{"5", "", ""}, 0.28},
152 {{"6", "", ""}, 0.28},
153 {{"7", "", ""}, 0.28},
154 {{"8", "", ""}, 0.28},
155 {{"9", "", ""}, 0.28},
156 {{"10", "", ""}, 0.28},
157 {{"11", "", ""}, 0.28},
158 {{"12", "", ""}, 0.63},
159 {{"Residual", "", ""}, 0.28}}}
160 };
161
162 rwLabel_1_ = {
163 {RiskType::IRCurve,
164 {{{"1", "2w", ""}, 114.0},
165 {{"1", "1m", ""}, 115.0},
166 {{"1", "3m", ""}, 102.0},
167 {{"1", "6m", ""}, 71.0},
168 {{"1", "1y", ""}, 61.0},
169 {{"1", "2y", ""}, 52.0},
170 {{"1", "3y", ""}, 50.0},
171 {{"1", "5y", ""}, 51.0},
172 {{"1", "10y", ""}, 51.0},
173 {{"1", "15y", ""}, 51.0},
174 {{"1", "20y", ""}, 54.0},
175 {{"1", "30y", ""}, 62.0},
176 {{"2", "2w", ""}, 33.0},
177 {{"2", "1m", ""}, 20.0},
178 {{"2", "3m", ""}, 10.0},
179 {{"2", "6m", ""}, 11.0},
180 {{"2", "1y", ""}, 14.0},
181 {{"2", "2y", ""}, 20.0},
182 {{"2", "3y", ""}, 22.0},
183 {{"2", "5y", ""}, 20.0},
184 {{"2", "10y", ""}, 20.0},
185 {{"2", "15y", ""}, 21.0},
186 {{"2", "20y", ""}, 23.0},
187 {{"2", "30y", ""}, 27.0},
188 {{"3", "2w", ""}, 91.0},
189 {{"3", "1m", ""}, 91.0},
190 {{"3", "3m", ""}, 95.0},
191 {{"3", "6m", ""}, 88.0},
192 {{"3", "1y", ""}, 99.0},
193 {{"3", "2y", ""}, 101.0},
194 {{"3", "3y", ""}, 101.0},
195 {{"3", "5y", ""}, 99.0},
196 {{"3", "10y", ""}, 108.0},
197 {{"3", "15y", ""}, 100.0},
198 {{"3", "20y", ""}, 101.0},
199 {{"3", "30y", ""}, 101.0}}
200 }
201 };
202
203 // Curvature weights
205 { RiskType::IRVol, { 0.5,
206 0.5 * 14.0 / (365.0 / 12.0),
207 0.5 * 14.0 / (3.0 * 365.0 / 12.0),
208 0.5 * 14.0 / (6.0 * 365.0 / 12.0),
209 0.5 * 14.0 / 365.0,
210 0.5 * 14.0 / (2.0 * 365.0),
211 0.5 * 14.0 / (3.0 * 365.0),
212 0.5 * 14.0 / (5.0 * 365.0),
213 0.5 * 14.0 / (10.0 * 365.0),
214 0.5 * 14.0 / (15.0 * 365.0),
215 0.5 * 14.0 / (20.0 * 365.0),
216 0.5 * 14.0 / (30.0 * 365.0) }
217 },
218 { RiskType::CreditVol, { 0.5 * 14.0 / 365.0,
219 0.5 * 14.0 / (2.0 * 365.0),
220 0.5 * 14.0 / (3.0 * 365.0),
221 0.5 * 14.0 / (5.0 * 365.0),
222 0.5 * 14.0 / (10.0 * 365.0) }
223 }
224 };
225 curvatureWeights_[RiskType::InflationVol] = curvatureWeights_[RiskType::IRVol];
226 curvatureWeights_[RiskType::EquityVol] = curvatureWeights_[RiskType::IRVol];
227 curvatureWeights_[RiskType::CommodityVol] = curvatureWeights_[RiskType::IRVol];
228 curvatureWeights_[RiskType::FXVol] = curvatureWeights_[RiskType::IRVol];
229 curvatureWeights_[RiskType::CreditVolNonQ] = curvatureWeights_[RiskType::CreditVol];
230
231 // Historical volatility ratios
232 historicalVolatilityRatios_[RiskType::EquityVol] = 0.59;
233 historicalVolatilityRatios_[RiskType::CommodityVol] = 0.74;
234 historicalVolatilityRatios_[RiskType::FXVol] = 0.63;
235
236 // Valid risk types
238 RiskType::Commodity,
239 RiskType::CommodityVol,
240 RiskType::CreditNonQ,
241 RiskType::CreditQ,
242 RiskType::CreditVol,
243 RiskType::CreditVolNonQ,
244 RiskType::Equity,
245 RiskType::EquityVol,
246 RiskType::FX,
247 RiskType::FXVol,
248 RiskType::Inflation,
249 RiskType::IRCurve,
250 RiskType::IRVol,
251 RiskType::InflationVol,
252 RiskType::BaseCorr,
253 RiskType::XCcyBasis,
254 RiskType::ProductClassMultiplier,
255 RiskType::AddOnNotionalFactor,
256 RiskType::PV,
257 RiskType::Notional,
258 RiskType::AddOnFixedAmount
259 };
260
261 // Risk class correlation matrix
263 {{"", "InterestRate", "CreditQualifying"}, 0.25},
264 {{"", "InterestRate", "CreditNonQualifying"}, 0.15},
265 {{"", "InterestRate", "Equity"}, 0.19},
266 {{"", "InterestRate", "Commodity"}, 0.3},
267 {{"", "InterestRate", "FX"}, 0.26},
268 {{"", "CreditQualifying", "InterestRate"}, 0.25},
269 {{"", "CreditQualifying", "CreditNonQualifying"}, 0.26},
270 {{"", "CreditQualifying", "Equity"}, 0.65},
271 {{"", "CreditQualifying", "Commodity"}, 0.45},
272 {{"", "CreditQualifying", "FX"}, 0.24},
273 {{"", "CreditNonQualifying", "InterestRate"}, 0.15},
274 {{"", "CreditNonQualifying", "CreditQualifying"}, 0.26},
275 {{"", "CreditNonQualifying", "Equity"}, 0.17},
276 {{"", "CreditNonQualifying", "Commodity"}, 0.22},
277 {{"", "CreditNonQualifying", "FX"}, 0.11},
278 {{"", "Equity", "InterestRate"}, 0.19},
279 {{"", "Equity", "CreditQualifying"}, 0.65},
280 {{"", "Equity", "CreditNonQualifying"}, 0.17},
281 {{"", "Equity", "Commodity"}, 0.39},
282 {{"", "Equity", "FX"}, 0.23},
283 {{"", "Commodity", "InterestRate"}, 0.3},
284 {{"", "Commodity", "CreditQualifying"}, 0.45},
285 {{"", "Commodity", "CreditNonQualifying"}, 0.22},
286 {{"", "Commodity", "Equity"}, 0.39},
287 {{"", "Commodity", "FX"}, 0.32},
288 {{"", "FX", "InterestRate"}, 0.26},
289 {{"", "FX", "CreditQualifying"}, 0.24},
290 {{"", "FX", "CreditNonQualifying"}, 0.11},
291 {{"", "FX", "Equity"}, 0.23},
292 {{"", "FX", "Commodity"}, 0.32}
293 };
294
295 // Interest rate tenor correlations (i.e. Label1 level correlations)
296 intraBucketCorrelation_[RiskType::IRCurve] = {
297 {{"", "2w", "1m"}, 0.63},
298 {{"", "2w", "3m"}, 0.59},
299 {{"", "2w", "6m"}, 0.47},
300 {{"", "2w", "1y"}, 0.31},
301 {{"", "2w", "2y"}, 0.22},
302 {{"", "2w", "3y"}, 0.18},
303 {{"", "2w", "5y"}, 0.14},
304 {{"", "2w", "10y"}, 0.09},
305 {{"", "2w", "15y"}, 0.06},
306 {{"", "2w", "20y"}, 0.04},
307 {{"", "2w", "30y"}, 0.05},
308 {{"", "1m", "2w"}, 0.63},
309 {{"", "1m", "3m"}, 0.79},
310 {{"", "1m", "6m"}, 0.67},
311 {{"", "1m", "1y"}, 0.52},
312 {{"", "1m", "2y"}, 0.42},
313 {{"", "1m", "3y"}, 0.37},
314 {{"", "1m", "5y"}, 0.3},
315 {{"", "1m", "10y"}, 0.23},
316 {{"", "1m", "15y"}, 0.18},
317 {{"", "1m", "20y"}, 0.15},
318 {{"", "1m", "30y"}, 0.13},
319 {{"", "3m", "2w"}, 0.59},
320 {{"", "3m", "1m"}, 0.79},
321 {{"", "3m", "6m"}, 0.84},
322 {{"", "3m", "1y"}, 0.68},
323 {{"", "3m", "2y"}, 0.56},
324 {{"", "3m", "3y"}, 0.5},
325 {{"", "3m", "5y"}, 0.42},
326 {{"", "3m", "10y"}, 0.32},
327 {{"", "3m", "15y"}, 0.26},
328 {{"", "3m", "20y"}, 0.24},
329 {{"", "3m", "30y"}, 0.21},
330 {{"", "6m", "2w"}, 0.47},
331 {{"", "6m", "1m"}, 0.67},
332 {{"", "6m", "3m"}, 0.84},
333 {{"", "6m", "1y"}, 0.86},
334 {{"", "6m", "2y"}, 0.76},
335 {{"", "6m", "3y"}, 0.69},
336 {{"", "6m", "5y"}, 0.6},
337 {{"", "6m", "10y"}, 0.48},
338 {{"", "6m", "15y"}, 0.42},
339 {{"", "6m", "20y"}, 0.38},
340 {{"", "6m", "30y"}, 0.33},
341 {{"", "1y", "2w"}, 0.31},
342 {{"", "1y", "1m"}, 0.52},
343 {{"", "1y", "3m"}, 0.68},
344 {{"", "1y", "6m"}, 0.86},
345 {{"", "1y", "2y"}, 0.94},
346 {{"", "1y", "3y"}, 0.89},
347 {{"", "1y", "5y"}, 0.8},
348 {{"", "1y", "10y"}, 0.67},
349 {{"", "1y", "15y"}, 0.6},
350 {{"", "1y", "20y"}, 0.57},
351 {{"", "1y", "30y"}, 0.53},
352 {{"", "2y", "2w"}, 0.22},
353 {{"", "2y", "1m"}, 0.42},
354 {{"", "2y", "3m"}, 0.56},
355 {{"", "2y", "6m"}, 0.76},
356 {{"", "2y", "1y"}, 0.94},
357 {{"", "2y", "3y"}, 0.98},
358 {{"", "2y", "5y"}, 0.91},
359 {{"", "2y", "10y"}, 0.79},
360 {{"", "2y", "15y"}, 0.73},
361 {{"", "2y", "20y"}, 0.7},
362 {{"", "2y", "30y"}, 0.66},
363 {{"", "3y", "2w"}, 0.18},
364 {{"", "3y", "1m"}, 0.37},
365 {{"", "3y", "3m"}, 0.5},
366 {{"", "3y", "6m"}, 0.69},
367 {{"", "3y", "1y"}, 0.89},
368 {{"", "3y", "2y"}, 0.98},
369 {{"", "3y", "5y"}, 0.96},
370 {{"", "3y", "10y"}, 0.87},
371 {{"", "3y", "15y"}, 0.81},
372 {{"", "3y", "20y"}, 0.78},
373 {{"", "3y", "30y"}, 0.74},
374 {{"", "5y", "2w"}, 0.14},
375 {{"", "5y", "1m"}, 0.3},
376 {{"", "5y", "3m"}, 0.42},
377 {{"", "5y", "6m"}, 0.6},
378 {{"", "5y", "1y"}, 0.8},
379 {{"", "5y", "2y"}, 0.91},
380 {{"", "5y", "3y"}, 0.96},
381 {{"", "5y", "10y"}, 0.95},
382 {{"", "5y", "15y"}, 0.91},
383 {{"", "5y", "20y"}, 0.88},
384 {{"", "5y", "30y"}, 0.84},
385 {{"", "10y", "2w"}, 0.09},
386 {{"", "10y", "1m"}, 0.23},
387 {{"", "10y", "3m"}, 0.32},
388 {{"", "10y", "6m"}, 0.48},
389 {{"", "10y", "1y"}, 0.67},
390 {{"", "10y", "2y"}, 0.79},
391 {{"", "10y", "3y"}, 0.87},
392 {{"", "10y", "5y"}, 0.95},
393 {{"", "10y", "15y"}, 0.98},
394 {{"", "10y", "20y"}, 0.97},
395 {{"", "10y", "30y"}, 0.94},
396 {{"", "15y", "2w"}, 0.06},
397 {{"", "15y", "1m"}, 0.18},
398 {{"", "15y", "3m"}, 0.26},
399 {{"", "15y", "6m"}, 0.42},
400 {{"", "15y", "1y"}, 0.6},
401 {{"", "15y", "2y"}, 0.73},
402 {{"", "15y", "3y"}, 0.81},
403 {{"", "15y", "5y"}, 0.91},
404 {{"", "15y", "10y"}, 0.98},
405 {{"", "15y", "20y"}, 0.99},
406 {{"", "15y", "30y"}, 0.97},
407 {{"", "20y", "2w"}, 0.04},
408 {{"", "20y", "1m"}, 0.15},
409 {{"", "20y", "3m"}, 0.24},
410 {{"", "20y", "6m"}, 0.38},
411 {{"", "20y", "1y"}, 0.57},
412 {{"", "20y", "2y"}, 0.7},
413 {{"", "20y", "3y"}, 0.78},
414 {{"", "20y", "5y"}, 0.88},
415 {{"", "20y", "10y"}, 0.97},
416 {{"", "20y", "15y"}, 0.99},
417 {{"", "20y", "30y"}, 0.99},
418 {{"", "30y", "2w"}, 0.05},
419 {{"", "30y", "1m"}, 0.13},
420 {{"", "30y", "3m"}, 0.21},
421 {{"", "30y", "6m"}, 0.33},
422 {{"", "30y", "1y"}, 0.53},
423 {{"", "30y", "2y"}, 0.66},
424 {{"", "30y", "3y"}, 0.74},
425 {{"", "30y", "5y"}, 0.84},
426 {{"", "30y", "10y"}, 0.94},
427 {{"", "30y", "15y"}, 0.97},
428 {{"", "30y", "20y"}, 0.99}
429 };
430
431 // CreditQ inter-bucket correlations
432 interBucketCorrelation_[RiskType::CreditQ] = {
433 {{"", "1", "2"}, 0.38},
434 {{"", "1", "3"}, 0.36},
435 {{"", "1", "4"}, 0.36},
436 {{"", "1", "5"}, 0.39},
437 {{"", "1", "6"}, 0.35},
438 {{"", "1", "7"}, 0.34},
439 {{"", "1", "8"}, 0.32},
440 {{"", "1", "9"}, 0.34},
441 {{"", "1", "10"}, 0.33},
442 {{"", "1", "11"}, 0.34},
443 {{"", "1", "12"}, 0.31},
444 {{"", "2", "1"}, 0.38},
445 {{"", "2", "3"}, 0.41},
446 {{"", "2", "4"}, 0.41},
447 {{"", "2", "5"}, 0.43},
448 {{"", "2", "6"}, 0.4},
449 {{"", "2", "7"}, 0.29},
450 {{"", "2", "8"}, 0.38},
451 {{"", "2", "9"}, 0.38},
452 {{"", "2", "10"}, 0.38},
453 {{"", "2", "11"}, 0.38},
454 {{"", "2", "12"}, 0.34},
455 {{"", "3", "1"}, 0.36},
456 {{"", "3", "2"}, 0.41},
457 {{"", "3", "4"}, 0.41},
458 {{"", "3", "5"}, 0.42},
459 {{"", "3", "6"}, 0.39},
460 {{"", "3", "7"}, 0.3},
461 {{"", "3", "8"}, 0.34},
462 {{"", "3", "9"}, 0.39},
463 {{"", "3", "10"}, 0.37},
464 {{"", "3", "11"}, 0.38},
465 {{"", "3", "12"}, 0.35},
466 {{"", "4", "1"}, 0.36},
467 {{"", "4", "2"}, 0.41},
468 {{"", "4", "3"}, 0.41},
469 {{"", "4", "5"}, 0.43},
470 {{"", "4", "6"}, 0.4},
471 {{"", "4", "7"}, 0.28},
472 {{"", "4", "8"}, 0.33},
473 {{"", "4", "9"}, 0.37},
474 {{"", "4", "10"}, 0.38},
475 {{"", "4", "11"}, 0.38},
476 {{"", "4", "12"}, 0.34},
477 {{"", "5", "1"}, 0.39},
478 {{"", "5", "2"}, 0.43},
479 {{"", "5", "3"}, 0.42},
480 {{"", "5", "4"}, 0.43},
481 {{"", "5", "6"}, 0.42},
482 {{"", "5", "7"}, 0.31},
483 {{"", "5", "8"}, 0.35},
484 {{"", "5", "9"}, 0.38},
485 {{"", "5", "10"}, 0.39},
486 {{"", "5", "11"}, 0.41},
487 {{"", "5", "12"}, 0.36},
488 {{"", "6", "1"}, 0.35},
489 {{"", "6", "2"}, 0.4},
490 {{"", "6", "3"}, 0.39},
491 {{"", "6", "4"}, 0.4},
492 {{"", "6", "5"}, 0.42},
493 {{"", "6", "7"}, 0.27},
494 {{"", "6", "8"}, 0.32},
495 {{"", "6", "9"}, 0.34},
496 {{"", "6", "10"}, 0.35},
497 {{"", "6", "11"}, 0.36},
498 {{"", "6", "12"}, 0.33},
499 {{"", "7", "1"}, 0.34},
500 {{"", "7", "2"}, 0.29},
501 {{"", "7", "3"}, 0.3},
502 {{"", "7", "4"}, 0.28},
503 {{"", "7", "5"}, 0.31},
504 {{"", "7", "6"}, 0.27},
505 {{"", "7", "8"}, 0.24},
506 {{"", "7", "9"}, 0.28},
507 {{"", "7", "10"}, 0.27},
508 {{"", "7", "11"}, 0.27},
509 {{"", "7", "12"}, 0.26},
510 {{"", "8", "1"}, 0.32},
511 {{"", "8", "2"}, 0.38},
512 {{"", "8", "3"}, 0.34},
513 {{"", "8", "4"}, 0.33},
514 {{"", "8", "5"}, 0.35},
515 {{"", "8", "6"}, 0.32},
516 {{"", "8", "7"}, 0.24},
517 {{"", "8", "9"}, 0.33},
518 {{"", "8", "10"}, 0.32},
519 {{"", "8", "11"}, 0.32},
520 {{"", "8", "12"}, 0.29},
521 {{"", "9", "1"}, 0.34},
522 {{"", "9", "2"}, 0.38},
523 {{"", "9", "3"}, 0.39},
524 {{"", "9", "4"}, 0.37},
525 {{"", "9", "5"}, 0.38},
526 {{"", "9", "6"}, 0.34},
527 {{"", "9", "7"}, 0.28},
528 {{"", "9", "8"}, 0.33},
529 {{"", "9", "10"}, 0.35},
530 {{"", "9", "11"}, 0.35},
531 {{"", "9", "12"}, 0.33},
532 {{"", "10", "1"}, 0.33},
533 {{"", "10", "2"}, 0.38},
534 {{"", "10", "3"}, 0.37},
535 {{"", "10", "4"}, 0.38},
536 {{"", "10", "5"}, 0.39},
537 {{"", "10", "6"}, 0.35},
538 {{"", "10", "7"}, 0.27},
539 {{"", "10", "8"}, 0.32},
540 {{"", "10", "9"}, 0.35},
541 {{"", "10", "11"}, 0.36},
542 {{"", "10", "12"}, 0.32},
543 {{"", "11", "1"}, 0.34},
544 {{"", "11", "2"}, 0.38},
545 {{"", "11", "3"}, 0.38},
546 {{"", "11", "4"}, 0.38},
547 {{"", "11", "5"}, 0.41},
548 {{"", "11", "6"}, 0.36},
549 {{"", "11", "7"}, 0.27},
550 {{"", "11", "8"}, 0.32},
551 {{"", "11", "9"}, 0.35},
552 {{"", "11", "10"}, 0.36},
553 {{"", "11", "12"}, 0.33},
554 {{"", "12", "1"}, 0.31},
555 {{"", "12", "2"}, 0.34},
556 {{"", "12", "3"}, 0.35},
557 {{"", "12", "4"}, 0.34},
558 {{"", "12", "5"}, 0.36},
559 {{"", "12", "6"}, 0.33},
560 {{"", "12", "7"}, 0.26},
561 {{"", "12", "8"}, 0.29},
562 {{"", "12", "9"}, 0.33},
563 {{"", "12", "10"}, 0.32},
564 {{"", "12", "11"}, 0.33}
565 };
566
567 // Equity inter-bucket correlations
568 interBucketCorrelation_[RiskType::Equity] = {
569 {{"", "1", "2"}, 0.16},
570 {{"", "1", "3"}, 0.16},
571 {{"", "1", "4"}, 0.17},
572 {{"", "1", "5"}, 0.13},
573 {{"", "1", "6"}, 0.15},
574 {{"", "1", "7"}, 0.15},
575 {{"", "1", "8"}, 0.15},
576 {{"", "1", "9"}, 0.13},
577 {{"", "1", "10"}, 0.11},
578 {{"", "1", "11"}, 0.19},
579 {{"", "1", "12"}, 0.19},
580 {{"", "2", "1"}, 0.16},
581 {{"", "2", "3"}, 0.2},
582 {{"", "2", "4"}, 0.2},
583 {{"", "2", "5"}, 0.14},
584 {{"", "2", "6"}, 0.16},
585 {{"", "2", "7"}, 0.16},
586 {{"", "2", "8"}, 0.16},
587 {{"", "2", "9"}, 0.15},
588 {{"", "2", "10"}, 0.13},
589 {{"", "2", "11"}, 0.2},
590 {{"", "2", "12"}, 0.2},
591 {{"", "3", "1"}, 0.16},
592 {{"", "3", "2"}, 0.2},
593 {{"", "3", "4"}, 0.22},
594 {{"", "3", "5"}, 0.15},
595 {{"", "3", "6"}, 0.19},
596 {{"", "3", "7"}, 0.22},
597 {{"", "3", "8"}, 0.19},
598 {{"", "3", "9"}, 0.16},
599 {{"", "3", "10"}, 0.15},
600 {{"", "3", "11"}, 0.25},
601 {{"", "3", "12"}, 0.25},
602 {{"", "4", "1"}, 0.17},
603 {{"", "4", "2"}, 0.2},
604 {{"", "4", "3"}, 0.22},
605 {{"", "4", "5"}, 0.17},
606 {{"", "4", "6"}, 0.21},
607 {{"", "4", "7"}, 0.21},
608 {{"", "4", "8"}, 0.21},
609 {{"", "4", "9"}, 0.17},
610 {{"", "4", "10"}, 0.15},
611 {{"", "4", "11"}, 0.27},
612 {{"", "4", "12"}, 0.27},
613 {{"", "5", "1"}, 0.13},
614 {{"", "5", "2"}, 0.14},
615 {{"", "5", "3"}, 0.15},
616 {{"", "5", "4"}, 0.17},
617 {{"", "5", "6"}, 0.25},
618 {{"", "5", "7"}, 0.23},
619 {{"", "5", "8"}, 0.26},
620 {{"", "5", "9"}, 0.14},
621 {{"", "5", "10"}, 0.17},
622 {{"", "5", "11"}, 0.32},
623 {{"", "5", "12"}, 0.32},
624 {{"", "6", "1"}, 0.15},
625 {{"", "6", "2"}, 0.16},
626 {{"", "6", "3"}, 0.19},
627 {{"", "6", "4"}, 0.21},
628 {{"", "6", "5"}, 0.25},
629 {{"", "6", "7"}, 0.3},
630 {{"", "6", "8"}, 0.31},
631 {{"", "6", "9"}, 0.16},
632 {{"", "6", "10"}, 0.21},
633 {{"", "6", "11"}, 0.38},
634 {{"", "6", "12"}, 0.38},
635 {{"", "7", "1"}, 0.15},
636 {{"", "7", "2"}, 0.16},
637 {{"", "7", "3"}, 0.22},
638 {{"", "7", "4"}, 0.21},
639 {{"", "7", "5"}, 0.23},
640 {{"", "7", "6"}, 0.3},
641 {{"", "7", "8"}, 0.29},
642 {{"", "7", "9"}, 0.16},
643 {{"", "7", "10"}, 0.21},
644 {{"", "7", "11"}, 0.38},
645 {{"", "7", "12"}, 0.38},
646 {{"", "8", "1"}, 0.15},
647 {{"", "8", "2"}, 0.16},
648 {{"", "8", "3"}, 0.19},
649 {{"", "8", "4"}, 0.21},
650 {{"", "8", "5"}, 0.26},
651 {{"", "8", "6"}, 0.31},
652 {{"", "8", "7"}, 0.29},
653 {{"", "8", "9"}, 0.17},
654 {{"", "8", "10"}, 0.21},
655 {{"", "8", "11"}, 0.39},
656 {{"", "8", "12"}, 0.39},
657 {{"", "9", "1"}, 0.13},
658 {{"", "9", "2"}, 0.15},
659 {{"", "9", "3"}, 0.16},
660 {{"", "9", "4"}, 0.17},
661 {{"", "9", "5"}, 0.14},
662 {{"", "9", "6"}, 0.16},
663 {{"", "9", "7"}, 0.16},
664 {{"", "9", "8"}, 0.17},
665 {{"", "9", "10"}, 0.13},
666 {{"", "9", "11"}, 0.21},
667 {{"", "9", "12"}, 0.21},
668 {{"", "10", "1"}, 0.11},
669 {{"", "10", "2"}, 0.13},
670 {{"", "10", "3"}, 0.15},
671 {{"", "10", "4"}, 0.15},
672 {{"", "10", "5"}, 0.17},
673 {{"", "10", "6"}, 0.21},
674 {{"", "10", "7"}, 0.21},
675 {{"", "10", "8"}, 0.21},
676 {{"", "10", "9"}, 0.13},
677 {{"", "10", "11"}, 0.25},
678 {{"", "10", "12"}, 0.25},
679 {{"", "11", "1"}, 0.19},
680 {{"", "11", "2"}, 0.2},
681 {{"", "11", "3"}, 0.25},
682 {{"", "11", "4"}, 0.27},
683 {{"", "11", "5"}, 0.32},
684 {{"", "11", "6"}, 0.38},
685 {{"", "11", "7"}, 0.38},
686 {{"", "11", "8"}, 0.39},
687 {{"", "11", "9"}, 0.21},
688 {{"", "11", "10"}, 0.25},
689 {{"", "11", "12"}, 0.51},
690 {{"", "12", "1"}, 0.19},
691 {{"", "12", "2"}, 0.2},
692 {{"", "12", "3"}, 0.25},
693 {{"", "12", "4"}, 0.27},
694 {{"", "12", "5"}, 0.32},
695 {{"", "12", "6"}, 0.38},
696 {{"", "12", "7"}, 0.38},
697 {{"", "12", "8"}, 0.39},
698 {{"", "12", "9"}, 0.21},
699 {{"", "12", "10"}, 0.25},
700 {{"", "12", "11"}, 0.51}
701 };
702
703 // Commodity inter-bucket correlations
704 interBucketCorrelation_[RiskType::Commodity] = {
705 {{"", "1", "2"}, 0.16},
706 {{"", "1", "3"}, 0.11},
707 {{"", "1", "4"}, 0.19},
708 {{"", "1", "5"}, 0.22},
709 {{"", "1", "6"}, 0.12},
710 {{"", "1", "7"}, 0.22},
711 {{"", "1", "8"}, 0.02},
712 {{"", "1", "9"}, 0.27},
713 {{"", "1", "10"}, 0.08},
714 {{"", "1", "11"}, 0.11},
715 {{"", "1", "12"}, 0.05},
716 {{"", "1", "13"}, 0.04},
717 {{"", "1", "14"}, 0.06},
718 {{"", "1", "15"}, 0.01},
719 {{"", "1", "16"}, 0.0},
720 {{"", "1", "17"}, 0.1},
721 {{"", "2", "1"}, 0.16},
722 {{"", "2", "3"}, 0.89},
723 {{"", "2", "4"}, 0.94},
724 {{"", "2", "5"}, 0.93},
725 {{"", "2", "6"}, 0.32},
726 {{"", "2", "7"}, 0.24},
727 {{"", "2", "8"}, 0.19},
728 {{"", "2", "9"}, 0.21},
729 {{"", "2", "10"}, 0.06},
730 {{"", "2", "11"}, 0.39},
731 {{"", "2", "12"}, 0.23},
732 {{"", "2", "13"}, 0.39},
733 {{"", "2", "14"}, 0.29},
734 {{"", "2", "15"}, 0.13},
735 {{"", "2", "16"}, 0.0},
736 {{"", "2", "17"}, 0.66},
737 {{"", "3", "1"}, 0.11},
738 {{"", "3", "2"}, 0.89},
739 {{"", "3", "4"}, 0.87},
740 {{"", "3", "5"}, 0.88},
741 {{"", "3", "6"}, 0.17},
742 {{"", "3", "7"}, 0.17},
743 {{"", "3", "8"}, 0.13},
744 {{"", "3", "9"}, 0.12},
745 {{"", "3", "10"}, 0.03},
746 {{"", "3", "11"}, 0.24},
747 {{"", "3", "12"}, 0.04},
748 {{"", "3", "13"}, 0.27},
749 {{"", "3", "14"}, 0.19},
750 {{"", "3", "15"}, 0.08},
751 {{"", "3", "16"}, 0.0},
752 {{"", "3", "17"}, 0.61},
753 {{"", "4", "1"}, 0.19},
754 {{"", "4", "2"}, 0.94},
755 {{"", "4", "3"}, 0.87},
756 {{"", "4", "5"}, 0.92},
757 {{"", "4", "6"}, 0.37},
758 {{"", "4", "7"}, 0.27},
759 {{"", "4", "8"}, 0.21},
760 {{"", "4", "9"}, 0.21},
761 {{"", "4", "10"}, 0.03},
762 {{"", "4", "11"}, 0.36},
763 {{"", "4", "12"}, 0.16},
764 {{"", "4", "13"}, 0.27},
765 {{"", "4", "14"}, 0.28},
766 {{"", "4", "15"}, 0.09},
767 {{"", "4", "16"}, 0.0},
768 {{"", "4", "17"}, 0.64},
769 {{"", "5", "1"}, 0.22},
770 {{"", "5", "2"}, 0.93},
771 {{"", "5", "3"}, 0.88},
772 {{"", "5", "4"}, 0.92},
773 {{"", "5", "6"}, 0.29},
774 {{"", "5", "7"}, 0.26},
775 {{"", "5", "8"}, 0.19},
776 {{"", "5", "9"}, 0.23},
777 {{"", "5", "10"}, 0.1},
778 {{"", "5", "11"}, 0.4},
779 {{"", "5", "12"}, 0.27},
780 {{"", "5", "13"}, 0.38},
781 {{"", "5", "14"}, 0.3},
782 {{"", "5", "15"}, 0.15},
783 {{"", "5", "16"}, 0.0},
784 {{"", "5", "17"}, 0.64},
785 {{"", "6", "1"}, 0.12},
786 {{"", "6", "2"}, 0.32},
787 {{"", "6", "3"}, 0.17},
788 {{"", "6", "4"}, 0.37},
789 {{"", "6", "5"}, 0.29},
790 {{"", "6", "7"}, 0.19},
791 {{"", "6", "8"}, 0.6},
792 {{"", "6", "9"}, 0.18},
793 {{"", "6", "10"}, 0.09},
794 {{"", "6", "11"}, 0.22},
795 {{"", "6", "12"}, 0.09},
796 {{"", "6", "13"}, 0.14},
797 {{"", "6", "14"}, 0.16},
798 {{"", "6", "15"}, 0.1},
799 {{"", "6", "16"}, 0.0},
800 {{"", "6", "17"}, 0.37},
801 {{"", "7", "1"}, 0.22},
802 {{"", "7", "2"}, 0.24},
803 {{"", "7", "3"}, 0.17},
804 {{"", "7", "4"}, 0.27},
805 {{"", "7", "5"}, 0.26},
806 {{"", "7", "6"}, 0.19},
807 {{"", "7", "8"}, 0.06},
808 {{"", "7", "9"}, 0.68},
809 {{"", "7", "10"}, 0.16},
810 {{"", "7", "11"}, 0.21},
811 {{"", "7", "12"}, 0.1},
812 {{"", "7", "13"}, 0.24},
813 {{"", "7", "14"}, 0.25},
814 {{"", "7", "15"}, -0.01},
815 {{"", "7", "16"}, 0.0},
816 {{"", "7", "17"}, 0.27},
817 {{"", "8", "1"}, 0.02},
818 {{"", "8", "2"}, 0.19},
819 {{"", "8", "3"}, 0.13},
820 {{"", "8", "4"}, 0.21},
821 {{"", "8", "5"}, 0.19},
822 {{"", "8", "6"}, 0.6},
823 {{"", "8", "7"}, 0.06},
824 {{"", "8", "9"}, 0.12},
825 {{"", "8", "10"}, 0.01},
826 {{"", "8", "11"}, 0.1},
827 {{"", "8", "12"}, 0.03},
828 {{"", "8", "13"}, 0.02},
829 {{"", "8", "14"}, 0.07},
830 {{"", "8", "15"}, 0.1},
831 {{"", "8", "16"}, 0.0},
832 {{"", "8", "17"}, 0.21},
833 {{"", "9", "1"}, 0.27},
834 {{"", "9", "2"}, 0.21},
835 {{"", "9", "3"}, 0.12},
836 {{"", "9", "4"}, 0.21},
837 {{"", "9", "5"}, 0.23},
838 {{"", "9", "6"}, 0.18},
839 {{"", "9", "7"}, 0.68},
840 {{"", "9", "8"}, 0.12},
841 {{"", "9", "10"}, 0.05},
842 {{"", "9", "11"}, 0.16},
843 {{"", "9", "12"}, 0.03},
844 {{"", "9", "13"}, 0.19},
845 {{"", "9", "14"}, 0.16},
846 {{"", "9", "15"}, -0.01},
847 {{"", "9", "16"}, 0.0},
848 {{"", "9", "17"}, 0.19},
849 {{"", "10", "1"}, 0.08},
850 {{"", "10", "2"}, 0.06},
851 {{"", "10", "3"}, 0.03},
852 {{"", "10", "4"}, 0.03},
853 {{"", "10", "5"}, 0.1},
854 {{"", "10", "6"}, 0.09},
855 {{"", "10", "7"}, 0.16},
856 {{"", "10", "8"}, 0.01},
857 {{"", "10", "9"}, 0.05},
858 {{"", "10", "11"}, 0.08},
859 {{"", "10", "12"}, 0.04},
860 {{"", "10", "13"}, 0.05},
861 {{"", "10", "14"}, 0.11},
862 {{"", "10", "15"}, 0.02},
863 {{"", "10", "16"}, 0.0},
864 {{"", "10", "17"}, 0.0},
865 {{"", "11", "1"}, 0.11},
866 {{"", "11", "2"}, 0.39},
867 {{"", "11", "3"}, 0.24},
868 {{"", "11", "4"}, 0.36},
869 {{"", "11", "5"}, 0.4},
870 {{"", "11", "6"}, 0.22},
871 {{"", "11", "7"}, 0.21},
872 {{"", "11", "8"}, 0.1},
873 {{"", "11", "9"}, 0.16},
874 {{"", "11", "10"}, 0.08},
875 {{"", "11", "12"}, 0.34},
876 {{"", "11", "13"}, 0.19},
877 {{"", "11", "14"}, 0.22},
878 {{"", "11", "15"}, 0.15},
879 {{"", "11", "16"}, 0.0},
880 {{"", "11", "17"}, 0.34},
881 {{"", "12", "1"}, 0.05},
882 {{"", "12", "2"}, 0.23},
883 {{"", "12", "3"}, 0.04},
884 {{"", "12", "4"}, 0.16},
885 {{"", "12", "5"}, 0.27},
886 {{"", "12", "6"}, 0.09},
887 {{"", "12", "7"}, 0.1},
888 {{"", "12", "8"}, 0.03},
889 {{"", "12", "9"}, 0.03},
890 {{"", "12", "10"}, 0.04},
891 {{"", "12", "11"}, 0.34},
892 {{"", "12", "13"}, 0.14},
893 {{"", "12", "14"}, 0.26},
894 {{"", "12", "15"}, 0.09},
895 {{"", "12", "16"}, 0.0},
896 {{"", "12", "17"}, 0.2},
897 {{"", "13", "1"}, 0.04},
898 {{"", "13", "2"}, 0.39},
899 {{"", "13", "3"}, 0.27},
900 {{"", "13", "4"}, 0.27},
901 {{"", "13", "5"}, 0.38},
902 {{"", "13", "6"}, 0.14},
903 {{"", "13", "7"}, 0.24},
904 {{"", "13", "8"}, 0.02},
905 {{"", "13", "9"}, 0.19},
906 {{"", "13", "10"}, 0.05},
907 {{"", "13", "11"}, 0.19},
908 {{"", "13", "12"}, 0.14},
909 {{"", "13", "14"}, 0.3},
910 {{"", "13", "15"}, 0.16},
911 {{"", "13", "16"}, 0.0},
912 {{"", "13", "17"}, 0.4},
913 {{"", "14", "1"}, 0.06},
914 {{"", "14", "2"}, 0.29},
915 {{"", "14", "3"}, 0.19},
916 {{"", "14", "4"}, 0.28},
917 {{"", "14", "5"}, 0.3},
918 {{"", "14", "6"}, 0.16},
919 {{"", "14", "7"}, 0.25},
920 {{"", "14", "8"}, 0.07},
921 {{"", "14", "9"}, 0.16},
922 {{"", "14", "10"}, 0.11},
923 {{"", "14", "11"}, 0.22},
924 {{"", "14", "12"}, 0.26},
925 {{"", "14", "13"}, 0.3},
926 {{"", "14", "15"}, 0.09},
927 {{"", "14", "16"}, 0.0},
928 {{"", "14", "17"}, 0.3},
929 {{"", "15", "1"}, 0.01},
930 {{"", "15", "2"}, 0.13},
931 {{"", "15", "3"}, 0.08},
932 {{"", "15", "4"}, 0.09},
933 {{"", "15", "5"}, 0.15},
934 {{"", "15", "6"}, 0.1},
935 {{"", "15", "7"}, -0.01},
936 {{"", "15", "8"}, 0.1},
937 {{"", "15", "9"}, -0.01},
938 {{"", "15", "10"}, 0.02},
939 {{"", "15", "11"}, 0.15},
940 {{"", "15", "12"}, 0.09},
941 {{"", "15", "13"}, 0.16},
942 {{"", "15", "14"}, 0.09},
943 {{"", "15", "16"}, 0.0},
944 {{"", "15", "17"}, 0.16},
945 {{"", "16", "1"}, 0.0},
946 {{"", "16", "2"}, 0.0},
947 {{"", "16", "3"}, 0.0},
948 {{"", "16", "4"}, 0.0},
949 {{"", "16", "5"}, 0.0},
950 {{"", "16", "6"}, 0.0},
951 {{"", "16", "7"}, 0.0},
952 {{"", "16", "8"}, 0.0},
953 {{"", "16", "9"}, 0.0},
954 {{"", "16", "10"}, 0.0},
955 {{"", "16", "11"}, 0.0},
956 {{"", "16", "12"}, 0.0},
957 {{"", "16", "13"}, 0.0},
958 {{"", "16", "14"}, 0.0},
959 {{"", "16", "15"}, 0.0},
960 {{"", "16", "17"}, 0.0},
961 {{"", "17", "1"}, 0.1},
962 {{"", "17", "2"}, 0.66},
963 {{"", "17", "3"}, 0.61},
964 {{"", "17", "4"}, 0.64},
965 {{"", "17", "5"}, 0.64},
966 {{"", "17", "6"}, 0.37},
967 {{"", "17", "7"}, 0.27},
968 {{"", "17", "8"}, 0.21},
969 {{"", "17", "9"}, 0.19},
970 {{"", "17", "10"}, 0.0},
971 {{"", "17", "11"}, 0.34},
972 {{"", "17", "12"}, 0.2},
973 {{"", "17", "13"}, 0.4},
974 {{"", "17", "14"}, 0.3},
975 {{"", "17", "15"}, 0.16},
976 {{"", "17", "16"}, 0.0}
977 };
978
979 // Equity intra-bucket correlations (exclude Residual and deal with it in the method - it is 0%) - changed
980 intraBucketCorrelation_[RiskType::Equity] = {
981 {{"1", "", ""}, 0.14},
982 {{"2", "", ""}, 0.20},
983 {{"3", "", ""}, 0.25},
984 {{"4", "", ""}, 0.23},
985 {{"5", "", ""}, 0.23},
986 {{"6", "", ""}, 0.32},
987 {{"7", "", ""}, 0.35},
988 {{"8", "", ""}, 0.32},
989 {{"9", "", ""}, 0.17},
990 {{"10", "", ""}, 0.16},
991 {{"11", "", ""}, 0.51},
992 {{"12", "", ""}, 0.51}
993 };
994
995 // Commodity intra-bucket correlations
996 intraBucketCorrelation_[RiskType::Commodity] = {
997 {{"1", "", ""}, 0.27},
998 {{"2", "", ""}, 0.97},
999 {{"3", "", ""}, 0.92},
1000 {{"4", "", ""}, 0.97},
1001 {{"5", "", ""}, 0.99},
1002 {{"6", "", ""}, 1.00},
1003 {{"7", "", ""}, 1.00},
1004 {{"8", "", ""}, 0.40},
1005 {{"9", "", ""}, 0.73},
1006 {{"10", "", ""}, 0.13},
1007 {{"11", "", ""}, 0.53},
1008 {{"12", "", ""}, 0.64},
1009 {{"13", "", ""}, 0.63},
1010 {{"14", "", ""}, 0.26},
1011 {{"15", "", ""}, 0.26},
1012 {{"16", "", ""}, 0.00},
1013 {{"17", "", ""}, 0.38}};
1014
1015 // Initialise the single, ad-hoc type, correlations
1016 xccyCorr_ = 0.19;
1017 infCorr_ = 0.33;
1018 infVolCorr_ = 0.33;
1019 irSubCurveCorr_ = 0.98;
1020 irInterCurrencyCorr_ = 0.21;
1022 crqSameIntraCorr_ = 0.96;
1023 crqDiffIntraCorr_ = 0.39;
1025 crnqSameIntraCorr_ = 0.57;
1026 crnqDiffIntraCorr_ = 0.20;
1027 crnqInterCorr_ = 0.16;
1028 fxCorr_ = 0.5;
1029 basecorrCorr_ = 0.05;
1030
1031 // clang-format on
1032}
1033
1034/* The CurvatureMargin must be multiplied by a scale factor of HVR(IR)^{-2}, where HVR(IR)
1035is the historical volatility ratio for the interest-rate risk class (see page 5 section 11
1036of the ISDA-SIMM-v2.1 documentation).
1037*/
1039 QuantLib::Real hvr = 0.62;
1040 return pow(hvr, -2.0);
1041}
1042
1043void SimmConfiguration_ISDA_V2_1::addLabels2(const RiskType& rt, const string& label_2) {
1044 // Call the shared implementation
1046}
1047
1048string SimmConfiguration_ISDA_V2_1::label2(const QuantLib::ext::shared_ptr<InterestRateIndex>& irIndex) const {
1049 // Special for BMA
1050 if (boost::algorithm::starts_with(irIndex->name(), "BMA")) {
1051 return "Municipal";
1052 }
1053
1054 // Otherwise pass off to base class
1055 return SimmConfigurationBase::label2(irIndex);
1056}
1057
1058} // namespace analytics
1059} // namespace ore
virtual std::string label2(const QuantLib::ext::shared_ptr< QuantLib::InterestRateIndex > &irIndex) const
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.
SimmConfiguration_ISDA_V2_1(const QuantLib::ext::shared_ptr< SimmBucketMapper > &simmBucketMapper, const std::string &name="SIMM ISDA 2.1 (10 July 2018)", const std::string version="2.1")
QuantLib::Real crqResidualIntraCorr_
Credit-Q residual intra correlation.
QuantLib::Real basecorrCorr_
Base correlation risk factor correlation.
std::map< CrifRecord::RiskType, QuantLib::Real > rwRiskType_
QuantLib::Real crnqResidualIntraCorr_
Credit-NonQ residual intra correlation.
std::map< CrifRecord::RiskType, std::vector< std::string > > mapLabels_2_
QuantLib::Real irInterCurrencyCorr_
IR correlation across currencies.
std::map< CrifRecord::RiskType, Amounts > rwLabel_1_
std::map< CrifRecord::RiskType, Amounts > intraBucketCorrelation_
std::map< CrifRecord::RiskType, std::vector< std::string > > mapBuckets_
QuantLib::Real crnqDiffIntraCorr_
Credit-NonQ non-residual intra correlation when different underlying names.
QuantLib::Real crqSameIntraCorr_
Credit-Q non-residual intra correlation when same qualifier but different vertex/source.
QuantLib::Real crnqSameIntraCorr_
Credit-NonQ non-residual intra correlation when same underlying names.
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.
QuantLib::Real infCorr_
Correlation between any yield and inflation in same currency.
Amounts riskClassCorrelation_
Risk class correlation matrix.
QuantLib::Real crnqInterCorr_
Credit-NonQ non-residual inter bucket correlation.
std::map< CrifRecord::RiskType, QuantLib::Real > historicalVolatilityRatios_
Map from risk type to a historical volatility ratio.
std::map< CrifRecord::RiskType, Amounts > interBucketCorrelation_
std::map< CrifRecord::RiskType, std::vector< std::string > > mapLabels_1_
QuantLib::Real infVolCorr_
Correlation between any yield volatility and inflation volatility in same currency.
QuantLib::Real crqDiffIntraCorr_
Credit-Q non-residual intra correlation when different qualifier.
QuantLib::Real irSubCurveCorr_
IR Label2 level i.e. sub-curve correlation.
void addLabels2Impl(const CrifRecord::RiskType &rt, const std::string &label_2)
A base implementation of addLabels2 that can be shared by derived classes.
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.
std::map< CrifRecord::RiskType, Amounts > rwBucket_
RandomVariable pow(RandomVariable x, const RandomVariable &y)
CrifRecord::RiskType RiskType
Definition: crifloader.cpp:92
SIMM concentration thresholds for SIMM version 2.0 (1.3.44)
SIMM configuration for SIMM version 2.1 (2.0.6)
string name