|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Risky asset-swap instrument. More...
#include <riskyassetswap.hpp>
Inheritance diagram for RiskyAssetSwap:
Collaboration diagram for RiskyAssetSwap:Public Member Functions | |
| RiskyAssetSwap (bool fixedPayer, Real nominal, Schedule fixedSchedule, Schedule floatSchedule, DayCounter fixedDayCounter, DayCounter floatDayCounter, Rate spread, Rate recoveryRate_, Handle< YieldTermStructure > yieldTS, Handle< DefaultProbabilityTermStructure > defaultTS, Rate coupon=Null< Rate >()) | |
| Real | fairSpread () |
| Real | floatAnnuity () const |
| Real | nominal () const |
| Rate | spread () const |
| bool | fixedPayer () const |
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... | |
| virtual void | setupArguments (PricingEngine::arguments *) const |
| virtual void | fetchResults (const PricingEngine::results *) 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 ()=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 () |
Private Member Functions | |
| void | setupExpired () const override |
| bool | isExpired () const override |
| returns whether the instrument might have value greater than zero. More... | |
| void | performCalculations () const override |
| Real | fixedAnnuity () const |
| Real | parCoupon () const |
| Real | recoveryValue () const |
| Real | riskyBondPrice () const |
Additional Inherited Members | |
Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
Protected Member Functions inherited from Instrument | |
| void | calculate () const override |
| void | performCalculations () const override |
Protected Member Functions inherited from LazyObject | |
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_ |
Risky asset-swap instrument.
Definition at line 36 of file riskyassetswap.hpp.
| RiskyAssetSwap | ( | bool | fixedPayer, |
| Real | nominal, | ||
| Schedule | fixedSchedule, | ||
| Schedule | floatSchedule, | ||
| DayCounter | fixedDayCounter, | ||
| DayCounter | floatDayCounter, | ||
| Rate | spread, | ||
| Rate | recoveryRate_, | ||
| Handle< YieldTermStructure > | yieldTS, | ||
| Handle< DefaultProbabilityTermStructure > | defaultTS, | ||
| Rate | coupon = Null<Rate>() |
||
| ) |
| Real fairSpread | ( | ) |
| Real floatAnnuity | ( | ) | const |
Definition at line 82 of file riskyassetswap.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| Real nominal | ( | ) | const |
Definition at line 54 of file riskyassetswap.hpp.
| Rate spread | ( | ) | const |
Definition at line 55 of file riskyassetswap.hpp.
| bool fixedPayer | ( | ) | const |
Definition at line 56 of file riskyassetswap.hpp.
|
overrideprivatevirtual |
This method must leave the instrument in a consistent state when the expiration condition is met.
Reimplemented from Instrument.
Definition at line 53 of file riskyassetswap.cpp.
Here is the call graph for this function:
|
overrideprivatevirtual |
returns whether the instrument might have value greater than zero.
Implements Instrument.
Definition at line 47 of file riskyassetswap.cpp.
Here is the call graph for this function:
|
overrideprivatevirtual |
This method must implement any calculations which must be (re)done in order to calculate the desired results.
Implements LazyObject.
Definition at line 58 of file riskyassetswap.cpp.
Here is the call graph for this function:
|
private |
Definition at line 93 of file riskyassetswap.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 104 of file riskyassetswap.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 111 of file riskyassetswap.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 141 of file riskyassetswap.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
mutableprivate |
Definition at line 69 of file riskyassetswap.hpp.
|
mutableprivate |
Definition at line 70 of file riskyassetswap.hpp.
|
mutableprivate |
Definition at line 71 of file riskyassetswap.hpp.
|
mutableprivate |
Definition at line 72 of file riskyassetswap.hpp.
|
mutableprivate |
Definition at line 73 of file riskyassetswap.hpp.
|
private |
Definition at line 76 of file riskyassetswap.hpp.
|
private |
Definition at line 77 of file riskyassetswap.hpp.
|
private |
Definition at line 78 of file riskyassetswap.hpp.
|
private |
Definition at line 78 of file riskyassetswap.hpp.
|
private |
Definition at line 79 of file riskyassetswap.hpp.
|
private |
Definition at line 79 of file riskyassetswap.hpp.
|
private |
Definition at line 80 of file riskyassetswap.hpp.
|
private |
Definition at line 81 of file riskyassetswap.hpp.
|
private |
Definition at line 82 of file riskyassetswap.hpp.
|
private |
Definition at line 83 of file riskyassetswap.hpp.
|
mutableprivate |
Definition at line 84 of file riskyassetswap.hpp.