28#include <ql/math/array.hpp>
29#include <ql/math/matrix.hpp>
30#include <ql/timegrid.hpp>
34using QuantLib::DayCounter;
35using QuantLib::TimeGrid;
47 std::function<Real(Real, Real)>
mwCr;
102 const QuantLib::ext::shared_ptr<QuantExt::EquityIndex2>& equity,
103 const QuantLib::ext::shared_ptr<FxIndex>& fxConversion);
119 const std::set<Real>&
times()
const;
122 void finalise(
const TimeGrid& grid);
126 bool hasCall(
const Size i)
const;
127 bool hasPut(
const Size i)
const;
153 Date
nextExerciseDate(
const Date& d,
const std::vector<ConvertibleBond2::CallabilityData>& data)
const;
156 Real
time(
const Date& d)
const;
160 std::vector<bool>& targetFlags, std::vector<CallData>& targetData);
168 QuantLib::ext::shared_ptr<QuantExt::EquityIndex2>
equity_;
bool hasDividendPassThrough(const Size i) const
std::vector< ConvertibleBond2::CallabilityData > registeredCallData_
std::vector< bool > hasBondCashflow_
std::vector< CallData > putData_
bool hasCall(const Size i) const
std::vector< bool > hasContingentConversion_
bool hasMandatoryConversion(const Size i) const
std::vector< bool > hasConversionReset_
bool hasContingentConversion(const Size i) const
bool hasConversion(const Size i) const
const std::set< Real > & times() const
std::vector< Real > bondFinalRedemption_
Date nextConversionDate(const Date &d) const
std::vector< Real > currentConversionRatio_
void registerMandatoryConversion(const ConvertibleBond2::MandatoryConversionData &c)
void registerBondCashflow(const QuantLib::ext::shared_ptr< CashFlow > &c)
Date nextExerciseDate(const Date &d, const std::vector< ConvertibleBond2::CallabilityData > &data) const
std::vector< Date > associatedDate_
std::vector< bool > hasConversionInfoSet_
QuantLib::ext::shared_ptr< FxIndex > fxConversion_
void registerConversionReset(const ConvertibleBond2::ConversionResetData &c)
std::vector< QuantLib::ext::shared_ptr< CashFlow > > registeredBondCashflows_
std::vector< ConvertibleBond2::MandatoryConversionData > registeredMandatoryConversionData_
void processMandatoryConversionData()
std::map< std::string, boost::any > additionalResults_
void processMakeWholeData()
std::vector< ConvertibleBond2::ConversionRatioData > registeredConversionRatioData_
std::vector< DividendPassThroughData > dividendPassThroughData_
const ConversionResetData & getConversionResetData(const Size i) const
std::vector< ConversionData > conversionData_
void registerPut(const ConvertibleBond2::CallabilityData &c)
std::vector< bool > hasCall_
std::vector< Real > bondCashflow_
std::vector< bool > hasConversion_
Real getCurrentFxConversion(const Size i) const
std::vector< bool > stochasticConversionRatio_
Real initialConversionRatio_
std::vector< bool > hasNoConversionPlane_
std::vector< CallData > callData_
void registerConversion(const ConvertibleBond2::ConversionData &c)
const MandatoryConversionData & getMandatoryConversionData(const Size i) const
void registerConversionRatio(const ConvertibleBond2::ConversionRatioData &c)
void processBondCashflows()
std::vector< ConvertibleBond2::ConversionData > registeredConversionData_
std::vector< ConvertibleBond2::CallabilityData > registeredPutData_
bool hasPut(const Size i) const
QuantLib::Array mw_cr_inc_x_
bool hasNoConversionPlane(const Size i) const
void finalise(const TimeGrid &grid)
bool hasConversionReset(const Size i) const
std::vector< bool > hasDividendPassThrough_
Real getInitialConversionRatio() const
std::vector< MandatoryConversionData > mandatoryConversionData_
Real time(const Date &d) const
void registerCall(const ConvertibleBond2::CallabilityData &c)
std::vector< ConversionResetData > conversionResetData_
std::vector< Real > currentFxConversion_
QuantLib::ext::shared_ptr< QuantExt::EquityIndex2 > equity_
Date getAssociatedDate(const Size i) const
QuantLib::Array mw_cr_inc_y_
void processExerciseData(const std::vector< ConvertibleBond2::CallabilityData > &sourceData, std::vector< bool > &targetFlags, std::vector< CallData > &targetData)
Real getCurrentConversionRatio(const Size i) const
std::vector< ConvertibleBond2::ConversionResetData > registeredConversionResetData_
const ConversionData & getConversionData(const Size i) const
std::vector< bool > hasPut_
std::vector< bool > hasMandatoryConversion_
std::vector< ConvertibleBond2::DividendProtectionData > registeredDividendProtectionData_
const std::map< std::string, boost::any > & additionalResults() const
const DividendPassThroughData & getDividendPassThroughData(const Size i) const
bool hasBondCashflow(const Size i) const
const CallData & getCallData(const Size i) const
ConvertibleBond2::MakeWholeData registeredMakeWholeData_
Real getBondCashflow(const Size i) const
Real getBondFinalRedemption(const Size i) const
const CallData & getPutData(const Size i) const
void processConversionAndDivProtData()
QuantLib::Matrix mw_cr_inc_z_
bool hasStochasticConversionRatio(const Size i) const
void registerDividendProtection(const ConvertibleBond2::DividendProtectionData &c)
void registerMakeWhole(const ConvertibleBond2::MakeWholeData &c)
equity index class for holding equity fixing histories and forwarding.
std::function< Real(Real, Real)> mwCr
ConvertibleBond2::CallabilityData::PriceType priceType
Real accruedHistoricalDividends
bool resetToSpecificValue
ConvertibleBond2::DividendProtectionData::AdjustmentStyle adjustmentStyle
Size lastDividendProtectionTimeIndex
ConvertibleBond2::DividendProtectionData::DividendType dividendType
ConvertibleBond2::ConversionResetData::ReferenceType reference
Real accruedHistoricalDividends
ConvertibleBond2::DividendProtectionData::AdjustmentStyle adjustmentStyle
Size lastDividendProtectionTimeIndex
ConvertibleBond2::DividendProtectionData::DividendType dividendType
Real pepsUpperConversionRatio
Real pepsLowerConversionRatio