QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Public Member Functions | List of all members
RangeAccrualPricerByBgm Class Reference

#include <rangeaccrual.hpp>

+ Inheritance diagram for RangeAccrualPricerByBgm:
+ Collaboration diagram for RangeAccrualPricerByBgm:

Public Member Functions

 RangeAccrualPricerByBgm (Real correlation, ext::shared_ptr< SmileSection > smilesOnExpiry, ext::shared_ptr< SmileSection > smilesOnPayment, bool withSmile, bool byCallSpread)
 
- Public Member Functions inherited from RangeAccrualPricer
Rate swapletRate () const override
 
Real capletPrice (Rate effectiveCap) const override
 
Rate capletRate (Rate effectiveCap) const override
 
Real floorletPrice (Rate effectiveFloor) const override
 
Rate floorletRate (Rate effectiveFloor) const override
 
void initialize (const FloatingRateCoupon &coupon) override
 
- Public Member Functions inherited from FloatingRateCouponPricer
 ~FloatingRateCouponPricer () override=default
 
void update () override
 
- Public Member Functions inherited from Observer
 Observer ()=default
 
 Observer (const Observer &)
 
Observeroperator= (const Observer &)
 
virtual ~Observer ()
 
std::pair< iterator, boolregisterWith (const ext::shared_ptr< Observable > &)
 
void registerWithObservables (const ext::shared_ptr< Observer > &)
 
Size unregisterWith (const ext::shared_ptr< Observable > &)
 
void unregisterWithAll ()
 
virtual void update ()=0
 
virtual void deepUpdate ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 

Observer interface

Real correlation_
 
bool withSmile_
 
bool byCallSpread_
 
ext::shared_ptr< SmileSectionsmilesOnExpiry_
 
ext::shared_ptr< SmileSectionsmilesOnPayment_
 
Real eps_ = 1.0e-8
 
Real swapletPrice () const override
 
Real drift (Real U, Real lambdaS, Real lambdaT, Real correlation) const
 
Real derDriftDerLambdaS (Real U, Real lambdaS, Real lambdaT, Real correlation) const
 
Real derDriftDerLambdaT (Real U, Real lambdaS, Real lambdaT, Real correlation) const
 
Real lambda (Real U, Real lambdaS, Real lambdaT) const
 
Real derLambdaDerLambdaS (Real U) const
 
Real derLambdaDerLambdaT (Real U) const
 
std::vector< RealdriftsOverPeriod (Real U, Real lambdaS, Real lambdaT, Real correlation) const
 
std::vector< ReallambdasOverPeriod (Real U, Real lambdaS, Real lambdaT) const
 
Real digitalRangePrice (Real lowerTrigger, Real upperTrigger, Real initialValue, Real expiry, Real deflator) const
 
Real digitalPrice (Real strike, Real initialValue, Real expiry, Real deflator) const
 
Real digitalPriceWithoutSmile (Real strike, Real initialValue, Real expiry, Real deflator) const
 
Real digitalPriceWithSmile (Real strike, Real initialValue, Real expiry, Real deflator) const
 
Real callSpreadPrice (Real previousInitialValue, Real nextInitialValue, Real previousStrike, Real nextStrike, Real deflator, Real previousVariance, Real nextVariance) const
 
Real smileCorrection (Real strike, Real initialValue, Real expiry, Real deflator) const
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Attributes inherited from RangeAccrualPricer
const RangeAccrualFloatersCouponcoupon_
 
Real startTime_
 
Real endTime_
 
Real accrualFactor_
 
std::vector< RealobservationTimeLags_
 
std::vector< RealobservationTimes_
 
std::vector< RealinitialValues_
 
Size observationsNo_
 
Real lowerTrigger_
 
Real upperTrigger_
 
Real discount_
 
Real gearing_
 
Spread spread_
 
Real spreadLegValue_
 

Detailed Description

Definition at line 121 of file rangeaccrual.hpp.

Constructor & Destructor Documentation

◆ RangeAccrualPricerByBgm()

RangeAccrualPricerByBgm ( Real  correlation,
ext::shared_ptr< SmileSection smilesOnExpiry,
ext::shared_ptr< SmileSection smilesOnPayment,
bool  withSmile,
bool  byCallSpread 
)

Definition at line 173 of file rangeaccrual.cpp.

Member Function Documentation

◆ swapletPrice()

Real swapletPrice ( ) const
overridevirtual

Implements FloatingRateCouponPricer.

Definition at line 180 of file rangeaccrual.cpp.

+ Here is the call graph for this function:

◆ drift()

Real drift ( Real  U,
Real  lambdaS,
Real  lambdaT,
Real  correlation 
) const
protected

Definition at line 230 of file rangeaccrual.cpp.

◆ derDriftDerLambdaS()

Real derDriftDerLambdaS ( Real  U,
Real  lambdaS,
Real  lambdaT,
Real  correlation 
) const
protected

Definition at line 266 of file rangeaccrual.cpp.

◆ derDriftDerLambdaT()

Real derDriftDerLambdaT ( Real  U,
Real  lambdaS,
Real  lambdaT,
Real  correlation 
) const
protected

Definition at line 297 of file rangeaccrual.cpp.

◆ lambda()

Real lambda ( Real  U,
Real  lambdaS,
Real  lambdaT 
) const
protected

Definition at line 251 of file rangeaccrual.cpp.

+ Here is the caller graph for this function:

◆ derLambdaDerLambdaS()

Real derLambdaDerLambdaS ( Real  U) const
protected

Definition at line 287 of file rangeaccrual.cpp.

+ Here is the caller graph for this function:

◆ derLambdaDerLambdaT()

Real derLambdaDerLambdaT ( Real  U) const
protected

Definition at line 318 of file rangeaccrual.cpp.

+ Here is the caller graph for this function:

◆ driftsOverPeriod()

std::vector< Real > driftsOverPeriod ( Real  U,
Real  lambdaS,
Real  lambdaT,
Real  correlation 
) const
protected

Definition at line 192 of file rangeaccrual.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lambdasOverPeriod()

std::vector< Real > lambdasOverPeriod ( Real  U,
Real  lambdaS,
Real  lambdaT 
) const
protected

Definition at line 214 of file rangeaccrual.cpp.

+ Here is the caller graph for this function:

◆ digitalRangePrice()

Real digitalRangePrice ( Real  lowerTrigger,
Real  upperTrigger,
Real  initialValue,
Real  expiry,
Real  deflator 
) const
protected

Definition at line 328 of file rangeaccrual.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ digitalPrice()

Real digitalPrice ( Real  strike,
Real  initialValue,
Real  expiry,
Real  deflator 
) const
protected

Definition at line 342 of file rangeaccrual.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ digitalPriceWithoutSmile()

Real digitalPriceWithoutSmile ( Real  strike,
Real  initialValue,
Real  expiry,
Real  deflator 
) const
protected

Definition at line 356 of file rangeaccrual.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ digitalPriceWithSmile()

Real digitalPriceWithSmile ( Real  strike,
Real  initialValue,
Real  expiry,
Real  deflator 
) const
protected

Definition at line 389 of file rangeaccrual.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ callSpreadPrice()

Real callSpreadPrice ( Real  previousInitialValue,
Real  nextInitialValue,
Real  previousStrike,
Real  nextStrike,
Real  deflator,
Real  previousVariance,
Real  nextVariance 
) const
protected

Definition at line 501 of file rangeaccrual.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ smileCorrection()

Real smileCorrection ( Real  strike,
Real  initialValue,
Real  expiry,
Real  deflator 
) const
protected

Definition at line 445 of file rangeaccrual.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ correlation_

Real correlation_
private

Definition at line 186 of file rangeaccrual.hpp.

◆ withSmile_

bool withSmile_
private

Definition at line 187 of file rangeaccrual.hpp.

◆ byCallSpread_

bool byCallSpread_
private

Definition at line 188 of file rangeaccrual.hpp.

◆ smilesOnExpiry_

ext::shared_ptr<SmileSection> smilesOnExpiry_
private

Definition at line 190 of file rangeaccrual.hpp.

◆ smilesOnPayment_

ext::shared_ptr<SmileSection> smilesOnPayment_
private

Definition at line 191 of file rangeaccrual.hpp.

◆ eps_

Real eps_ = 1.0e-8
private

Definition at line 192 of file rangeaccrual.hpp.