64 auto baseSwap = ext::make_shared<VanillaSwap>(
67 auto targSwap = ext::make_shared<VanillaSwap>(
70 auto finlSwap = ext::make_shared<VanillaSwap>(
74 baseSwap->setPricingEngine(
76 targSwap->setPricingEngine(
78 finlSwap->setPricingEngine(
85 ext::make_shared<Swaption>(
89 ext::make_shared<Swaption>(
98 Real sumTaujDeltaT = 0.0;
107 Real sumWiDeltaT = 0.0;
111 Real den = sumTaujDeltaT * sumWi - sumWiDeltaT * sumTauj;
112 Real u = -sumTauj / den;
113 Real v = sumTaujDeltaT / den;
130 Real strikeBase = (strike - (swapRateTarg_ - (1.0 + lambda_) * swapRateBase_)) /
131 (1.0 + lambda_) / annuityScaling_;
132 Real volBase = baseSmileSection_->volatility(strikeBase,
Normal, 0.0);
133 Real volTarg = annuityScaling_ * (1.0 + lambda_) * volBase;
Actual/365 (Fixed) day count convention.
Time yearFraction(const Date &, const Date &, const Date &refPeriodStart=Date(), const Date &refPeriodEnd=Date()) const
Returns the period between two dates as a fraction of year.
Discounting engine for swaps.
const std::vector< Real > & floatWeights() const
const std::vector< Real > & floatTimes() const
interest rate volatility smile section
virtual const Date & exerciseDate() const
const std::vector< Real > & fixedTimes() const
const std::vector< Real > & annuityWeights() const
Time swapLength(const Period &swapTenor) const
implements the conversion between swap tenor and swap (time) length
TenorSwaptionSmileSection(const TenorSwaptionVTS &volTS, Time optionTime, Time swapLength)
ext::shared_ptr< SmileSection > baseSmileSection_
Volatility volatilityImpl(Rate strike) const override
Handle< YieldTermStructure > discountCurve_
Handle< SwaptionVolatilityStructure > baseVTS_
ext::shared_ptr< IborIndex > targIndex_
ext::shared_ptr< IborIndex > baseIndex_
virtual const Date & referenceDate() const
the date at which discount = 1.0 and/or variance = 0.0
virtual DayCounter dayCounter() const
the day counter used for date/time conversion
Option exercise classes and payoff function.
Real Time
continuous quantity with 1-year units
QL_BIG_INTEGER BigInteger
large integer number
Real Volatility
volatility
std::size_t Size
size of a container
base class for Inter-Bank-Offered-Rate indexes
ext::shared_ptr< BlackVolTermStructure > v
translate swaption into deterministic fixed and float cash flows
swaption volatility term structure based on volatility transformation
Simple fixed-rate vs Libor swap.