19#include <ql/event.hpp>
26 const Handle<YieldTermStructure>& equityInterestRateCurve,
const Handle<YieldTermStructure>& dividendYieldCurve,
27 const Handle<Quote>& equitySpot,
const Handle<YieldTermStructure>& discountCurve,
28 boost::optional<bool> includeSettlementDateFlows,
const Date& settlementDate,
const Date& npvDate)
29 : equityRefRateCurve_(equityInterestRateCurve), divYieldCurve_(dividendYieldCurve), equitySpot_(equitySpot),
30 discountCurve_(discountCurve), includeSettlementDateFlows_(includeSettlementDateFlows),
31 settlementDate_(settlementDate), npvDate_(npvDate) {
42 if (npvDate == Null<Date>()) {
46 if (settlementDate == Null<Date>()) {
47 settlementDate = npvDate;
53 Real lsInd = ((
arguments_.longShort == Position::Long) ? 1.0 : -1.0);
60 results_.value = (lsInd * qty) * (forwardPrice - strike) * df;
62 results_.additionalResults[
"forwardPrice"] = forwardPrice;
63 results_.additionalResults[
"currentNotional"] = forwardPrice * strike;
const Instrument::results * results_
Handle< YieldTermStructure > divYieldCurve_
Handle< YieldTermStructure > discountCurve_
boost::optional< bool > includeSettlementDateFlows_
DiscountingEquityForwardEngine(const Handle< YieldTermStructure > &equityInterestRateCurve, const Handle< YieldTermStructure > ÷ndYieldCurve, const Handle< Quote > &equitySpot, const Handle< YieldTermStructure > &discountCurve, boost::optional< bool > includeSettlementDateFlows=boost::none, const Date &settlementDate=Date(), const Date &npvDate=Date())
void calculate() const override
Handle< YieldTermStructure > equityRefRateCurve_
Handle< Quote > equitySpot_
Engine to value an Equity Forward contract.
Swap::arguments * arguments_