Logo
Reference manual - version qle_version
Public Member Functions | List of all members
DiscountingFxForwardEngine Class Reference

Discounting FX Forward Engine. More...

#include <qle/pricingengines/discountingfxforwardengine.hpp>

+ Inheritance diagram for DiscountingFxForwardEngine:

Public Member Functions

 DiscountingFxForwardEngine (const Currency &ccy1, const Handle< YieldTermStructure > &currency1Discountcurve, const Currency &ccy2, const Handle< YieldTermStructure > &currency2Discountcurve, const Handle< Quote > &spotFX, boost::optional< bool > includeSettlementDateFlows=boost::none, const Date &settlementDate=Date(), const Date &npvDate=Date())
 
void calculate () const override
 
const Handle< YieldTermStructure > & currency1Discountcurve () const
 
const Handle< YieldTermStructure > & currency2Discountcurve () const
 
const Currency & currency1 () const
 
const Currency & currency2 () const
 
const Handle< Quote > & spotFX () const
 

Detailed Description

Discounting FX Forward Engine.

This class implements pricing of FX Forwards by discounting the future nominal cash flows using the respective yield curves. The npv is expressed in ccy1. The given currencies ccy1 and ccy2 are matched to the correct fx forward legs. The evaluation date is the reference date of either discounting curve (which must be equal).

    \ingroup engines

Constructor & Destructor Documentation

◆ DiscountingFxForwardEngine()

DiscountingFxForwardEngine ( const Currency &  ccy1,
const Handle< YieldTermStructure > &  currency1Discountcurve,
const Currency &  ccy2,
const Handle< YieldTermStructure > &  currency2Discountcurve,
const Handle< Quote > &  spotFX,
boost::optional< bool >  includeSettlementDateFlows = boost::none,
const Date &  settlementDate = Date(),
const Date &  npvDate = Date() 
)
Parameters
ccy1,currency1DiscountcurveCurrency 1 and its discount curve.y
ccy2,currency2DiscountcurveCurrency 2 and its discount curve.
spotFXThe market spot rate quote, given as units of ccy1 for one unit of ccy2. The spot rate must be given w.r.t. a settlement equal to the npv date.
includeSettlementDateFlows,settlementDateIf includeSettlementDateFlows is true (false), cashflows on the settlementDate are (not) included in the NPV. If not given the settlement date is set to the npv date.
npvDateDiscount to this date. If not given the npv date is set to the evaluation date