#include <ored/model/crlgmbuilder.hpp>
Definition at line 35 of file crlgmbuilder.hpp.
◆ CrLgmBuilder()
the configuration should refer to the calibration configuration here, alternative discounting curves are then usually set in the pricing engines for swaptions etc.
this builder should be replaced by the OREData standard builder for cr lgm
Definition at line 34 of file crlgmbuilder.cpp.
37
39 LOG(
"LgmCalibration for name " <<
name <<
", configuration is " << configuration);
40
42
43 QL_REQUIRE(!
data_->calibrateA() && !
data_->calibrateH(),
"CrLgmBuilder does not support calibration currently");
44
47
48 Array aTimes(
data_->aTimes().begin(),
data_->aTimes().end());
49 Array hTimes(
data_->hTimes().begin(),
data_->hTimes().end());
50 Array alpha(
data_->aValues().begin(),
data_->aValues().end());
51 Array h(
data_->hValues().begin(),
data_->hValues().end());
52
53
55 QuantLib::ext::make_shared<QuantExt::CrLgm1fConstantParametrization>(USDCurrency(),
modelDefaultCurve_, alpha[0], h[0],
name);
56
57 LOG(
"Apply shift horizon and scale");
58
59 QL_REQUIRE(
data_->shiftHorizon() >= 0.0,
"shift horizon must be non negative");
60 QL_REQUIRE(
data_->scaling() > 0.0,
"scaling must be positive");
61
62 if (
data_->shiftHorizon() > 0.0) {
63 LOG(
"Apply shift horizon " <<
data_->shiftHorizon() <<
" to the " <<
data_->qualifier() <<
" CR-LGM model");
65 }
66
67 if (
data_->scaling() != 1.0) {
68 LOG(
"Apply scaling " <<
data_->scaling() <<
" to the " <<
data_->qualifier() <<
" CR-LGM model");
70 }
71}
RelinkableHandle< DefaultProbabilityTermStructure > modelDefaultCurve_
const std::string configuration_
QuantLib::ext::shared_ptr< ore::data::Market > market_
QuantLib::ext::shared_ptr< CrLgmData > data_
QuantLib::ext::shared_ptr< QuantExt::CrLgm1fParametrization > parametrization_
#define LOG(text)
Logging Macro (Level = Notice)
◆ parametrization()
◆ requiresRecalibration()
bool requiresRecalibration |
( |
| ) |
const |
|
overridevirtual |
◆ performCalculations()
void performCalculations |
( |
| ) |
const |
|
override |
◆ market_
◆ configuration_
const std::string configuration_ |
|
private |
◆ data_
◆ parametrization_
◆ modelDefaultCurve_
RelinkableHandle<DefaultProbabilityTermStructure> modelDefaultCurve_ |
|
private |