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
RendistatoCalculator Class Reference

#include <btp.hpp>

+ Inheritance diagram for RendistatoCalculator:
+ Collaboration diagram for RendistatoCalculator:

Public Member Functions

 RendistatoCalculator (ext::shared_ptr< RendistatoBasket > basket, ext::shared_ptr< Euribor > euriborIndex, Handle< YieldTermStructure > discountCurve)
 
Calculations
Rate yield () const
 
Time duration () const
 
const std::vector< Rate > & yields () const
 
const std::vector< Time > & durations () const
 
const std::vector< Time > & swapLengths () const
 
const std::vector< Rate > & swapRates () const
 
const std::vector< Rate > & swapYields () const
 
const std::vector< Time > & swapDurations () const
 
Equivalent Swap proxy
ext::shared_ptr< VanillaSwapequivalentSwap () const
 
Rate equivalentSwapRate () const
 
Rate equivalentSwapYield () const
 
Time equivalentSwapDuration () const
 
Time equivalentSwapLength () const
 
Spread equivalentSwapSpread () const
 
- Public Member Functions inherited from LazyObject
 LazyObject ()
 
 ~LazyObject () override=default
 
void update () override
 
bool isCalculated () const
 
void forwardFirstNotificationOnly ()
 
void alwaysForwardNotifications ()
 
void recalculate ()
 
void freeze ()
 
void unfreeze ()
 
- Public Member Functions inherited from Observable
 Observable ()
 
 Observable (const Observable &)
 
Observableoperator= (const Observable &)
 
 Observable (Observable &&)=delete
 
Observableoperator= (Observable &&)=delete
 
virtual ~Observable ()=default
 
void notifyObservers ()
 
- 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 ()
 

LazyObject interface

ext::shared_ptr< RendistatoBasketbasket_
 
ext::shared_ptr< EuriboreuriborIndex_
 
Handle< YieldTermStructurediscountCurve_
 
std::vector< Rateyields_
 
std::vector< Timedurations_
 
Time duration_
 
Size equivalentSwapIndex_
 
Size nSwaps_ = 15
 
std::vector< ext::shared_ptr< VanillaSwap > > swaps_
 
std::vector< TimeswapLengths_
 
std::vector< TimeswapBondDurations_
 
std::vector< RateswapBondYields_
 
std::vector< RateswapRates_
 
void performCalculations () const override
 

Additional Inherited Members

- Public Types inherited from Observer
typedef set_type::iterator iterator
 
- Protected Member Functions inherited from LazyObject
virtual void calculate () const
 
- Protected Attributes inherited from LazyObject
bool calculated_ = false
 
bool frozen_ = false
 
bool alwaysForward_
 

Detailed Description

Definition at line 120 of file btp.hpp.

Constructor & Destructor Documentation

◆ RendistatoCalculator()

RendistatoCalculator ( ext::shared_ptr< RendistatoBasket basket,
ext::shared_ptr< Euribor euriborIndex,
Handle< YieldTermStructure discountCurve 
)

Definition at line 134 of file btp.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ yield()

Rate yield ( ) const

Definition at line 213 of file btp.hpp.

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

◆ duration()

Time duration ( ) const

Definition at line 219 of file btp.hpp.

+ Here is the call graph for this function:

◆ yields()

const std::vector< Rate > & yields ( ) const

Definition at line 224 of file btp.hpp.

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

◆ durations()

const std::vector< Time > & durations ( ) const

Definition at line 229 of file btp.hpp.

+ Here is the call graph for this function:

◆ swapLengths()

const std::vector< Time > & swapLengths ( ) const

Definition at line 234 of file btp.hpp.

◆ swapRates()

const std::vector< Rate > & swapRates ( ) const

Definition at line 238 of file btp.hpp.

+ Here is the call graph for this function:

◆ swapYields()

const std::vector< Rate > & swapYields ( ) const

Definition at line 243 of file btp.hpp.

+ Here is the call graph for this function:

◆ swapDurations()

const std::vector< Time > & swapDurations ( ) const

Definition at line 248 of file btp.hpp.

+ Here is the call graph for this function:

◆ equivalentSwap()

ext::shared_ptr< VanillaSwap > equivalentSwap ( ) const

Definition at line 254 of file btp.hpp.

+ Here is the call graph for this function:

◆ equivalentSwapRate()

Rate equivalentSwapRate ( ) const

Definition at line 259 of file btp.hpp.

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

◆ equivalentSwapYield()

Rate equivalentSwapYield ( ) const

Definition at line 264 of file btp.hpp.

+ Here is the call graph for this function:

◆ equivalentSwapDuration()

Time equivalentSwapDuration ( ) const

Definition at line 269 of file btp.hpp.

+ Here is the call graph for this function:

◆ equivalentSwapLength()

Time equivalentSwapLength ( ) const

Definition at line 274 of file btp.hpp.

+ Here is the call graph for this function:

◆ equivalentSwapSpread()

Spread equivalentSwapSpread ( ) const

Definition at line 279 of file btp.hpp.

+ Here is the call graph for this function:

◆ performCalculations()

void performCalculations ( ) const
overrideprotectedvirtual

This method must implement any calculations which must be (re)done in order to calculate the desired results.

Implements LazyObject.

Definition at line 156 of file btp.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ basket_

ext::shared_ptr<RendistatoBasket> basket_
private

Definition at line 153 of file btp.hpp.

◆ euriborIndex_

ext::shared_ptr<Euribor> euriborIndex_
private

Definition at line 154 of file btp.hpp.

◆ discountCurve_

Handle<YieldTermStructure> discountCurve_
private

Definition at line 155 of file btp.hpp.

◆ yields_

std::vector<Rate> yields_
mutableprivate

Definition at line 157 of file btp.hpp.

◆ durations_

std::vector<Time> durations_
mutableprivate

Definition at line 158 of file btp.hpp.

◆ duration_

Time duration_
mutableprivate

Definition at line 159 of file btp.hpp.

◆ equivalentSwapIndex_

Size equivalentSwapIndex_
mutableprivate

Definition at line 160 of file btp.hpp.

◆ nSwaps_

Size nSwaps_ = 15
private

Definition at line 162 of file btp.hpp.

◆ swaps_

std::vector<ext::shared_ptr<VanillaSwap> > swaps_
mutableprivate

Definition at line 163 of file btp.hpp.

◆ swapLengths_

std::vector<Time> swapLengths_
private

Definition at line 164 of file btp.hpp.

◆ swapBondDurations_

std::vector<Time> swapBondDurations_
mutableprivate

Definition at line 165 of file btp.hpp.

◆ swapBondYields_

std::vector<Rate> swapBondYields_
mutableprivate

Definition at line 166 of file btp.hpp.

◆ swapRates_

std::vector<Rate> swapRates_
private

Definition at line 166 of file btp.hpp.