cleanForwardPrice (3) - Linux Manuals

cleanForwardPrice: Forward contract on a fixed-rate bond

NAME

QuantLib::FixedRateBondForward - Forward contract on a fixed-rate bond

SYNOPSIS


#include <ql/instruments/fixedratebondforward.hpp>

Inherits QuantLib::Forward.

Public Member Functions

Constructors


FixedRateBondForward (const Date &valueDate, const Date &maturityDate, Position::Type type, Real strike, Natural settlementDays, const DayCounter &dayCounter, const Calendar &calendar, BusinessDayConvention businessDayConvention, const boost::shared_ptr< FixedRateBond > &fixedCouponBond, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >(), const Handle< YieldTermStructure > &incomeDiscountCurve=Handle< YieldTermStructure >())

Calculations


Real forwardPrice () const
(dirty) forward bond price
Real cleanForwardPrice () const
(dirty) forward bond price minus accrued on bond at delivery
Real spotIncome (const Handle< YieldTermStructure > &incomeDiscountCurve) const
NPV of bond coupons discounted using incomeDiscountCurve.
Real spotValue () const
NPV of underlying bond.

Protected Member Functions


void performCalculations () const

Protected Attributes


boost::shared_ptr< FixedRateBond > fixedCouponBond_

Detailed Description

Forward contract on a fixed-rate bond

1. valueDate refers to the settlement date of the bond forward contract. maturityDate is the delivery (or repurchase) date for the underlying bond (not the bond's maturity date).

2. Relevant formulas used in the calculations ($P$ refers to a price):

a. $ P_{CleanFwd}(t) = P_{DirtyFwd}(t) - AI(t=deliveryDate) $ where $ AI $ refers to the accrued interest on the underlying bond.

b. $ P_{DirtyFwd}(t) = ac{P_{DirtySpot}(t) - SpotIncome(t)} {discountCurve->discount(t=deliveryDate)} $

c. $ SpotIncome(t) = um_i


s incomeDiscountCurve->discount(t_i) ight) $ where $ CF_i $ represents the ith bond cash flow (coupon payment) associated with the underlying bond falling between the settlementDate and the deliveryDate. (Note the two different discount curves used in b. and c.)

Example: valuation of a repo on a fixed-rate bond

Possible enhancements

Add preconditions and tests

Possible enhancements

Create switch- if coupon goes to seller is toggled on, don't consider income in the $ P_{DirtyFwd}(t) $ calculation.

Possible enhancements

Verify this works when the underlying is paper (in which case ignore all AI.)

Warning

This class still needs to be rigorously tested

Examples:

Repo.cpp.

Constructor & Destructor Documentation

FixedRateBondForward (const Date & valueDate, const Date & maturityDate, Position::Type type, Real strike, Natural settlementDays, const DayCounter & dayCounter, const Calendar & calendar, BusinessDayConvention businessDayConvention, const boost::shared_ptr< FixedRateBond > & fixedCouponBond, const Handle< YieldTermStructure > & discountCurve = Handle< YieldTermStructure >(), const Handle< YieldTermStructure > & incomeDiscountCurve = Handle< YieldTermStructure >())

If strike is given in the constructor, can calculate the NPV of the contract via NPV().

If strike/forward price is desired, it can be obtained via forwardPrice(). In this case, the strike variable in the constructor is irrelevant and will be ignored.

Member Function Documentation

Real spotIncome (const Handle< YieldTermStructure > & incomeDiscountCurve) const [virtual]

NPV of bond coupons discounted using incomeDiscountCurve.

Here only coupons between max(evaluation date,settlement date) and maturity date of bond forward contract are considered income.

Implements Forward.

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

Author

Generated automatically by Doxygen for QuantLib from the source code.