WebCab Bonds
v2.01
(J2SE Edition)

webcab.lib.finance.pricing.contexts
Interface ForwardRateContext

All Superinterfaces:
ScalarContext, SpotRateContext

public interface ForwardRateContext
extends SpotRateContext

This interface is implemented by all contexts supporting the FORWARD_RATE category. It offers access to the forward rate curve. The models providing this type of context are called models of the forward rate, as opposed to the spot rate models (both are interest rate models). The forward rate models included are:


Method Summary
 double getForwardRate(double yearsToStart, double yearsToEnd)
          Returns the forward rate between two future moments in time.
 double getInstantaneousForwardRate(double timeToMaturity)
          Returns the instantaneous forward rate (i.e the present forward rate) with maturity in years timeToMaturity.
 
Methods inherited from interface webcab.lib.finance.pricing.contexts.SpotRateContext
getSpotRate
 
Methods inherited from interface webcab.lib.finance.pricing.contexts.ScalarContext
getValue
 

Method Detail

getInstantaneousForwardRate

public double getInstantaneousForwardRate(double timeToMaturity)
                                   throws NotDefinedException
Returns the instantaneous forward rate (i.e the present forward rate) with maturity in years timeToMaturity. Note that the forward rates measures the interest rate over a period, therefore the interest rate returned here is generally assumed to apply from the present point in time until the maturity date.

Parameters:
timeToMaturity - the number of the years forward at which the forward rate is returned.
Returns:
double
Throws:
NotDefinedException

getForwardRate

public double getForwardRate(double yearsToStart,
                             double yearsToEnd)
                      throws NotDefinedException
Returns the forward rate between two future moments in time. The future interval is given by the number of years until the start of the interval yearsToStart, and the number of years until the end of the interval yearsToEnd.

Parameters:
yearsToStart - the begining of the interval on which the rate applies
yearsToEnd - the end of the interval on which the rate applies
Returns:
double
Throws:
NotDefinedException

WebCab Bonds
v2.01
(J2SE Edition)