Swap Class Reference

#include <ql/Instruments/swap.hpp>

Inheritance diagram for Swap:

Inheritance graph
[legend]
List of all members.

Detailed Description

Interest rate swap.

The cash flows belonging to the first leg are payed; the ones belonging to the first leg are received.


Public Member Functions

 Swap (const std::vector< Handle< CashFlow > > &firstLeg, const std::vector< Handle< CashFlow > > &secondLeg, const RelinkableHandle< TermStructure > &termStructure)
Instrument interface
bool isExpired () const
 returns whether the instrument is still tradable.

Additional interface
Date startDate () const
Date maturity () const
double firstLegBPS () const
double secondLegBPS () const
TimeBasket sensitivity (int basis=2) const

Protected Member Functions

void setupExpired () const
void performCalculations () const

Protected Attributes

std::vector< Handle< CashFlow > > firstLeg_
std::vector< Handle< CashFlow > > secondLeg_
RelinkableHandle< TermStructuretermStructure_
double firstLegBPS_
double secondLegBPS_


Member Function Documentation

TimeBasket sensitivity int  basis = 2  )  const
 

Bug:
This method must still be checked. It is not guaranteed to yield the right results.

void setupExpired  )  const [protected, virtual]
 

This method must leave the instrument in a consistent state when the expiration condition is met.

Reimplemented from Instrument.

void performCalculations  )  const [protected, virtual]
 

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.


QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen