ForwardRateStructure Class Reference

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

ForwardRateStructure Class Reference
Term structures

Forward-rate term structure More...

`#include <ql/termstructures/yield/forwardstructure.hpp>`

Inheritance diagram for ForwardRateStructure:
[legend]

List of all members.

## Public Member Functions
Constructors
See the TermStructure documentation for issues regarding constructors.
| ForwardRateStructure (const DayCounter &dayCounter=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >())
| ForwardRateStructure (const Date &referenceDate, const Calendar &cal=Calendar(), const DayCounter &dayCounter=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >())
| ForwardRateStructure (Natural settlementDays, const Calendar &cal, const DayCounter &dayCounter=DayCounter(), const std::vector< Handle< Quote > > &jumps=std::vector< Handle< Quote > >(), const std::vector< Date > &jumpDates=std::vector< Date >())
## Protected Member Functions
Calculations
These methods must be implemented in derived classes to perform the actual calculations. When they are called, range check has already been performed; therefore, they must assume that extrapolation is required.
virtual Rate | forwardImpl (Time) const =0
| instantaneous forward-rate calculation
virtual Rate | zeroYieldImpl (Time) const
YieldTermStructure implementation
DiscountFactor | discountImpl (Time) const

## Detailed Description

Forward-rate term structure

This abstract class acts as an adapter to YieldTermStructure allowing the programmer to implement only the `forwardImpl(Time)` method in derived classes.

Zero yields and discounts are calculated from forwards.

Forward rates are assumed to be annual continuous compounding.

## Member Function Documentation

virtual Rate zeroYieldImpl | ( | Time |  | ) | const`[protected, virtual]`

Returns the zero yield rate for the given date calculating it from the instantaneous forward rate as

Warning:
  This default implementation uses an highly inefficient and possibly wildly inaccurate numerical integration. Derived classes should override it if a more efficient implementation is available.

Reimplemented in InterpolatedForwardCurve< Interpolator >, and ForwardSpreadedTermStructure.

DiscountFactor discountImpl | ( | Time | t | ) | const`[protected, virtual]`

Returns the discount factor for the given date calculating it from the zero rate as

Implements YieldTermStructure.