194 {
195
196 LOG(
"Start building CrossAssetModel");
197
198 QL_REQUIRE(
market_ != NULL,
"CrossAssetModelBuilder: no market given");
199
200 DLOG(
"configurations: LgmCalibration "
205
207 DLOG(
"Calibration of the model is disabled.");
208 }
209
211
212 if (!buildersAreInitialized) {
213 QL_REQUIRE(
config_->irConfigs().size() > 0,
"missing IR configurations");
214 QL_REQUIRE(
config_->irConfigs().size() ==
config_->fxConfigs().size() + 1,
215 "FX configuration size " <<
config_->fxConfigs().size()
216 << " inconsistent with IR configuration size "
217 <<
config_->irConfigs().size());
218
233 }
234
235
236
238
239
241 if (
config_->measure() ==
"BA") {
242 measure = IrModel::Measure::BA;
243 DLOG(
"Setting measure to BA");
244 }
else if (
config_->measure() ==
"LGM") {
245 measure = IrModel::Measure::LGM;
246 DLOG(
"Setting measure to LGM");
247 }
else if (
config_->measure() ==
"") {
248 DLOG(
"Defaulting to LGM measure");
249 } else {
250 QL_FAIL(
"Measure " <<
config_->measure() <<
" not recognized");
251 }
252
253
254
255
256 std::vector<QuantLib::ext::shared_ptr<QuantExt::Parametrization>> irParametrizations;
257 std::vector<RelinkableHandle<YieldTermStructure>> irDiscountCurves;
258 std::vector<std::string> currencies, regions, crNames, eqNames, infIndices, comNames;
259 std::vector<QuantLib::ext::shared_ptr<LgmBuilder>> lgmBuilder;
260 std::vector<QuantLib::ext::shared_ptr<HwBuilder>> hwBuilder;
261 std::vector<QuantLib::ext::shared_ptr<FxBsBuilder>> fxBuilder;
262 std::vector<QuantLib::ext::shared_ptr<EqBsBuilder>> eqBuilder;
263 std::vector<QuantLib::ext::shared_ptr<CommoditySchwartzModelBuilder>> csBuilder;
264
265 std::set<std::string> recalibratedCurrencies;
266 for (Size i = 0; i <
config_->irConfigs().
size(); i++) {
267 auto irConfig =
config_->irConfigs()[i];
268 DLOG(
"IR Parametrization " << i <<
" qualifier " << irConfig->qualifier());
269
270 if (auto ir = QuantLib::ext::dynamic_pointer_cast<IrLgmData>(irConfig)) {
271 if (!buildersAreInitialized) {
272 subBuilders_[CrossAssetModel::AssetType::IR][i] = QuantLib::ext::make_shared<LgmBuilder>(
275 }
276 auto builder = QuantLib::ext::dynamic_pointer_cast<LgmBuilder>(
subBuilders_[CrossAssetModel::AssetType::IR][i]);
277 lgmBuilder.push_back(builder);
279 builder->freeze();
280 }
281 if (builder->requiresRecalibration())
282 recalibratedCurrencies.insert(builder->parametrization()->currency().code());
283 auto parametrization = builder->parametrization();
285 QL_REQUIRE(std::find(currencies.begin(), currencies.end(), parametrization->currency().code()) ==
286 currencies.end(),
287 "Duplicate IR parameterization for currency "
288 << parametrization->currency().code()
289 << " - are there maybe two indices with the same currency in CrossAssetModelData?");
290 currencies.push_back(parametrization->currency().code());
291 irParametrizations.push_back(parametrization);
292 irDiscountCurves.push_back(builder->discountCurve());
293 processInfo[CrossAssetModel::AssetType::IR].emplace_back(ir->ccy(), 1);
294 } else if (auto ir = QuantLib::ext::dynamic_pointer_cast<HwModelData>(irConfig)) {
295 bool evaluateBankAccount = true;
296 bool setCalibrationInfo = false;
298 if (!buildersAreInitialized) {
299 subBuilders_[CrossAssetModel::AssetType::IR][i] = QuantLib::ext::make_shared<HwBuilder>(
302 }
303 auto builder = QuantLib::ext::dynamic_pointer_cast<HwBuilder>(
subBuilders_[CrossAssetModel::AssetType::IR][i]);
304 hwBuilder.push_back(builder);
305 if (builder->requiresRecalibration())
306 recalibratedCurrencies.insert(builder->parametrization()->currency().code());
307 auto parametrization = builder->parametrization();
309 builder->freeze();
311 QL_REQUIRE(std::find(currencies.begin(), currencies.end(), parametrization->currency().code()) ==
312 currencies.end(),
313 "Duplicate IR parameterization for currency "
314 << parametrization->currency().code()
315 << " - are there maybe two indices with the same currency in CrossAssetModelData?");
316 currencies.push_back(parametrization->currency().code());
317 irParametrizations.push_back(parametrization);
318 irDiscountCurves.push_back(builder->discountCurve());
319 processInfo[CrossAssetModel::AssetType::IR].emplace_back(ir->ccy(), parametrization->m());
320 }
321 }
322
323 QL_REQUIRE(irParametrizations.size() > 0, "missing IR parametrizations");
324
325 QuantLib::Currency domesticCcy = irParametrizations[0]->currency();
326
327
328
329
330 std::vector<QuantLib::ext::shared_ptr<QuantExt::FxBsParametrization>> fxParametrizations;
331 for (Size i = 0; i <
config_->fxConfigs().
size(); i++) {
332 DLOG(
"FX Parametrization " << i);
333 QuantLib::ext::shared_ptr<FxBsData> fx =
config_->fxConfigs()[i];
336
337 QL_REQUIRE(ccy.code() == irParametrizations[i + 1]->currency().code(),
338 "FX parametrization currency[" << i << "]=" << ccy << " does not match IR currency[" << i + 1
339 << "]=" << irParametrizations[i + 1]->currency().code());
340
341 QL_REQUIRE(domCcy == domesticCcy, "FX parametrization [" << i << "]=" << ccy << "/" << domCcy
342 << " does not match domestic ccy " << domesticCcy);
343
344 if (!buildersAreInitialized) {
347 }
348 auto builder = QuantLib::ext::dynamic_pointer_cast<FxBsBuilder>(
subBuilders_[CrossAssetModel::AssetType::FX][i]);
349 fxBuilder.push_back(builder);
350
351 QuantLib::ext::shared_ptr<QuantExt::FxBsParametrization> parametrization = builder->parametrization();
352
354 fxParametrizations.push_back(parametrization);
355 processInfo[CrossAssetModel::AssetType::FX].emplace_back(ccy.code() + domCcy.code(), 1);
356 }
357
358
359
360
361 std::vector<QuantLib::ext::shared_ptr<QuantExt::EqBsParametrization>> eqParametrizations;
362 for (Size i = 0; i <
config_->eqConfigs().
size(); i++) {
363 DLOG(
"EQ Parametrization " << i);
364 QuantLib::ext::shared_ptr<EqBsData> eq =
config_->eqConfigs()[i];
365 string eqName = eq->eqName();
367 QL_REQUIRE(std::find(currencies.begin(), currencies.end(), eqCcy.code()) != currencies.end(),
368 "Currency (" << eqCcy << ") for equity " << eqName << " not covered by CrossAssetModelData");
369 if (!buildersAreInitialized) {
370 subBuilders_[CrossAssetModel::AssetType::EQ][i] = QuantLib::ext::make_shared<EqBsBuilder>(
372 }
373 QuantLib::ext::shared_ptr<EqBsBuilder> builder =
374 QuantLib::ext::dynamic_pointer_cast<EqBsBuilder>(
subBuilders_[CrossAssetModel::AssetType::EQ][i]);
375 eqBuilder.push_back(builder);
376 QuantLib::ext::shared_ptr<QuantExt::EqBsParametrization> parametrization = builder->parametrization();
378 eqParametrizations.push_back(parametrization);
379 eqNames.push_back(eqName);
380 processInfo[CrossAssetModel::AssetType::EQ].emplace_back(eqName, 1);
381 }
382
383
384
385
386 vector<QuantLib::ext::shared_ptr<Parametrization>> infParameterizations;
387 for (Size i = 0; i <
config_->infConfigs().
size(); i++) {
388 QuantLib::ext::shared_ptr<InflationModelData> imData =
config_->infConfigs()[i];
389 DLOG(
"Inflation parameterisation (" << i <<
") for index " << imData->index());
390 if (auto dkData = QuantLib::ext::dynamic_pointer_cast<InfDkData>(imData)) {
391 if (!buildersAreInitialized) {
392 subBuilders_[CrossAssetModel::AssetType::INF][i] = QuantLib::ext::make_shared<InfDkBuilder>(
394 }
395 QuantLib::ext::shared_ptr<InfDkBuilder> builder =
396 QuantLib::ext::dynamic_pointer_cast<InfDkBuilder>(
subBuilders_[CrossAssetModel::AssetType::INF][i]);
397 infParameterizations.push_back(builder->parametrization());
398 processInfo[CrossAssetModel::AssetType::INF].emplace_back(dkData->index(), 1);
399 } else if (auto jyData = QuantLib::ext::dynamic_pointer_cast<InfJyData>(imData)) {
400 if (!buildersAreInitialized) {
401
402
403 if (jyData->linkRealRateParamsToNominalRateParams()) {
404 Size ccyIndex = std::distance(currencies.begin(),
405 std::find(currencies.begin(), currencies.end(), jyData->currency()));
406 VolatilityParameter rrVol = jyData->realRateVolatility();
407 ReversionParameter rrRev = jyData->realRateReversion();
408 rrVol.setCalibrate(false);
409 rrRev.setCalibrate(false);
410 auto volTimes = irParametrizations[ccyIndex]->parameterTimes(0);
411 auto volValues = irParametrizations[ccyIndex]->parameterValues(0);
412 auto revTimes = irParametrizations[ccyIndex]->parameterTimes(1);
413 auto revValues = irParametrizations[ccyIndex]->parameterValues(1);
414 rrVol.setTimes(std::vector<Real>(volTimes.begin(), volTimes.end()));
415 rrRev.setTimes(std::vector<Real>(revTimes.begin(), revTimes.end()));
416 rrVol.setValues(std::vector<Real>(volValues.begin(), volValues.end()));
417 rrRev.setValues(std::vector<Real>(revValues.begin(), revValues.end()));
418 rrVol. mult(jyData->linkedRealRateVolatilityScaling());
419 jyData->setRealRateReversion(rrRev);
420 jyData->setRealRateVolatility(rrVol);
421 }
422 subBuilders_[CrossAssetModel::AssetType::INF][i] = QuantLib::ext::make_shared<InfJyBuilder>(
424 }
425 auto builder = QuantLib::ext::dynamic_pointer_cast<InfJyBuilder>(
subBuilders_[CrossAssetModel::AssetType::INF][i]);
426 infParameterizations.push_back(builder->parameterization());
427 processInfo[CrossAssetModel::AssetType::INF].emplace_back(jyData->index(), 2);
428 } else {
429 QL_FAIL("CrossAssetModelBuilder expects either DK or JY inflation model data.");
430 }
431 infIndices.push_back(imData->index());
432 }
433
434
435
436
437
438 std::vector<QuantLib::ext::shared_ptr<QuantExt::CrLgm1fParametrization>> crLgmParametrizations;
439 for (Size i = 0; i <
config_->crLgmConfigs().
size(); ++i) {
440 LOG(
"CR LGM Parametrization " << i);
441 QuantLib::ext::shared_ptr<CrLgmData> cr =
config_->crLgmConfigs()[i];
442 string crName = cr->name();
443 if (!buildersAreInitialized) {
446 }
447 auto builder = QuantLib::ext::dynamic_pointer_cast<CrLgmBuilder>(
subBuilders_[CrossAssetModel::AssetType::CR][i]);
448 QuantLib::ext::shared_ptr<QuantExt::CrLgm1fParametrization> parametrization = builder->parametrization();
449 crLgmParametrizations.push_back(parametrization);
450 crNames.push_back(crName);
451 processInfo[CrossAssetModel::AssetType::CR].emplace_back(crName, 1);
452 }
453
454
455 std::vector<QuantLib::ext::shared_ptr<QuantExt::CrCirppParametrization>> crCirParametrizations;
456 for (Size i = 0; i <
config_->crCirConfigs().
size(); ++i) {
457 LOG(
"CR CIR Parametrization " << i);
458 QuantLib::ext::shared_ptr<CrCirData> cr =
config_->crCirConfigs()[i];
459 string crName = cr->name();
460 if (!buildersAreInitialized) {
463 }
464 auto builder = QuantLib::ext::dynamic_pointer_cast<CrCirBuilder>(
subBuilders_[CrossAssetModel::AssetType::CR][i]);
465 QuantLib::ext::shared_ptr<QuantExt::CrCirppParametrization> parametrization = builder->parametrization();
466 crCirParametrizations.push_back(parametrization);
467 crNames.push_back(crName);
468 processInfo[CrossAssetModel::AssetType::CR].emplace_back(crName, 1);
469 }
470
471
472
473
474 std::vector<QuantLib::ext::shared_ptr<QuantExt::CommoditySchwartzParametrization>> comParametrizations;
475 for (Size i = 0; i <
config_->comConfigs().
size(); i++) {
476 DLOG(
"COM Parametrization " << i);
477 QuantLib::ext::shared_ptr<CommoditySchwartzData> com =
config_->comConfigs()[i];
478 string comName = com->name();
480 QL_REQUIRE(std::find(currencies.begin(), currencies.end(), comCcy.code()) != currencies.end(),
481 "Currency (" << comCcy << ") for commodity " << comName << " not covered by CrossAssetModelData");
482 if (!buildersAreInitialized) {
483 subBuilders_[CrossAssetModel::AssetType::COM][i] = QuantLib::ext::make_shared<CommoditySchwartzModelBuilder>(
485 }
486 auto builder = QuantLib::ext::dynamic_pointer_cast<CommoditySchwartzModelBuilder>(
489 builder->freeze();
490 csBuilder.push_back(builder);
491 QuantLib::ext::shared_ptr<QuantExt::CommoditySchwartzParametrization> parametrization = builder->parametrization();
493 comParametrizations.push_back(parametrization);
494 comNames.push_back(comName);
495 processInfo[CrossAssetModel::AssetType::COM].emplace_back(comName, 1);
496 }
497
498
499
500
501 std::vector<QuantLib::ext::shared_ptr<QuantExt::CrStateParametrization>> crStateParametrizations;
502 for (Size i = 0; i <
config_->numberOfCreditStates(); i++) {
503 DLOG(
"CrState Parametrization " << i);
504 crStateParametrizations.push_back(QuantLib::ext::make_shared<QuantExt::CrStateParametrization>(i));
505 processInfo[CrossAssetModel::AssetType::CrState].emplace_back(std::to_string(i), 1);
506 }
507
508 std::vector<QuantLib::ext::shared_ptr<QuantExt::Parametrization>> parametrizations;
509 for (Size i = 0; i < irParametrizations.size(); i++)
510 parametrizations.push_back(irParametrizations[i]);
511 for (Size i = 0; i < fxParametrizations.size(); i++)
512 parametrizations.push_back(fxParametrizations[i]);
513 for (Size i = 0; i < eqParametrizations.size(); i++)
514 parametrizations.push_back(eqParametrizations[i]);
515 parametrizations.insert(parametrizations.end(), infParameterizations.begin(), infParameterizations.end());
516 for (Size i = 0; i < crLgmParametrizations.size(); i++)
517 parametrizations.push_back(crLgmParametrizations[i]);
518 for (Size i = 0; i < crCirParametrizations.size(); i++)
519 parametrizations.push_back(crCirParametrizations[i]);
520 for (Size i = 0; i < comParametrizations.size(); i++)
521 parametrizations.push_back(comParametrizations[i]);
522 for (Size i = 0; i < crStateParametrizations.size(); i++)
523 parametrizations.push_back(crStateParametrizations[i]);
524
525 QL_REQUIRE(fxParametrizations.size() == irParametrizations.size() - 1, "mismatch in IR/FX parametrization sizes");
526
527
528
529
530 DLOG(
"CrossAssetModelBuilder: adding correlations.");
531 CorrelationMatrixBuilder cmb;
532
533 for (
auto it =
config_->correlations().begin(); it !=
config_->correlations().end(); it++) {
534 cmb.addCorrelation(it->first.first, it->first.second, it->second);
535 }
536
537 Matrix corrMatrix = cmb.correlationMatrix(processInfo);
538
539 TLOG(
"CAM correlation matrix:");
541
542
543
544
545
546 model_.linkTo(QuantLib::ext::make_shared<QuantExt::CrossAssetModel>(parametrizations, corrMatrix,
salvaging_, measure,
548
549
550
551
552
553 if (!buildersAreInitialized) {
555 }
556
557
558
559
560
561 for (Size i = 0; i < lgmBuilder.size(); i++) {
562 DLOG(
"IR Calibration " << i);
564 }
565
566 for (Size i = 0; i < hwBuilder.size(); i++) {
567 DLOG(
"IR Calibration " << i);
569 }
570
571
572
573
574
575 for (Size i = 0; i < irParametrizations.size(); i++) {
576 auto p = irParametrizations[i];
578 DLOG(
"Relinked discounting curve for " << p->currency().code() <<
" for FX calibration");
579 }
580
581
582
583
584
585 for (Size i = 0; i < fxParametrizations.size(); i++) {
586 QuantLib::ext::shared_ptr<FxBsData> fx =
config_->fxConfigs()[i];
587
589 DLOG(
"FX Calibration " << i <<
" skipped");
590 continue;
591 }
592
594 recalibratedCurrencies.find(fx->foreignCcy()) == recalibratedCurrencies.end() &&
595 recalibratedCurrencies.find(fx->domesticCcy()) == recalibratedCurrencies.end()) {
596 DLOG(
"FX Calibration "
597 << i << " skipped, since neither fx builder nor ir models in dom / for ccy were recalibrated.");
598 continue;
599 }
600
601 DLOG(
"FX Calibration " << i);
602
603
604 QuantLib::ext::shared_ptr<QuantExt::AnalyticCcLgmFxOptionEngine> engine =
605 QuantLib::ext::make_shared<QuantExt::AnalyticCcLgmFxOptionEngine>(*
model_, i);
606
607
608 engine->cache(true);
611
613
614
616
620 else
623
624 DLOG(
"FX " << fx->foreignCcy() <<
" calibration errors:");
632 } else {
633 std::string exceptionMessage = "FX BS " + std::to_string(i) + " calibration error " +
635 " exceeds tolerance " +
636 std::to_string(
config_->bootstrapTolerance());
637 StructuredModelWarningMessage(
"Failed to calibrate FX BS Model", exceptionMessage,
id_).log();
643 QL_FAIL(exceptionMessage);
644 }
645 }
646 }
647 fxBuilder[i]->setCalibrationDone();
648 }
649
650
651
652
653
654 for (Size i = 0; i < irParametrizations.size(); i++) {
655 auto p = irParametrizations[i];
657 DLOG(
"Relinked discounting curve for " << p->currency().code() <<
" for EQ calibration");
658 }
659
660
661
662
663
664 for (Size i = 0; i < eqParametrizations.size(); i++) {
665 QuantLib::ext::shared_ptr<EqBsData> eq =
config_->eqConfigs()[i];
666 if (!eq->calibrateSigma()) {
667 DLOG(
"EQ Calibration " << i <<
" skipped");
668 continue;
669 }
670
672 recalibratedCurrencies.find(eq->currency()) == recalibratedCurrencies.end()) {
673 DLOG(
"EQ Calibration " << i
674 << " skipped, since neither eq builder nor ir model in eq ccy were recalibrated.");
675 continue;
676 }
677
678 DLOG(
"EQ Calibration " << i);
679
680 Currency eqCcy = eqParametrizations[i]->currency();
681 Size eqCcyIdx =
model_->ccyIndex(eqCcy);
682 QuantLib::ext::shared_ptr<QuantExt::AnalyticXAssetLgmEquityOptionEngine> engine =
683 QuantLib::ext::make_shared<QuantExt::AnalyticXAssetLgmEquityOptionEngine>(*
model_, i, eqCcyIdx);
686
688
689
691
695 else
698 DLOG(
"EQ " << eq->eqName() <<
" calibration errors:");
706 } else {
707 std::string exceptionMessage = "EQ BS " + std::to_string(i) + " calibration error " +
709 " exceeds tolerance " +
710 std::to_string(
config_->bootstrapTolerance());
711 StructuredModelWarningMessage(
"Failed to calibrate EQ BS Model", exceptionMessage,
id_).log();
717 QL_FAIL(exceptionMessage);
718 }
719 }
720 }
721 eqBuilder[i]->setCalibrationDone();
722 }
723
724
725
726
727
728 for (Size i = 0; i < csBuilder.size(); i++) {
729 DLOG(
"COM Calibration " << i);
731 }
732
733
734
735
736
737 for (Size i = 0; i < irParametrizations.size(); i++) {
738 auto p = irParametrizations[i];
740 DLOG(
"Relinked discounting curve for " << p->currency().code() <<
" for INF calibration");
741 }
742
743
744 for (Size i = 0; i < infParameterizations.size(); i++) {
745 QuantLib::ext::shared_ptr<InflationModelData> imData =
config_->infConfigs()[i];
746 if (auto dkData = QuantLib::ext::dynamic_pointer_cast<InfDkData>(imData)) {
747 auto dkParam = QuantLib::ext::dynamic_pointer_cast<InfDkParametrization>(infParameterizations[i]);
748 QL_REQUIRE(dkParam, "Expected DK model data to have given a DK parameterisation.");
749 const auto& builder =
subBuilders_.at(CrossAssetModel::AssetType::INF).at(i);
750 const auto& dkBuilder = QuantLib::ext::dynamic_pointer_cast<InfDkBuilder>(builder);
751 if (!dkBuilder->requiresRecalibration() &&
752 recalibratedCurrencies.find(infParameterizations[i]->currency().code()) ==
753 recalibratedCurrencies.end()) {
754 DLOG(
"Skipping inf dk calibration "
755 << i << " since neither inf builder nor ir model in inf ccy were recalibrated.");
756 continue;
757 }
759 dkBuilder->setCalibrationDone();
760 } else if (auto jyData = QuantLib::ext::dynamic_pointer_cast<InfJyData>(imData)) {
761 auto jyParam = QuantLib::ext::dynamic_pointer_cast<InfJyParameterization>(infParameterizations[i]);
762 QL_REQUIRE(jyParam, "Expected JY model data to have given a JY parameterisation.");
763 const auto& builder =
subBuilders_.at(CrossAssetModel::AssetType::INF).at(i);
764 const auto& jyBuilder = QuantLib::ext::dynamic_pointer_cast<InfJyBuilder>(builder);
765 if (!jyBuilder->requiresRecalibration() &&
766 recalibratedCurrencies.find(infParameterizations[i]->currency().code()) ==
767 recalibratedCurrencies.end()) {
768 DLOG(
"Skipping inf jy calibration "
769 << i << " since neither inf builder nor ir model in inf ccy were recalibrated.");
770 continue;
771 }
773 jyBuilder->setCalibrationDone();
774 } else {
775 QL_FAIL("CrossAssetModelBuilder expects either DK or JY inflation model data.");
776 }
777 }
778
779
780
781
782
783 for (Size i = 0; i < irParametrizations.size(); i++) {
784 auto p = irParametrizations[i];
786 DLOG(
"Relinked discounting curve for " << p->currency().code() <<
" as final model curves");
787 }
788
789 DLOG(
"Building CrossAssetModel done");
790}
std::map< QuantExt::CrossAssetModel::AssetType, std::vector< std::pair< std::string, QuantLib::Size > > > ProcessInfo
std::vector< Array > optionExpiries_
std::vector< Array > fxOptionExpiries_
std::vector< Array > comOptionExpiries_
std::vector< std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > > swaptionBaskets_
std::vector< Array > eqOptionExpiries_
void calibrateInflation(const InfDkData &data, QuantLib::Size modelIdx, const std::vector< QuantLib::ext::shared_ptr< QuantLib::BlackCalibrationHelper > > &calibrationBasket, const QuantLib::ext::shared_ptr< QuantExt::InfDkParametrization > &inflationParam) const
std::vector< std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > > comOptionBaskets_
std::vector< std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > > eqOptionBaskets_
std::vector< Array > swaptionMaturities_
std::vector< std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > > fxOptionBaskets_
void resetModelParams(const CrossAssetModel::AssetType t, const Size param, const Size index, const Size i) const
Currency parseCurrency(const string &s)
Convert text to QuantLib::Currency.
#define WLOGGERSTREAM(text)
#define LOG(text)
Logging Macro (Level = Notice)
#define DLOG(text)
Logging Macro (Level = Debug)
#define TLOGGERSTREAM(text)
#define TLOG(text)
Logging Macro (Level = Data)
Real getCalibrationError(const std::vector< QuantLib::ext::shared_ptr< Helper > > &basket)
Size size(const ValueType &v)
std::string getCalibrationDetails(LgmCalibrationInfo &info, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &basket, const QuantLib::ext::shared_ptr< IrLgm1fParametrization > ¶metrization)