Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
BlackIborQuantoCouponPricer Class Reference

#include <qle/cashflows/quantocouponpricer.hpp>

+ Inheritance diagram for BlackIborQuantoCouponPricer:
+ Collaboration diagram for BlackIborQuantoCouponPricer:

Public Member Functions

 BlackIborQuantoCouponPricer (const Handle< QuantLib::BlackVolTermStructure > &fxRateBlackVolatility, const Handle< QuantLib::Quote > &underlyingFxCorrelation, const Handle< QuantLib::OptionletVolatilityStructure > &capletVolatility)
 

Protected Member Functions

Rate adjustedFixing (Rate fixing=Null< Rate >()) const override
 

Private Attributes

Handle< QuantLib::BlackVolTermStructure > fxRateBlackVolatility_
 
Handle< QuantLib::Quote > underlyingFxCorrelation_
 

Detailed Description

Same as QuantLib, but with fixed t1 computation (dc from vol ts instead of index) and extended to SLN and N vol types

Definition at line 55 of file quantocouponpricer.hpp.

Constructor & Destructor Documentation

◆ BlackIborQuantoCouponPricer()

BlackIborQuantoCouponPricer ( const Handle< QuantLib::BlackVolTermStructure > &  fxRateBlackVolatility,
const Handle< QuantLib::Quote > &  underlyingFxCorrelation,
const Handle< QuantLib::OptionletVolatilityStructure > &  capletVolatility 
)

Definition at line 57 of file quantocouponpricer.hpp.

60 : BlackIborCouponPricer(capletVolatility), fxRateBlackVolatility_(fxRateBlackVolatility),
61 underlyingFxCorrelation_(underlyingFxCorrelation) {
62 registerWith(fxRateBlackVolatility_);
63 registerWith(underlyingFxCorrelation_);
64 }
Handle< QuantLib::BlackVolTermStructure > fxRateBlackVolatility_
Handle< QuantLib::Quote > underlyingFxCorrelation_

Member Function Documentation

◆ adjustedFixing()

Rate adjustedFixing ( Rate  fixing = Null<Rate>()) const
overrideprotected

Definition at line 50 of file quantocouponpricer.cpp.

50 {
51
52 if (fixing == Null<Rate>())
53 fixing = coupon_->indexFixing();
54
55 // Here we apply the quanto adjustment first, then delegate to
56 // the parent class
57 Date d1 = coupon_->fixingDate(), referenceDate = capletVolatility()->referenceDate();
58
59 if (d1 > referenceDate) {
60 Time t1 = capletVolatility()->timeFromReference(d1);
61 Volatility fxsigma = fxRateBlackVolatility_->blackVol(d1, fixing, true);
62 Volatility sigma = capletVolatility()->volatility(d1, fixing);
63 Real rho = underlyingFxCorrelation_->value();
64
65 // Apply Quanto Adjustment.
66 // Hull 6th Edition, page 642, generalised to
67 // shifted lognormal and normal volatilities
68 if (capletVolatility()->volatilityType() == ShiftedLognormal) {
69 Real dQuantoAdj = std::exp(sigma * fxsigma * rho * t1);
70 Real shift = capletVolatility()->displacement();
71 fixing = (fixing + shift) * dQuantoAdj - shift;
72 } else {
73 Real dQuantoAdj = sigma * fxsigma * rho * t1;
74 fixing += dQuantoAdj;
75 }
76 }
77
78 return BlackIborCouponPricer::adjustedFixing(fixing);
79}

Member Data Documentation

◆ fxRateBlackVolatility_

Handle<QuantLib::BlackVolTermStructure> fxRateBlackVolatility_
private

Definition at line 70 of file quantocouponpricer.hpp.

◆ underlyingFxCorrelation_

Handle<QuantLib::Quote> underlyingFxCorrelation_
private

Definition at line 71 of file quantocouponpricer.hpp.