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