ForwardRateAgreement Class Reference
[Financial instruments]

#include <ql/instruments/forwardrateagreement.hpp>

Inheritance diagram for ForwardRateAgreement:

Inheritance graph
[legend]
List of all members.

Detailed Description

Forward rate agreement (FRA) class

1. Unlike the forward contract conventions on carryable financial assets (stocks, bonds, commodities), the valueDate for a FRA is taken to be the day when the forward loan or deposit begins and when full settlement takes place (based on the NPV of the contract on that date). maturityDate is the date when the forward loan or deposit ends. In fact, the FRA settles and expires on the valueDate, not on the (later) maturityDate. It follows that (maturityDate - valueDate) is the tenor/term of the underlying loan or deposit

2. Choose position type = Long for an "FRA purchase" (future long loan, short deposit [borrower])

3. Choose position type = Short for an "FRA sale" (future short loan, long deposit [lender])

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

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

Example: valuation of a forward-rate agreement

Todo:
Add preconditions and tests
Todo:
Should put an instance of ForwardRateAgreement in the FraRateHelper to ensure consistency with the piecewise yield curve.
Todo:
Differentiate between BBA (British)/AFB (French) [assumed here] and ABA (Australian) banker conventions in the calculations.
Warning:
This class still needs to be rigorously tested
Examples:

FRA.cpp.


Public Member Functions

 ForwardRateAgreement (const Date &valueDate, const Date &maturityDate, Position::Type type, Rate strikeForwardRate, Real notionalAmount, const boost::shared_ptr< IborIndex > &index, const Handle< YieldTermStructure > &discountCurve=Handle< YieldTermStructure >())
Calculations
bool isExpired () const
Date settlementDate () const
Real spotIncome (const Handle< YieldTermStructure > &incomeDiscountCurve) const
Real spotValue () const
 Spot value (NPV) of the underlying loan.
InterestRate forwardRate () const
 Returns the relevant forward rate associated with the FRA term.

Protected Member Functions

void performCalculations () const

Protected Attributes

Position::Type fraType_
InterestRate forwardRate_
 aka FRA rate (the market forward rate)
InterestRate strikeForwardRate_
 aka FRA fixing rate, contract rate
Real notionalAmount_
boost::shared_ptr< IborIndexindex_


Member Function Documentation

bool isExpired (  )  const [virtual]

A FRA expires/settles on the valueDate

Reimplemented from Forward.

Date settlementDate (  )  const [virtual]

This returns evaluationDate + settlementDays (not FRA valueDate).

Reimplemented from Forward.

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

Income is zero for a FRA

Implements Forward.

Real spotValue (  )  const [virtual]

Spot value (NPV) of the underlying loan.

This has always a positive value (asset), even if short the FRA

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.