19#include <ql/cashflows/cashflows.hpp>
25 const Handle<Quote>& spotFX,
26 boost::optional<bool> includeSettlementDateFlows,
27 const Date& settlementDate,
const Date& npvDate)
28 : discountCurve_(discountCurve), spotFX_(spotFX), includeSettlementDateFlows_(includeSettlementDateFlows),
29 settlementDate_(settlementDate), npvDate_(npvDate) {
37 QL_REQUIRE(!
discountCurve_.empty(),
"discounting term structure handle is empty");
40 results_.errorEstimate = Null<Real>();
46 settlementDate = refDate;
48 QL_REQUIRE(settlementDate >= refDate,
"settlement date (" << settlementDate
49 <<
") before discount curve reference date ("
55 valuationDate = refDate;
58 "npv date (" <<
npvDate_ <<
") before discount curve reference date (" << refDate <<
")");
61 bool includeRefDateFlows =
65 if (!
arguments_.cashflow->hasOccurred(settlementDate, includeRefDateFlows))
const Instrument::results * results_
Handle< YieldTermStructure > discountCurve_
const Handle< Quote > & spotFX() const
boost::optional< bool > includeSettlementDateFlows_
void calculate() const override
PaymentDiscountingEngine(const Handle< YieldTermStructure > &discountCurve, const Handle< Quote > &spotFX=Handle< Quote >(), boost::optional< bool > includeSettlementDateFlows=boost::none, const Date &settlementDate=Date(), const Date &npvDate=Date())
Single payment discounting engine.
Swap::arguments * arguments_