62 TRSWrapper(
const std::vector<QuantLib::ext::shared_ptr<ore::data::Trade>>& underlying,
63 const std::vector<QuantLib::ext::shared_ptr<QuantLib::Index>>& underlyingIndex,
64 const std::vector<QuantLib::Real> underlyingMultiplier,
const bool includeUnderlyingCashflowsInReturn,
65 const QuantLib::Real initialPrice,
const QuantLib::Currency& initialPriceCurrency,
66 const std::vector<QuantLib::Currency>& assetCurrency,
const QuantLib::Currency& returnCurrency,
67 const std::vector<QuantLib::Date>& valuationSchedule,
const std::vector<QuantLib::Date>& paymentSchedule,
68 const std::vector<QuantLib::Leg>& fundingLegs,
69 const std::vector<TRS::FundingData::NotionalType>& fundingNotionalTypes,
70 const QuantLib::Currency& fundingCurrency,
const QuantLib::Size fundingResetGracePeriod,
71 const bool paysAsset,
const bool paysFunding,
const QuantLib::Leg& additionalCashflowLeg,
72 const bool additionalCashflowLegPayer,
const QuantLib::Currency& additionalCashflowCurrency,
73 const std::vector<QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& fxIndexAsset,
74 const QuantLib::ext::shared_ptr<QuantExt::FxIndex>& fxIndexReturn,
75 const QuantLib::ext::shared_ptr<QuantExt::FxIndex>& fxIndexAdditionalCashflows,
76 const std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>& addFxindices);
82 void fetchResults(
const QuantLib::PricingEngine::results*)
const override;
86 std::vector<QuantLib::ext::shared_ptr<ore::data::Trade>>
underlying_;
105 std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>
addFxIndices_;
113 std::vector<QuantLib::ext::shared_ptr<ore::data::Trade>>
underlying_;
132 std::map<std::string, QuantLib::ext::shared_ptr<QuantExt::FxIndex>>
addFxIndices_;
142class TRSWrapper::engine :
public QuantLib::GenericEngine<TRSWrapper::arguments, TRSWrapper::results> {};
162 std::vector<QuantLib::Real>& fxConversionFactor, QuantLib::Date& startDate,
163 QuantLib::Date& endDate,
bool& usingInitialPrice,
const Size nth)
const;
165 QuantLib::Real
getFxConversionRate(
const QuantLib::Date& date,
const QuantLib::Currency& source,
166 const QuantLib::Currency& target,
const bool enforceProjection)
const;
169 Real
getUnderlyingFixing(
const Size i,
const QuantLib::Date& date,
const bool enforceProjection)
const;
std::vector< TRS::FundingData::NotionalType > fundingNotionalTypes_
std::vector< QuantLib::Date > paymentSchedule_
std::vector< QuantLib::ext::shared_ptr< QuantLib::Index > > underlyingIndex_
std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > addFxIndices_
std::vector< QuantLib::Date > valuationSchedule_
QuantLib::Real initialPrice_
QuantLib::Currency returnCurrency_
std::vector< QuantLib::Real > underlyingMultiplier_
std::vector< QuantLib::Leg > fundingLegs_
bool additionalCashflowLegPayer_
std::vector< QuantLib::ext::shared_ptr< ore::data::Trade > > underlying_
QuantLib::Currency fundingCurrency_
std::vector< QuantLib::Currency > assetCurrency_
QuantLib::Size fundingResetGracePeriod_
QuantLib::Currency initialPriceCurrency_
QuantLib::ext::shared_ptr< QuantExt::FxIndex > fxIndexReturn_
QuantLib::ext::shared_ptr< QuantExt::FxIndex > fxIndexAdditionalCashflows_
bool useFixedFundingLegNotional_
QuantLib::Leg additionalCashflowLeg_
bool includeUnderlyingCashflowsInReturn_
QuantLib::Currency additionalCashflowCurrency_
void validate() const override
std::vector< QuantLib::ext::shared_ptr< QuantExt::FxIndex > > fxIndexAsset_
QuantLib::Real getFxConversionRate(const QuantLib::Date &date, const QuantLib::Currency &source, const QuantLib::Currency &target, const bool enforceProjection) const
void calculate() const override
QuantLib::Real currentNotional() const
bool computeStartValue(std::vector< QuantLib::Real > &underlyingStartValue, std::vector< QuantLib::Real > &fxConversionFactor, QuantLib::Date &startDate, QuantLib::Date &endDate, bool &usingInitialPrice, const Size nth) const
Real getUnderlyingFixing(const Size i, const QuantLib::Date &date, const bool enforceProjection) const
const QuantLib::Currency additionalCashflowCurrency_
void fetchResults(const QuantLib::PricingEngine::results *) const override
std::vector< TRS::FundingData::NotionalType > fundingNotionalTypes_
std::vector< QuantLib::Date > paymentSchedule_
std::vector< QuantLib::ext::shared_ptr< QuantLib::Index > > underlyingIndex_
const QuantLib::Currency fundingCurrency_
const QuantLib::Currency returnCurrency_
std::map< std::string, QuantLib::ext::shared_ptr< QuantExt::FxIndex > > addFxIndices_
std::vector< QuantLib::Date > valuationSchedule_
bool isExpired() const override
const QuantLib::Currency initialPriceCurrency_
QuantLib::Real initialPrice_
std::vector< QuantLib::Real > underlyingMultiplier_
std::vector< QuantLib::Leg > fundingLegs_
bool additionalCashflowLegPayer_
std::vector< QuantLib::ext::shared_ptr< ore::data::Trade > > underlying_
const QuantLib::Size fundingResetGracePeriod_
QuantLib::ext::shared_ptr< QuantExt::FxIndex > fxIndexReturn_
QuantLib::ext::shared_ptr< QuantExt::FxIndex > fxIndexAdditionalCashflows_
QuantLib::Leg additionalCashflowLeg_
bool includeUnderlyingCashflowsInReturn_
void setupArguments(QuantLib::PricingEngine::arguments *) const override
std::vector< QuantLib::ext::shared_ptr< QuantExt::FxIndex > > fxIndexAsset_
const std::vector< QuantLib::Currency > assetCurrency_
Serializable Credit Default Swap.
base trade data model and serialization