21#include <ql/cashflows/cashflows.hpp>
22#include <ql/pricingengines/bond/discountingbondengine.hpp>
23#include <ql/optional.hpp>
30 const ext::optional<bool>& includeSettlementDateFlows)
31 : discountCurve_(
std::move(discountCurve)),
32 includeSettlementDateFlows_(includeSettlementDateFlows) {
38 "discounting term structure handle is empty");
54 if (!includeRefDateFlows
static Real npv(const Leg &leg, const YieldTermStructure &discountCurve, bool includeSettlementDateFlows, Date settlementDate=Date(), Date npvDate=Date())
NPV of the cash flows.
Handle< YieldTermStructure > discountCurve_
ext::optional< bool > includeSettlementDateFlows_
void calculate() const override
DiscountingBondEngine(Handle< YieldTermStructure > discountCurve=Handle< YieldTermStructure >(), const ext::optional< bool > &includeSettlementDateFlows=ext::nullopt)
Bond::arguments arguments_
Shared handle to an observable.
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
bool & includeReferenceDateEvents()
static Settings & instance()
access to the unique instance