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