Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ParStressScenarioConverter Class Reference

Convert all par shifts in a single stress test scenario to zero shifts. More...

#include <orea/engine/parstressscenarioconverter.hpp>

+ Collaboration diagram for ParStressScenarioConverter:

Public Member Functions

 ParStressScenarioConverter (const QuantLib::Date &asof, const std::vector< RiskFactorKey > &sortedParInstrumentRiskFactorKeys, const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > &simMarketParams, const QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioData > &sensiScenarioData, const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarket > &simMarket, const ore::analytics::ParSensitivityInstrumentBuilder::Instruments &parInstruments, bool useSpreadedTermStructure)
 
ore::analytics::StressTestScenarioData::StressTestData convertScenario (const StressTestScenarioData::StressTestData &scenario) const
 Convert par shifts in a stress scenario to zero shifts. More...
 

Private Member Functions

bool scenarioCanBeConverted (const StressTestScenarioData::StressTestData &parStressScenario) const
 check if the scenario can be converted More...
 
double maturityTime (const RiskFactorKey &key) const
 compute the time to tenor of the risk factor key More...
 
std::pair< size_t, size_t > getCapFloorTenorAndStrikeIds (const RiskFactorKey &rfKey) const
 get the strike and tenor from a optionlet riskfactor key More...
 
double shiftsSizeForScenario (const RiskFactorKey rfKey, double targetValue, double baseValue) const
 convert the scenario value to the corresponding zero shift size for the stress test data More...
 
void updateTargetStressTestScenarioData (StressTestScenarioData::StressTestData &stressScenario, const RiskFactorKey &key, const double zeroShift) const
 add zero shifts in the stress test data More...
 
double impliedParRate (const RiskFactorKey &key) const
 Compute the implied fair rate of the par instrument. More...
 
double getStressShift (const RiskFactorKey &key, const StressTestScenarioData::StressTestData &stressScenario) const
 get the par stress shift size from stress test data More...
 
double lowerBound (const RiskFactorKey key) const
 
double upperBound (const RiskFactorKey key) const
 

Private Attributes

QuantLib::Date asof_
 
const std::vector< RiskFactorKeysortedParInstrumentRiskFactorKeys_
 
QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameterssimMarketParams_
 
QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioDatasensiScenarioData_
 
QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketsimMarket_
 
const ore::analytics::ParSensitivityInstrumentBuilder::InstrumentsparInstruments_
 
bool useSpreadedTermStructure_ = true
 
double minVol_ = 1e-8
 
double maxVol_ = 10.0
 
double minDiscountFactor_ = 1e-8
 
double maxDiscountFactor_ = 10.0
 
double accuracy_ = 1e-8
 

Detailed Description

Convert all par shifts in a single stress test scenario to zero shifts.

Definition at line 43 of file parstressscenarioconverter.hpp.

Constructor & Destructor Documentation

◆ ParStressScenarioConverter()

ParStressScenarioConverter ( const QuantLib::Date &  asof,
const std::vector< RiskFactorKey > &  sortedParInstrumentRiskFactorKeys,
const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > &  simMarketParams,
const QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioData > &  sensiScenarioData,
const QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarket > &  simMarket,
const ore::analytics::ParSensitivityInstrumentBuilder::Instruments parInstruments,
bool  useSpreadedTermStructure 
)

Definition at line 313 of file parstressscenarioconverter.cpp.

319 : asof_(asof), sortedParInstrumentRiskFactorKeys_(sortedParInstrumentRiskFactorKeys),
320 simMarketParams_(simMarketParams), sensiScenarioData_(sensiScenarioData), simMarket_(simMarket),
321 parInstruments_(parInstruments), useSpreadedTermStructure_(useSpreadedTermStructure) {}
QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarketParameters > simMarketParams_
QuantLib::ext::shared_ptr< ore::analytics::SensitivityScenarioData > sensiScenarioData_
const std::vector< RiskFactorKey > sortedParInstrumentRiskFactorKeys_
const ore::analytics::ParSensitivityInstrumentBuilder::Instruments & parInstruments_
QuantLib::ext::shared_ptr< ore::analytics::ScenarioSimMarket > simMarket_
Date asof(14, Jun, 2018)

Member Function Documentation

◆ convertScenario()

Convert par shifts in a stress scenario to zero shifts.

Definition at line 324 of file parstressscenarioconverter.cpp.

324 {
325
326 if (!parStressScenario.containsParShifts()) {
327 return parStressScenario;
328 }
329
330 if (!scenarioCanBeConverted(parStressScenario)) {
331 WLOG("Can not convert scenario " << parStressScenario.label << " Skip it and apply all shifts as zero shifts.");
332 return parStressScenario;
333 }
334
335 simMarket_->reset();
336
337 LOG("ParStressConverter: Scenario " << parStressScenario.label << " has IR Curve Par Shifts = "
338 << ore::data::to_string(parStressScenario.irCurveParShifts));
339
340 LOG("ParStressConverter: Scenario " << parStressScenario.label << " has CapFloor Par Shifts = "
341 << ore::data::to_string(parStressScenario.irCapFloorParShifts));
342
343 LOG("ParStressConverter: Scenario " << parStressScenario.label << " has Credit Par Shifts = "
344 << ore::data::to_string(parStressScenario.creditCurveParShifts));
345
346 std::set<RiskFactorKey::KeyType> excludedParRates =
347 disabledParRates(parStressScenario.irCurveParShifts, parStressScenario.irCapFloorParShifts,
348 parStressScenario.creditCurveParShifts);
349
350 LOG("ParStressConverter: Copy scenario and remove parShifts from scenario");
351 auto zeroStressScenario = removeParShiftsCopy(parStressScenario);
352 DLOG("ParStressConverter: Clone base scenario");
353 auto zeroSimMarketScenario = simMarket_->baseScenario()->clone();
354
355 // Derive t0 (unshifted) fair Rates
356 std::vector<RiskFactorKey> relevantParKeys;
357 std::map<RiskFactorKey, double> fairRates;
358 std::map<RiskFactorKey, double> baseScenarioValues;
359 std::map<RiskFactorKey, double> targets;
360 LOG("ParStressConverter: Compute fair rate and target rate for all ParInstruments");
361 for (const auto& rfKey : sortedParInstrumentRiskFactorKeys_) {
362 if (excludedParRates.count(rfKey.keytype) == 0 &&
363 (supportedCurveShiftTypes.count(rfKey.keytype) == 1 ||
365 relevantParKeys.push_back(rfKey);
366 const double fairRate = impliedParRate(rfKey);
367 // TODO get shift type;
368 const double target =
369 computeTargetRate(fairRate, getStressShift(rfKey, parStressScenario), ShiftType::Absolute);
370 const double baseScenarioValue = simMarket_->baseScenario()->get(rfKey);
371 const double baseScenarioAbsoluteValue = simMarket_->baseScenarioAbsolute()->get(rfKey);
372 DLOG("ParStressConverter: ParInstrument "
373 << rfKey << ", fair rate = " << fairRate << ", target rate = " << target << ", baseScenarioValue = "
374 << baseScenarioValue << ", baseScenarioAbsoluteValue = " << baseScenarioAbsoluteValue);
375 fairRates[rfKey] = fairRate;
376 targets[rfKey] = target;
377 baseScenarioValues[rfKey] = baseScenarioValue;
378 } else {
379 DLOG("Skip parInsturment " << rfKey << " the shifts for this risk factor type are in zero domain.");
380 }
381 }
382 // Optimize IR curves and Credit curves
383 LOG("ParStressConverter: Imply zero shifts");
384 std::map<RiskFactorKey, double> shifts;
385 for (const auto& rfKey : relevantParKeys) {
386 DLOG("Imply zero shifts for parInstrument " << rfKey);
387 const double target = targets[rfKey];
388 auto targetFunction = [this, &target, &rfKey, &zeroSimMarketScenario](double x) {
389 zeroSimMarketScenario->add(rfKey, x);
390 simMarket_->applyScenario(zeroSimMarketScenario);
391 return (impliedParRate(rfKey) - target) * 1e6;
392 };
393 double targetValue;
394 Brent brent;
395 try {
396 DLOG("ParStressConverter: Try to imply zero rate" << rfKey << " with bounds << " << lowerBound(rfKey) << ","
397 << upperBound(rfKey));
398 targetValue =
399 brent.solve(targetFunction, accuracy_, baseScenarioValues[rfKey], lowerBound(rfKey), upperBound(rfKey));
400 } catch (const std::exception& e) {
401 ALOG("ParStressConverter: Couldn't find a solution to imply a zero rate for parRate " << rfKey << ", got "
402 << e.what());
403 targetValue = simMarket_->baseScenario()->get(rfKey);
404 }
405 zeroSimMarketScenario->add(rfKey, targetValue);
406 shifts[rfKey] = shiftsSizeForScenario(rfKey, targetValue, baseScenarioValues[rfKey]);
407 updateTargetStressTestScenarioData(zeroStressScenario, rfKey, shifts[rfKey]);
408 }
409 simMarket_->applyScenario(zeroSimMarketScenario);
410 DLOG("ParStressConverter: Implied Scenario");
411 DLOG("parInstrument;fairRate;targetFairRate;zeroBaseValue;shift");
412 for (const auto& rfKey : relevantParKeys) {
413 DLOG(rfKey << ";" << impliedParRate(rfKey) << ";" << targets[rfKey] << ";" << baseScenarioValues[rfKey] << ";"
414 << shifts[rfKey]);
415 }
416 simMarket_->reset();
417 return zeroStressScenario;
418}
bool scenarioCanBeConverted(const StressTestScenarioData::StressTestData &parStressScenario) const
check if the scenario can be converted
double shiftsSizeForScenario(const RiskFactorKey rfKey, double targetValue, double baseValue) const
convert the scenario value to the corresponding zero shift size for the stress test data
double getStressShift(const RiskFactorKey &key, const StressTestScenarioData::StressTestData &stressScenario) const
get the par stress shift size from stress test data
double impliedParRate(const RiskFactorKey &key) const
Compute the implied fair rate of the par instrument.
double upperBound(const RiskFactorKey key) const
void updateTargetStressTestScenarioData(StressTestScenarioData::StressTestData &stressScenario, const RiskFactorKey &key, const double zeroShift) const
add zero shifts in the stress test data
double lowerBound(const RiskFactorKey key) const
#define LOG(text)
#define DLOG(text)
#define ALOG(text)
#define WLOG(text)
std::set< RiskFactorKey::KeyType > disabledParRates(bool irCurveParRates, bool irCapFloorParRates, bool creditParRates)
std::string to_string(const LocationInfo &l)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ scenarioCanBeConverted()

bool scenarioCanBeConverted ( const StressTestScenarioData::StressTestData parStressScenario) const
private

check if the scenario can be converted

Check if the scenarios defines a shift for each par rate defined in the sensitivityScenarioData;.

Definition at line 272 of file parstressscenarioconverter.cpp.

273 {
274 DLOG("Check if the par stresstest scenario is compatible with the parInstruments");
275 bool result = true;
276 if (parStressScenario.irCurveParShifts) {
277 // We require that shifts between stress scenario and sensi scenario are aligned
278 for (const auto& [ccy, curveShifts] : parStressScenario.discountCurveShifts) {
279 DLOG("Check if pillars between stress test and sensi config are alligned for discount curve " << ccy);
280 result = result && checkCurveShiftData(ccy, curveShifts, sensiScenarioData_->discountCurveShiftData());
281 }
282
283 for (const auto& [indexName, curveShifts] : parStressScenario.indexCurveShifts) {
284 DLOG("Check if pillars between stress test and sensi config are alligned for index curve " << indexName);
285 result = result && checkCurveShiftData(indexName, curveShifts, sensiScenarioData_->indexCurveShiftData());
286 }
287
288 for (const auto& [curveName, curveShifts] : parStressScenario.yieldCurveShifts) {
289 DLOG("Check if pillars between stress test and sensi config are alligned for yield curve " << curveName);
290 result = result && checkCurveShiftData(curveName, curveShifts, sensiScenarioData_->yieldCurveShiftData());
291 }
292 }
293
294 if (parStressScenario.creditCurveParShifts) {
295 for (const auto& [curveName, curveShifts] : parStressScenario.survivalProbabilityShifts) {
296 DLOG("Check if pillars between stress test and sensi config are alligned for credit curve " << curveName);
297 result = result && checkCurveShiftData(curveName, curveShifts, sensiScenarioData_->creditCurveShiftData());
298 }
299 }
300
301 if (parStressScenario.irCapFloorParShifts) {
302 for (const auto& [capSurfaceName, capShifts] : parStressScenario.capVolShifts) {
303 DLOG("Check if pillars and strikes between stress test and sensi config are alligned for cap floor surface "
304 << capSurfaceName);
305 result =
306 result && checkCapFloorShiftData(capSurfaceName, capShifts, sensiScenarioData_->capFloorVolShiftData());
307 }
308 }
309
310 return result;
311}
bool checkCapFloorShiftData(const std::string &name, const StressTestScenarioData::CapFloorVolShiftData &stressShiftData, const std::map< std::string, QuantLib::ext::shared_ptr< SensitivityScenarioData::CapFloorVolShiftData > > &sensiData)
Checks the the strikes and expiries of cap floors in stresstest scenario are alligned with par sensit...
bool checkCurveShiftData(const std::string &name, const StressTestScenarioData::CurveShiftData &stressShiftData, const std::map< std::string, QuantLib::ext::shared_ptr< SensitivityScenarioData::CurveShiftData > > &sensiData)
Checks the the tenors for curves in a stresstest scenario are alligned with par sensitivity config.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ maturityTime()

double maturityTime ( const RiskFactorKey key) const
private

compute the time to tenor of the risk factor key

Definition at line 420 of file parstressscenarioconverter.cpp.

420 {
421 boost::shared_ptr<QuantLib::TermStructure> ts;
422 QuantLib::Period tenor;
423 switch (rfKey.keytype) {
425 ts = *simMarket_->discountCurve(rfKey.name);
426 tenor = getYieldCurvePeriod(rfKey, simMarketParams_);
427 break;
429 ts = *simMarket_->yieldCurve(rfKey.name);
430 tenor = getYieldCurvePeriod(rfKey, simMarketParams_);
431 break;
433 ts = *simMarket_->iborIndex(rfKey.name)->forwardingTermStructure();
434 tenor = getYieldCurvePeriod(rfKey, simMarketParams_);
435 break;
437 ts = *simMarket_->defaultCurve(rfKey.name)->curve();
438 QL_REQUIRE(rfKey.index < simMarketParams_->defaultTenors(rfKey.name).size(),
439 "Please align pillars, internal error");
440 tenor = simMarketParams_->defaultTenors(rfKey.name)[rfKey.index];
441 break;
443 ts = *simMarket_->capFloorVol(rfKey.name);
444 auto [tenorId, strikeId] = getCapFloorTenorAndStrikeIds(rfKey);
445 QL_REQUIRE(
446 simMarketParams_->capFloorVolExpiries(rfKey.name).size() > tenorId,
447 "Internal Error: ParStressScenarioConversion, simmarket and par sensitivity instruments are not aligned.");
448 tenor = simMarketParams_->capFloorVolExpiries(rfKey.name)[tenorId];
449 }
450 default:
451 QL_FAIL("ParStressScenario to ZeroConversion: Unsupported riskfactor, can not compute time to maturity "
452 "from curve");
453 }
454 return ts->dayCounter().yearFraction(asof_, asof_ + tenor);
455}
std::pair< size_t, size_t > getCapFloorTenorAndStrikeIds(const RiskFactorKey &rfKey) const
get the strike and tenor from a optionlet riskfactor key
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCapFloorTenorAndStrikeIds()

std::pair< size_t, size_t > getCapFloorTenorAndStrikeIds ( const RiskFactorKey rfKey) const
private

get the strike and tenor from a optionlet riskfactor key

Definition at line 457 of file parstressscenarioconverter.cpp.

457 {
458 size_t nStrikes = simMarketParams_->capFloorVolStrikes(rfKey.name).size();
459 size_t n = rfKey.index;
460 size_t tenorId = n / nStrikes;
461 size_t strikeId = n % nStrikes;
462 return {tenorId, strikeId};
463}
+ Here is the caller graph for this function:

◆ shiftsSizeForScenario()

double shiftsSizeForScenario ( const RiskFactorKey  rfKey,
double  targetValue,
double  baseValue 
) const
private

convert the scenario value to the corresponding zero shift size for the stress test data

Definition at line 465 of file parstressscenarioconverter.cpp.

466 {
467 DLOG("compute shift for" << rfKey << " targetZeroValue " << targetValue << " baseValue " << baseValue);
468 double shift = 0.0;
469 switch (rfKey.keytype) {
474 double ttm = maturityTime(rfKey);
475 DLOG("TTM " << ttm);
477 shift = -std::log(targetValue / baseValue) / ttm;
478 } else {
479 shift = -std::log(targetValue) / ttm;
480 }
481 DLOG("Shift = " << shift);
482 break;
483 }
486 shift = targetValue - baseValue;
487 } else {
488 shift = targetValue;
489 };
490 break;
491 default:
492 QL_FAIL("ShiftSizeForScenario: Unsupported par instruments type " << rfKey.keytype);
493 }
494 return shift;
495}
double maturityTime(const RiskFactorKey &key) const
compute the time to tenor of the risk factor key
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateTargetStressTestScenarioData()

void updateTargetStressTestScenarioData ( StressTestScenarioData::StressTestData stressScenario,
const RiskFactorKey key,
const double  zeroShift 
) const
private

add zero shifts in the stress test data

Definition at line 519 of file parstressscenarioconverter.cpp.

520 {
521 if (key.keytype == RiskFactorKey::KeyType::DiscountCurve) {
522 if (stressScenario.discountCurveShifts.count(key.name) == 0) {
523 StressTestScenarioData::CurveShiftData newData;
524 newData.shiftType = ShiftType::Absolute;
525 newData.shiftTenors = simMarketParams_->yieldCurveTenors(key.name);
526 newData.shifts = std::vector<double>(newData.shiftTenors.size(), 0.0);
527 newData.shifts[key.index] = zeroShift;
528 stressScenario.discountCurveShifts.insert({key.name, newData});
529 } else {
530 stressScenario.discountCurveShifts.at(key.name).shifts[key.index] = zeroShift;
531 }
532 } else if (key.keytype == RiskFactorKey::KeyType::IndexCurve) {
533 if (stressScenario.indexCurveShifts.count(key.name) == 0) {
534 StressTestScenarioData::CurveShiftData newData;
535 newData.shiftType = ShiftType::Absolute;
536 newData.shiftTenors = simMarketParams_->yieldCurveTenors(key.name);
537 newData.shifts = std::vector<double>(newData.shiftTenors.size(), 0.0);
538 newData.shifts[key.index] = zeroShift;
539 stressScenario.indexCurveShifts.insert({key.name, newData});
540 } else {
541 stressScenario.indexCurveShifts.at(key.name).shifts[key.index] = zeroShift;
542 }
543 } else if (key.keytype == RiskFactorKey::KeyType::SurvivalProbability) {
544 if (stressScenario.survivalProbabilityShifts.count(key.name) == 0) {
545 StressTestScenarioData::CurveShiftData newData;
546 newData.shiftType = ShiftType::Absolute;
547 newData.shiftTenors = simMarketParams_->defaultTenors(key.name);
548 newData.shifts = std::vector<double>(newData.shiftTenors.size(), 0.0);
549 newData.shifts[key.index] = zeroShift;
550 stressScenario.survivalProbabilityShifts.insert({key.name, newData});
551 } else {
552 stressScenario.survivalProbabilityShifts.at(key.name).shifts[key.index] = zeroShift;
553 }
554 } else if (key.keytype == RiskFactorKey::KeyType::OptionletVolatility) {
555 if (stressScenario.capVolShifts.count(key.name) == 0) {
556 StressTestScenarioData::CapFloorVolShiftData newData;
557 newData.shiftType = ShiftType::Absolute;
558 newData.shiftExpiries = simMarketParams_->capFloorVolExpiries(key.name);
559 newData.shiftStrikes = simMarketParams_->capFloorVolStrikes(key.name);
560 for (size_t i = 0; i < newData.shiftExpiries.size(); ++i) {
561 newData.shifts[newData.shiftExpiries[i]] = std::vector<double>(newData.shiftStrikes.size(), 0.0);
562 }
563 const auto& [expiryId, strikeId] = getCapFloorTenorAndStrikeIds(key);
564 newData.shifts[newData.shiftExpiries[expiryId]][strikeId] = zeroShift;
565 stressScenario.capVolShifts.insert({key.name, newData});
566 } else {
567 StressTestScenarioData::CapFloorVolShiftData& newData = stressScenario.capVolShifts.at(key.name);
568 const auto& [expiryId, strikeId] = getCapFloorTenorAndStrikeIds(key);
569 newData.shifts[newData.shiftExpiries[expiryId]][strikeId] = zeroShift;
570 }
571 }
572}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ impliedParRate()

double impliedParRate ( const RiskFactorKey key) const
private

Compute the implied fair rate of the par instrument.

Definition at line 497 of file parstressscenarioconverter.cpp.

497 {
500 } else if (supportedCurveShiftTypes.count(key.keytype) == 1) {
501 auto parInstIt = parInstruments_.parHelpers_.find(key);
502 QL_REQUIRE(parInstIt != parInstruments_.parHelpers_.end(),
503 "Internal error, trying to compute parRate but havent build parRateHelper");
504 return impliedQuote(parInstIt->second);
505 } else {
506 QL_FAIL("Unsupported parRate");
507 }
508}
Volatility impliedVolatility(const QuantLib::CapFloor &cap, Real targetValue, const Handle< YieldTermStructure > &d, Volatility guess, VolatilityType type, Real displacement)
Real impliedQuote(const QuantLib::ext::shared_ptr< Instrument > &i)
std::map< ore::analytics::RiskFactorKey, QuantLib::ext::shared_ptr< QuantLib::Instrument > > parHelpers_
par helpers (all except cap/floors)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getStressShift()

double getStressShift ( const RiskFactorKey key,
const StressTestScenarioData::StressTestData stressScenario 
) const
private

get the par stress shift size from stress test data

Definition at line 510 of file parstressscenarioconverter.cpp.

511 {
513 return getCapFloorStressShift(key, stressScenario, simMarketParams_);
514 } else {
515 return getCurveStressShift(key, stressScenario);
516 }
517}
+ Here is the caller graph for this function:

◆ lowerBound()

double lowerBound ( const RiskFactorKey  key) const
private

Definition at line 574 of file parstressscenarioconverter.cpp.

574 {
576 return minVol_ - simMarket_->baseScenarioAbsolute()->get(key);
577 } else if (key.keytype == RiskFactorKey::KeyType::OptionletVolatility) {
578 return minVol_;
580 key.keytype == RiskFactorKey::KeyType::YieldCurve ||
581 key.keytype == RiskFactorKey::KeyType::IndexCurve ||
583 return minDiscountFactor_ / simMarket_->baseScenarioAbsolute()->get(key);
584 } else {
585 return minDiscountFactor_;
586 }
587}
+ Here is the caller graph for this function:

◆ upperBound()

double upperBound ( const RiskFactorKey  key) const
private

Definition at line 589 of file parstressscenarioconverter.cpp.

589 {
591 return maxVol_ * simMarket_->baseScenarioAbsolute()->get(key);
592 } else if (key.keytype == RiskFactorKey::KeyType::OptionletVolatility) {
593 return maxVol_ * simMarket_->baseScenarioAbsolute()->get(key);
595 key.keytype == RiskFactorKey::KeyType::YieldCurve ||
596 key.keytype == RiskFactorKey::KeyType::IndexCurve ||
598 return maxDiscountFactor_ / simMarket_->baseScenarioAbsolute()->get(key);
599 } else {
600 return maxDiscountFactor_;
601 }
602}
+ Here is the caller graph for this function:

Member Data Documentation

◆ asof_

QuantLib::Date asof_
private

Definition at line 82 of file parstressscenarioconverter.hpp.

◆ sortedParInstrumentRiskFactorKeys_

const std::vector<RiskFactorKey> sortedParInstrumentRiskFactorKeys_
private

Definition at line 83 of file parstressscenarioconverter.hpp.

◆ simMarketParams_

QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarketParameters> simMarketParams_
private

Definition at line 84 of file parstressscenarioconverter.hpp.

◆ sensiScenarioData_

QuantLib::ext::shared_ptr<ore::analytics::SensitivityScenarioData> sensiScenarioData_
private

Definition at line 85 of file parstressscenarioconverter.hpp.

◆ simMarket_

QuantLib::ext::shared_ptr<ore::analytics::ScenarioSimMarket> simMarket_
mutableprivate

Definition at line 86 of file parstressscenarioconverter.hpp.

◆ parInstruments_

Definition at line 87 of file parstressscenarioconverter.hpp.

◆ useSpreadedTermStructure_

bool useSpreadedTermStructure_ = true
private

Definition at line 88 of file parstressscenarioconverter.hpp.

◆ minVol_

double minVol_ = 1e-8
private

Definition at line 90 of file parstressscenarioconverter.hpp.

◆ maxVol_

double maxVol_ = 10.0
private

Definition at line 91 of file parstressscenarioconverter.hpp.

◆ minDiscountFactor_

double minDiscountFactor_ = 1e-8
private

Definition at line 92 of file parstressscenarioconverter.hpp.

◆ maxDiscountFactor_

double maxDiscountFactor_ = 10.0
private

Definition at line 93 of file parstressscenarioconverter.hpp.

◆ accuracy_

double accuracy_ = 1e-8
private

Definition at line 94 of file parstressscenarioconverter.hpp.