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

Discounting swap engine providing analytical deltas and gammas. More...

#include <qle/pricingengines/discountingswapenginedeltagamma.hpp>

+ Inheritance diagram for DiscountingSwapEngineDeltaGamma:

Public Member Functions

 DiscountingSwapEngineDeltaGamma (const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const std::vector< Time > &bucketTimes=std::vector< Time >(), const bool computeDelta=false, const bool computeGamma=false, const bool computeBPS=false, const bool linearInZero=true)
 
void calculate () const override
 
Handle< YieldTermStructure > discountCurve () const
 

Detailed Description

Discounting swap engine providing analytical deltas and gammas.

The provided deltas and gammas are (continuously compounded) zero yield deltas assuming linear in zero or loglinear in discount factor interpolation on the discounting and forwarding curves with flat extrapolation of the zero rate before the first and last bucket time. The deltas are provided as additional results

deltaDiscount (vector<Real> ): Delta on discount curve, rebucketed on time grid deltaForward (vector<Real> ): Delta on forward curve, rebucketed on time grid deltaBPS (vector<vector<Real>> ): Delta of BPS (on discount curve, per leg)

The gammas, likewise,

gamma (Matrix ): Gamma matrix with blocks | dsc-dsc dsc-fwd | | dsc-fwd fwd-fwd | gammaBps (vector<Matrix> ): Gamma of BPS (on dsc, per leg)

bucketTimes (vector<Real> ): Bucketing grid for deltas and gammas

Warning:
Deltas and gammas are produced only for fixed and Ibor coupons without caps or floors, for Ibor coupons they are ignoring convexity adjustments (like in arrears adjustments). It is possible to have different Ibor coupons (with different forward curves) on a leg, but the computed deltas would be aggregated over all underlying curves then.
Warning:

Derivatives are not w.r.t. basispoints, but w.r.t. the usual unit

BPS is the value of one unit (not one basispoint actually), it has to be divided by 10000.0 to get QL's BPS