|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
float float swap More...
#include <floatfloatswap.hpp>
Inheritance diagram for FloatFloatSwap:
Collaboration diagram for FloatFloatSwap:Classes | |
| class | arguments |
| Arguments for float float swap calculation More... | |
| class | engine |
| class | results |
| Results from float float swap calculation More... | |
Public Member Functions | |
| FloatFloatSwap (Swap::Type type, Real nominal1, Real nominal2, Schedule schedule1, ext::shared_ptr< InterestRateIndex > index1, DayCounter dayCount1, Schedule schedule2, ext::shared_ptr< InterestRateIndex > index2, DayCounter dayCount2, bool intermediateCapitalExchange=false, bool finalCapitalExchange=false, Real gearing1=1.0, Real spread1=0.0, Real cappedRate1=Null< Real >(), Real flooredRate1=Null< Real >(), Real gearing2=1.0, Real spread2=0.0, Real cappedRate2=Null< Real >(), Real flooredRate2=Null< Real >(), const ext::optional< BusinessDayConvention > &paymentConvention1=ext::nullopt, const ext::optional< BusinessDayConvention > &paymentConvention2=ext::nullopt) | |
| FloatFloatSwap (Swap::Type type, std::vector< Real > nominal1, std::vector< Real > nominal2, Schedule schedule1, ext::shared_ptr< InterestRateIndex > index1, DayCounter dayCount1, Schedule schedule2, ext::shared_ptr< InterestRateIndex > index2, DayCounter dayCount2, bool intermediateCapitalExchange=false, bool finalCapitalExchange=false, std::vector< Real > gearing1=std::vector< Real >(), std::vector< Real > spread1=std::vector< Real >(), std::vector< Real > cappedRate1=std::vector< Real >(), std::vector< Real > flooredRate1=std::vector< Real >(), std::vector< Real > gearing2=std::vector< Real >(), std::vector< Real > spread2=std::vector< Real >(), std::vector< Real > cappedRate2=std::vector< Real >(), std::vector< Real > flooredRate2=std::vector< Real >(), const ext::optional< BusinessDayConvention > &paymentConvention1=ext::nullopt, const ext::optional< BusinessDayConvention > &paymentConvention2=ext::nullopt) | |
Inspectors | |
| Swap::Type | type () const |
| const std::vector< Real > & | nominal1 () const |
| const std::vector< Real > & | nominal2 () const |
| const Schedule & | schedule1 () const |
| const Schedule & | schedule2 () const |
| const ext::shared_ptr< InterestRateIndex > & | index1 () const |
| const ext::shared_ptr< InterestRateIndex > & | index2 () const |
| std::vector< Real > | spread1 () const |
| std::vector< Real > | spread2 () const |
| std::vector< Real > | gearing1 () const |
| std::vector< Real > | gearing2 () const |
| std::vector< Rate > | cappedRate1 () const |
| std::vector< Rate > | flooredRate1 () const |
| std::vector< Rate > | cappedRate2 () const |
| std::vector< Rate > | flooredRate2 () const |
| const DayCounter & | dayCount1 () const |
| const DayCounter & | dayCount2 () const |
| BusinessDayConvention | paymentConvention1 () const |
| BusinessDayConvention | paymentConvention2 () const |
| const Leg & | leg1 () const |
| const Leg & | leg2 () const |
Public Member Functions inherited from Swap | |
| void | deepUpdate () override |
| Size | numberOfLegs () const |
| const std::vector< Leg > & | legs () const |
| virtual Date | startDate () const |
| virtual Date | maturityDate () const |
| Real | legBPS (Size j) const |
| Real | legNPV (Size j) const |
| DiscountFactor | startDiscounts (Size j) const |
| DiscountFactor | endDiscounts (Size j) const |
| DiscountFactor | npvDateDiscount () const |
| const Leg & | leg (Size j) const |
| bool | payer (Size j) const |
| bool | isExpired () const override |
| returns whether the instrument might have value greater than zero. More... | |
| void | setupArguments (PricingEngine::arguments *) const override |
| void | fetchResults (const PricingEngine::results *) const override |
| Swap (const Leg &firstLeg, const Leg &secondLeg) | |
| Swap (const std::vector< Leg > &legs, const std::vector< bool > &payer) | |
Public Member Functions inherited from Instrument | |
| Instrument () | |
| Real | NPV () const |
| returns the net present value of the instrument. More... | |
| Real | errorEstimate () const |
| returns the error estimate on the NPV when available. More... | |
| const Date & | valuationDate () const |
| returns the date the net present value refers to. More... | |
| template<typename T > | |
| T | result (const std::string &tag) const |
| returns any additional result returned by the pricing engine. More... | |
| const std::map< std::string, ext::any > & | additionalResults () const |
| returns all additional result returned by the pricing engine. More... | |
| void | setPricingEngine (const ext::shared_ptr< PricingEngine > &) |
| set the pricing engine to be used. More... | |
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 ()=default | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| Observable (Observable &&)=delete | |
| Observable & | operator= (Observable &&)=delete |
| virtual | ~Observable ()=default |
| void | notifyObservers () |
Public Member Functions inherited from Observer | |
| Observer ()=default | |
| Observer (const Observer &) | |
| Observer & | operator= (const Observer &) |
| virtual | ~Observer () |
| std::pair< iterator, bool > | registerWith (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 () |
Additional Inherited Members | |
Public Types inherited from Swap | |
| enum | Type { Receiver = -1 , Payer = 1 } |
Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
Protected Member Functions inherited from Swap | |
| void | setupExpired () const override |
| Swap (Size legs) | |
Protected Member Functions inherited from Instrument | |
| void | calculate () const override |
| void | performCalculations () const override |
Protected Member Functions inherited from LazyObject | |
Protected Attributes inherited from Swap | |
| std::vector< Leg > | legs_ |
| std::vector< Real > | payer_ |
| std::vector< Real > | legNPV_ |
| std::vector< Real > | legBPS_ |
| std::vector< DiscountFactor > | startDiscounts_ |
| std::vector< DiscountFactor > | endDiscounts_ |
| DiscountFactor | npvDateDiscount_ |
Protected Attributes inherited from Instrument | |
| Real | NPV_ |
| Real | errorEstimate_ |
| Date | valuationDate_ |
| std::map< std::string, ext::any > | additionalResults_ |
| ext::shared_ptr< PricingEngine > | engine_ |
Protected Attributes inherited from LazyObject | |
| bool | calculated_ = false |
| bool | frozen_ = false |
| bool | alwaysForward_ |
float float swap
Definition at line 43 of file floatfloatswap.hpp.
| FloatFloatSwap | ( | Swap::Type | type, |
| Real | nominal1, | ||
| Real | nominal2, | ||
| Schedule | schedule1, | ||
| ext::shared_ptr< InterestRateIndex > | index1, | ||
| DayCounter | dayCount1, | ||
| Schedule | schedule2, | ||
| ext::shared_ptr< InterestRateIndex > | index2, | ||
| DayCounter | dayCount2, | ||
| bool | intermediateCapitalExchange = false, |
||
| bool | finalCapitalExchange = false, |
||
| Real | gearing1 = 1.0, |
||
| Real | spread1 = 0.0, |
||
| Real | cappedRate1 = Null<Real>(), |
||
| Real | flooredRate1 = Null<Real>(), |
||
| Real | gearing2 = 1.0, |
||
| Real | spread2 = 0.0, |
||
| Real | cappedRate2 = Null<Real>(), |
||
| Real | flooredRate2 = Null<Real>(), |
||
| const ext::optional< BusinessDayConvention > & | paymentConvention1 = ext::nullopt, |
||
| const ext::optional< BusinessDayConvention > & | paymentConvention2 = ext::nullopt |
||
| ) |
| FloatFloatSwap | ( | Swap::Type | type, |
| std::vector< Real > | nominal1, | ||
| std::vector< Real > | nominal2, | ||
| Schedule | schedule1, | ||
| ext::shared_ptr< InterestRateIndex > | index1, | ||
| DayCounter | dayCount1, | ||
| Schedule | schedule2, | ||
| ext::shared_ptr< InterestRateIndex > | index2, | ||
| DayCounter | dayCount2, | ||
| bool | intermediateCapitalExchange = false, |
||
| bool | finalCapitalExchange = false, |
||
| std::vector< Real > | gearing1 = std::vector<Real>(), |
||
| std::vector< Real > | spread1 = std::vector<Real>(), |
||
| std::vector< Real > | cappedRate1 = std::vector<Real>(), |
||
| std::vector< Real > | flooredRate1 = std::vector<Real>(), |
||
| std::vector< Real > | gearing2 = std::vector<Real>(), |
||
| std::vector< Real > | spread2 = std::vector<Real>(), |
||
| std::vector< Real > | cappedRate2 = std::vector<Real>(), |
||
| std::vector< Real > | flooredRate2 = std::vector<Real>(), |
||
| const ext::optional< BusinessDayConvention > & | paymentConvention1 = ext::nullopt, |
||
| const ext::optional< BusinessDayConvention > & | paymentConvention2 = ext::nullopt |
||
| ) |
| Swap::Type type | ( | ) | const |
Definition at line 187 of file floatfloatswap.hpp.
| const std::vector< Real > & nominal1 | ( | ) | const |
Definition at line 189 of file floatfloatswap.hpp.
| const std::vector< Real > & nominal2 | ( | ) | const |
Definition at line 193 of file floatfloatswap.hpp.
| const Schedule & schedule1 | ( | ) | const |
Definition at line 197 of file floatfloatswap.hpp.
| const Schedule & schedule2 | ( | ) | const |
Definition at line 201 of file floatfloatswap.hpp.
| const ext::shared_ptr< InterestRateIndex > & index1 | ( | ) | const |
Definition at line 206 of file floatfloatswap.hpp.
| const ext::shared_ptr< InterestRateIndex > & index2 | ( | ) | const |
Definition at line 211 of file floatfloatswap.hpp.
| std::vector< Real > spread1 | ( | ) | const |
Definition at line 215 of file floatfloatswap.hpp.
| std::vector< Real > spread2 | ( | ) | const |
Definition at line 217 of file floatfloatswap.hpp.
| std::vector< Real > gearing1 | ( | ) | const |
Definition at line 219 of file floatfloatswap.hpp.
| std::vector< Real > gearing2 | ( | ) | const |
Definition at line 221 of file floatfloatswap.hpp.
| std::vector< Real > cappedRate1 | ( | ) | const |
Definition at line 223 of file floatfloatswap.hpp.
| std::vector< Real > flooredRate1 | ( | ) | const |
Definition at line 227 of file floatfloatswap.hpp.
| std::vector< Real > cappedRate2 | ( | ) | const |
Definition at line 225 of file floatfloatswap.hpp.
| std::vector< Real > flooredRate2 | ( | ) | const |
Definition at line 229 of file floatfloatswap.hpp.
| const DayCounter & dayCount1 | ( | ) | const |
Definition at line 231 of file floatfloatswap.hpp.
| const DayCounter & dayCount2 | ( | ) | const |
Definition at line 235 of file floatfloatswap.hpp.
| BusinessDayConvention paymentConvention1 | ( | ) | const |
| BusinessDayConvention paymentConvention2 | ( | ) | const |
| const Leg & leg1 | ( | ) | const |
| const Leg & leg2 | ( | ) | const |
|
overridevirtual |
When a derived argument structure is defined for an instrument, this method should be overridden to fill it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument.
Definition at line 391 of file floatfloatswap.cpp.
Here is the call graph for this function:
|
overridevirtual |
When a derived result structure is defined for an instrument, this method should be overridden to read from it. This is mandatory in case a pricing engine is used.
Reimplemented from Instrument.
Definition at line 529 of file floatfloatswap.cpp.
Here is the call graph for this function:
|
private |
Definition at line 111 of file floatfloatswap.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
overrideprivatevirtual |
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented from Instrument.
Definition at line 527 of file floatfloatswap.cpp.
Here is the call graph for this function:
|
private |
Definition at line 138 of file floatfloatswap.hpp.
|
private |
Definition at line 139 of file floatfloatswap.hpp.
|
private |
Definition at line 139 of file floatfloatswap.hpp.
|
private |
Definition at line 140 of file floatfloatswap.hpp.
|
private |
Definition at line 140 of file floatfloatswap.hpp.
|
private |
Definition at line 141 of file floatfloatswap.hpp.
|
private |
Definition at line 141 of file floatfloatswap.hpp.
|
private |
Definition at line 142 of file floatfloatswap.hpp.
|
private |
Definition at line 142 of file floatfloatswap.hpp.
|
private |
Definition at line 142 of file floatfloatswap.hpp.
|
private |
Definition at line 142 of file floatfloatswap.hpp.
|
private |
Definition at line 143 of file floatfloatswap.hpp.
|
private |
Definition at line 143 of file floatfloatswap.hpp.
|
private |
Definition at line 143 of file floatfloatswap.hpp.
|
private |
Definition at line 144 of file floatfloatswap.hpp.
|
private |
Definition at line 145 of file floatfloatswap.hpp.
|
private |
Definition at line 145 of file floatfloatswap.hpp.
|
private |
Definition at line 146 of file floatfloatswap.hpp.
|
private |
Definition at line 146 of file floatfloatswap.hpp.
|
private |
Definition at line 147 of file floatfloatswap.hpp.
|
private |
Definition at line 147 of file floatfloatswap.hpp.
|
private |
Definition at line 148 of file floatfloatswap.hpp.
|
private |
Definition at line 148 of file floatfloatswap.hpp.