36#include <ql/models/calibrationhelper.hpp>
38#include <boost/variant.hpp>
47template <
typename Helper> Real
getCalibrationError(
const std::vector<QuantLib::ext::shared_ptr<Helper>>& basket) {
49 for (
auto const& h : basket) {
50 Real tmp = h->calibrationError();
53 return std::sqrt(rmse /
static_cast<Real
>(basket.size()));
57 LgmCalibrationInfo& info,
const std::vector<QuantLib::ext::shared_ptr<BlackCalibrationHelper>>& basket,
58 const QuantLib::ext::shared_ptr<IrLgm1fParametrization>& parametrization = QuantLib::ext::shared_ptr<IrLgm1fParametrization>());
61 const std::vector<QuantLib::ext::shared_ptr<BlackCalibrationHelper>>& basket,
62 const QuantLib::ext::shared_ptr<FxBsParametrization>& parametrization = QuantLib::ext::shared_ptr<FxBsParametrization>(),
63 const QuantLib::ext::shared_ptr<Parametrization>& domesticLgm = QuantLib::ext::shared_ptr<IrLgm1fParametrization>());
66 const std::vector<QuantLib::ext::shared_ptr<BlackCalibrationHelper>>& basket,
67 const QuantLib::ext::shared_ptr<FxBsParametrization>& parametrization = QuantLib::ext::shared_ptr<FxBsParametrization>(),
68 const QuantLib::ext::shared_ptr<IrLgm1fParametrization>& domesticLgm = QuantLib::ext::shared_ptr<IrLgm1fParametrization>());
71 const std::vector<QuantLib::ext::shared_ptr<BlackCalibrationHelper>>& basket,
72 const QuantLib::ext::shared_ptr<EqBsParametrization>& parametrization = QuantLib::ext::shared_ptr<EqBsParametrization>(),
73 const QuantLib::ext::shared_ptr<Parametrization>& domesticLgm = QuantLib::ext::shared_ptr<IrLgm1fParametrization>());
76 const std::vector<QuantLib::ext::shared_ptr<BlackCalibrationHelper>>& basket,
77 const QuantLib::ext::shared_ptr<EqBsParametrization>& parametrization = QuantLib::ext::shared_ptr<EqBsParametrization>(),
78 const QuantLib::ext::shared_ptr<IrLgm1fParametrization>& domesticLgm = QuantLib::ext::shared_ptr<IrLgm1fParametrization>());
81 const std::vector<QuantLib::ext::shared_ptr<BlackCalibrationHelper>>& basket,
82 const QuantLib::ext::shared_ptr<InfDkParametrization>& parametrization = QuantLib::ext::shared_ptr<InfDkParametrization>(),
83 bool indexIsInterpolated =
true);
86 const std::vector<QuantLib::ext::shared_ptr<BlackCalibrationHelper>>& basket,
87 const QuantLib::ext::shared_ptr<CommoditySchwartzParametrization>& parametrization = QuantLib::ext::shared_ptr<CommoditySchwartzParametrization>());
89std::string
getCalibrationDetails(
const std::vector<QuantLib::ext::shared_ptr<CalibrationHelper>>& realRateBasket,
90 const std::vector<QuantLib::ext::shared_ptr<CalibrationHelper>>& indexBasket,
91 const QuantLib::ext::shared_ptr<InfJyParameterization>& parameterization,
92 bool calibrateRealRateVol =
false);
94std::string
getCalibrationDetails(
const QuantLib::ext::shared_ptr<IrLgm1fParametrization>& parametrization);
99 const QuantLib::Date&
referenceDate = Settings::instance().evaluationDate());
103 const QuantLib::ext::shared_ptr<ZeroInflationTermStructure>& curve,
104 const QuantLib::Date& optionMaturityDate);
108 const QuantLib::ext::shared_ptr<YoYInflationTermStructure>& curve,
109 const QuantLib::Date& optionMaturityDate);
112Real
atmForward(
const Real s0,
const Handle<YieldTermStructure>& r,
const Handle<YieldTermStructure>& q,
const Real t);
Classes for representing a strike using various conventions.
Real yoyCapFloorStrikeValue(const QuantLib::ext::shared_ptr< BaseStrike > &strike, const QuantLib::ext::shared_ptr< YoYInflationTermStructure > &curve, const QuantLib::Date &optionMaturityDate)
Return a yoy cap/floor strike value, the input strike can be of type absolute or atm forward.
Real getCalibrationError(const std::vector< QuantLib::ext::shared_ptr< Helper > > &basket)
Real atmForward(const Real s0, const Handle< YieldTermStructure > &r, const Handle< YieldTermStructure > &q, const Real t)
helper function that computes the atm forward
Date optionMaturity(const boost::variant< Date, Period > &maturity, const QuantLib::Calendar &calendar, const QuantLib::Date &referenceDate)
std::string getCalibrationDetails(LgmCalibrationInfo &info, const std::vector< QuantLib::ext::shared_ptr< BlackCalibrationHelper > > &basket, const QuantLib::ext::shared_ptr< IrLgm1fParametrization > ¶metrization)
Real cpiCapFloorStrikeValue(const QuantLib::ext::shared_ptr< BaseStrike > &strike, const QuantLib::ext::shared_ptr< ZeroInflationTermStructure > &curve, const QuantLib::Date &optionMaturityDate)
Return a cpi cap/floor strike value, the input strike can be of type absolute or atm forward.
Serializable Credit Default Swap.