Swap Class Reference
[Financial instruments]
#include <ql/Instruments/swap.hpp>
Inheritance diagram for Swap:

Detailed Description
Interest rate swap.The cash flows belonging to the first leg are paid; the ones belonging to the second leg are received.
Public Member Functions | |
Swap (const std::vector< boost::shared_ptr< CashFlow > > &firstLeg, const std::vector< boost::shared_ptr< CashFlow > > &secondLeg, const Handle< YieldTermStructure > &termStructure) | |
Instrument interface | |
bool | isExpired () const |
returns whether the instrument is still tradable. | |
Additional interface | |
Date | startDate () const |
Date | maturity () const |
Real | firstLegBPS () const |
Real | secondLegBPS () const |
TimeBasket | sensitivity (Integer basis=2) const |
Protected Member Functions | |
void | setupExpired () const |
void | performCalculations () const |
Protected Attributes | |
std::vector< boost::shared_ptr< CashFlow > > | firstLeg_ |
std::vector< boost::shared_ptr< CashFlow > > | secondLeg_ |
Handle< YieldTermStructure > | termStructure_ |
Real | firstLegBPS_ |
Real | secondLegBPS_ |
Member Function Documentation
|
|
|
This method must leave the instrument in a consistent state when the expiration condition is met. Reimplemented from Instrument. |
|
In case a pricing engine is not used, this method must be overridden to perform the actual calculations and set any needed results. In case a pricing engine is used, the default implementation can be used. Reimplemented from Instrument. |