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 |
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)
| 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 |
||
| ) |
| domCcy,domCurve | Currency 1 and its discount curve. |
| forCcy,forCurve | Currency 2 and its discount curve. |
| spotFx | The 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. |
| bucketTimes | Bucketing grid for deltas and gammas |
| computeDelta,computeGamma | Switch to enable/disable delta and gamma calculation |
| linearInZero | Interpolation used in the delta/gamma rebucketing to the desired time grid |
| includeSettlementDateFlows,settlementDate | If 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. |
| npvDate | The date w.r.t. which the npv should be computed. |
| applySimmExemptions | If true, physically settled flows are ignored in sensi calculation, i.e. in he additional results above, including npvDom and npvFor |