Logo
Reference manual - version qle_version
RepresentativeSwaptionMatcher Class Reference

#include <qle/models/representativeswaption.hpp>

Public Types

enum class  InclusionCriterion { AccrualStartGeqExercise , PayDateGtExercise }

Public Member Functions

 RepresentativeSwaptionMatcher (const std::vector< Leg > &underlying, const std::vector< bool > &isPayer, const QuantLib::ext::shared_ptr< SwapIndex > &standardSwapIndexBase, const bool useUnderlyingIborIndex, const Handle< YieldTermStructure > &discountCurve, const Real reversion, const Real volatility=0.0050, const Real flatRate=Null< Real >())
QuantLib::ext::shared_ptr< Swaption > representativeSwaption (Date exerciseDate, const InclusionCriterion criterion=InclusionCriterion::AccrualStartGeqExercise)

Detailed Description

Given an exotic underlying find a standard swap matching the underlying using the representative swaption method in a LGM model.

The swaption that is returned does not have a pricing engine attached, the underlying swap has a discounting swap engine attached (using the given discount curve) though and the ibor index of the underlying swap is using the forwarding curve from the given swap index.

The LGM model uses to find the representative swaption

  • uses a constant volatility and reversion as specified in the ctor
  • if flatRate is null, uses the given dicount curve and forwarding curves from the underlying's ibor indices
  • if flatRate is not null, uses flat discount and forwarding curves using the rate level given by flatRate

For the methodology, see Andersen, Piterbarg, Interest Rate Modelling, ch. 19.4.

The underlying may only contain simple cahsflows, fixed coupons and standard ibor coupons (i.e. without cap/floor or in arrears fixings).

Member Function Documentation

◆ representativeSwaption()

QuantLib::ext::shared_ptr< Swaption > representativeSwaption ( Date exerciseDate,
const InclusionCriterion criterion = InclusionCriterion::AccrualStartGeqExercise )

find representative swaption for all specified underlying cashflows a null pointer is returned if there are no live cashflows found