AssetSwap Class Reference

### A free/open-source library for quantitative finance

Classes | Public Member Functions
AssetSwap Class Reference
Financial instruments

Bullet bond vs Libor swap. More...

`#include <ql/instruments/assetswap.hpp>`

Inheritance diagram for AssetSwap:
[legend]

List of all members.

## Classes
class | arguments
| Arguments for asset swap calculation More...
class | results
| Results from simple swap calculation More...
## Public Member Functions
| AssetSwap (bool payBondCoupon, const boost::shared_ptr< Bond > &bond, Real bondCleanPrice, const boost::shared_ptr< IborIndex > &iborIndex, Spread spread, const Schedule &floatSchedule=Schedule(), const DayCounter &floatingDayCount=DayCounter(), bool parAssetSwap=true)
| AssetSwap (bool parAssetSwap, const boost::shared_ptr< Bond > &bond, Real bondCleanPrice, Real nonParRepayment, Real gearing, const boost::shared_ptr< IborIndex > &iborIndex, Spread spread=0.0, const DayCounter &floatingDayCount=DayCounter(), Date dealMaturity=Date(), bool payBondCoupon=false)
Spread | fairSpread () const
Real | floatingLegBPS () const
Real | floatingLegNPV () const
Real | fairCleanPrice () const
Real | fairNonParRepayment () const
bool | parSwap () const
Spread | spread () const
Real | cleanPrice () const
Real | nonParRepayment () const
const boost::shared_ptr< Bond > & | bond () const
bool | payBondCoupon () const
const Leg & | bondLeg () const
const Leg & | floatingLeg () const
void | setupArguments (PricingEngine::arguments *args) const
void | fetchResults (const PricingEngine::results *) const

## Detailed Description

Bullet bond vs Libor swap.

for mechanics of par asset swap and market asset swap, refer to "Introduction to Asset Swap", Lehman Brothers European Fixed Income Research - January 2000, D. O'Kane

Warning:
  bondCleanPrice must be the (forward) price at the floatSchedule start date

Bug:
  fair prices are not calculated correctly when using indexed coupons.

## Member Function Documentation

void setupArguments | ( | PricingEngine::arguments * |  | ) | const`[virtual]`

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 Swap.

void fetchResults | ( | const PricingEngine::results * | r | ) | const`[virtual]`

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 Swap.