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

Discounting FX Forward Engine providing analytical deltas and gammas. More...

#include <qle/pricingengines/discountingfxforwardenginedeltagamma.hpp>

+ Inheritance diagram for DiscountingFxForwardEngineDeltaGamma:

Public Member Functions

 DiscountingFxForwardEngineDeltaGamma (const Currency &domCcy, const Handle< YieldTermStructure > &domCurve, const Currency &forCcy, const Handle< YieldTermStructure > &forCurve, const Handle< Quote > &spotFx, const std::vector< Time > &bucketTimes=std::vector< Time >(), const bool computeDelta=false, const bool computeGamma=false, const bool linearInZero=true, boost::optional< bool > includeSettlementDateFlows=boost::none, const Date &settlementDate=Date(), const Date &npvDate=Date(), const bool applySimmExemptions=false)
 
void calculate () const override
 
const Handle< YieldTermStructure > & domCurve () const
 
const Handle< YieldTermStructure > & forCurve () const
 
const Currency & domCcy () const
 
const Currency & forCcy () const
 
const Handle< Quote > & spotFx () const
 

Detailed Description

Discounting FX Forward Engine providing analytical deltas and gammas.

This class generalises QuantExt's DiscountingFxForwardEngine, in analogy to the DiscountingCurrencySwapEngineDeltaGamma. Additional results are

deltaDiscount (map<Currency, vector<Real>> ): Delta on discount curve, rebucketed, values are in currency deltaFxSpot (map<Currency, Real> ): Delta on FX Spot (for ccy != npvCcy)

gamma (map<Currency, Matrix> ): Gamma matrix per currency between discount curve tenor points

Note that the second derivatives including the FX Spot are zero for the pure second derivative w.r.t. the FX Spot or given by the in currency delta values provided as the additional result deltaDiscount to be reinterpreted as values in domestic currency)

fxSpot (map<Currency, Real> ): FX Spot used for conversion to npvCurrency (for ccy != npvCcy) bucketTimes (vector<Real> ): Bucketing grid for deltas and gammas

npvDom, npvFor : NPV of domestic flow resp. foreign flow (in dom resp. for ccy)

Constructor & Destructor Documentation

◆ DiscountingFxForwardEngineDeltaGamma()

DiscountingFxForwardEngineDeltaGamma ( const Currency &  domCcy,
const Handle< YieldTermStructure > &  domCurve,
const Currency &  forCcy,
const Handle< YieldTermStructure > &  forCurve,
const Handle< Quote > &  spotFx,
const std::vector< Time > &  bucketTimes = std::vector< Time >(),
const bool  computeDelta = false,
const bool  computeGamma = false,
const bool  linearInZero = true,
boost::optional< bool >  includeSettlementDateFlows = boost::none,
const Date &  settlementDate = Date(),
const Date &  npvDate = Date(),
const bool  applySimmExemptions = false 
)
Parameters
domCcy,domCurveCurrency 1 and its discount curve.
forCcy,forCurveCurrency 2 and its discount curve.
spotFxThe market spot rate quote, given as units of domCcy for one unit of forCcy. The spot rate must be given w.r.t. a settlement equal to the npv date.
bucketTimesBucketing grid for deltas and gammas
computeDelta,computeGammaSwitch to enable/disable delta and gamma calculation
linearInZeroInterpolation used in the delta/gamma rebucketing to the desired time grid
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.
npvDateThe date w.r.t. which the npv should be computed.
applySimmExemptionsIf true, physically settled flows are ignored in sensi calculation, i.e. in he additional results above, including npvDom and npvFor