# Forward Rate

## Compounding

#### Simple compounding

The simply compounded forward rate $f_{s}(t,T_{1},T_{2})$ is the interest rate satisfying

$\displaystyle{P(t, T_{2}) = \frac{P(t, T_{1})}{1 + (T_{2} - T_{1})f_{s}(t, T_{1},T_{2})} }$

or

$\displaystyle{ \qquad\qquad f_{s}(t, T_{1},T_{2}) = \frac{1}{T_{2} - T_{1}} \left(\frac{P(t, T_{1})}{P(t, T_{2})} - 1\right) \qquad\qquad (1) }$

#### Periodic compounding

The 1-period compounded forward rate $f_{1}(t,T_{1},T_{2})$ is defined as

$\displaystyle{P(t, T_{2}) = \frac{P(t,T_{1})}{\left(1 + f_{1}(t, T_{1}, T_{2})\right)^{T_{2} - T_{1}}} }$

or equivalently,

$\displaystyle{ f_{1}(t, T_{1}, T_{2}) = \left(\frac{P(t,T_{1})}{P(t, T_{2})}\right)^{\frac{1}{T_{2} - T_{1}}} - 1 }$

#### Continuous compounding

The continuously compounded forward rate is frequently used in a theoretical context. It is implicitly defined by

$\displaystyle{P(t, T_{2}) = P(t,T_{1})\exp(-f_{c}(t, T_{1}, T_{2}) (T_{2} - T_{1})) }$

and yields the explicit representation

$\displaystyle{ f_{c}(t, T_{1}, T_{2}) = \frac{1}{T_{2} - T_{1}}\ln\left(\frac{P(t,T_{1})}{P(t, T_{2})}\right) }$

## Interrelation between spot and forward rates

Define $\tau$ as the ratio of the time-to-settlement to the tenor, i.e. $\tau := \frac{T_{1} - t}{T_{2} - T_{1}}$.

#### Simple compounding

$\displaystyle{\begin{eqnarray} f_{s}(t, T_{1}, T_{2}) &=& P(t,T_{1})\left((1 + \tau) \cdot r_{s}(t,T_{2}) - \tau \cdot r_{s}(t,T_{1})\right) \\ &=& P(t,T_{1}) \Big(r_{s}(t,T_{2}) + \tau \cdot\left[r_{s}(t,T_{2}) - r_{s}(t,T_{1}) \right] \Big) \end{eqnarray} }$

#### Periodic compounding

$\displaystyle{f_{1}(t, T_{1}, T_{2}) = \frac{\left(1 + r_{1}(t,T_{2})\right)^{1 + \tau}}{\left(1 + r_{1}(t,T_{1}) \right)^{\tau}} - 1 }$

#### Continuous compounding

$\displaystyle{\begin{eqnarray} f_{c}(t, T_{1}, T_{2}) &=& (1 + \tau) \cdot r_{c}(t,T_{2}) - \tau\cdot r_{c}(t,T_{1}) \\ &=& r_{c}(t,T_{2}) + \tau \cdot \Big[r_{c}(t,T_{2}) - r_{c}(t,T_{1}) \Big] \end{eqnarray} }$

## Instantaneous forward rates

The instantaneous simply compounded forward rate $f_{s}(t,T)$ is defined as the limit of the regular forward rate as the tenor approaches 0, i.e.

$\displaystyle{ f_{s}(t,T) := \lim_{\Delta \to 0} f_{s}(t,T,T+\Delta) \,. }$

Substituting (1) for the forward rate yields

$\displaystyle{\begin{eqnarray} f_{s}(t,T) &=& \lim_{\Delta \to 0} -\frac{1}{P(t,T+\Delta)} \cdot \frac{P(t_{0},T+\Delta) - P(t, T)}{\Delta} \\ &=& -\frac{1}{P(t,T)} \cdot \frac{\partial P(t,T)}{\partial T} = - \frac{\partial \ln(P(t,T))}{\partial T} \end{eqnarray}}$

Correspondingly, the instantaneous continuously compounded forward rate $f_{c}(t,T)$ is given by

$\displaystyle{ f_{c}(t,T) := \lim_{\Delta \to 0} f_{c}(t,T,T+\Delta) \,. }$

It follows that

$\displaystyle{\begin{eqnarray} f_{c}(t,T) &=& \lim_{\Delta \to 0} -\frac{\ln(P(t,T+\Delta)) - \ln(P(t,T))}{\Delta} \\ &=& - \frac{\partial \ln(P(t,T))}{\partial T} \end{eqnarray} }$

Thus, we can conclude that

$\displaystyle{ f_{s}(t,T) = f_{c}(t,T) \,. }$

## Codebook

### Construction

The initialization of a forward rate is straight forward. The class InterestRate provides a 4-place factory method create(double level, double tts, double tenor, Compounding compounding) which returns a forward rate with the specified properties. The argument tts represents the time-to-settlement, i.e. the period until the settlement occurs.

IInterestRate forward_rate1 = InterestRate.create(0.06, 0.25, 0.5, Compounding.SIMPLE);
IInterestRate forward_rate2 = InterestRate.create(0.06, 0.25, 0.0, Compounding.SIMPLE);
// forward_rate2 is an instantaneous rate, see below


### Methods

It is possible to test, if an interest rate is a spot rate or a forward rate,

forward_rate1.isForwardRate();   // returns true
forward_rate1.isSpotRate();   // returns false


or if the interest rate is only valid for an infinitesimal period of time, i.e. if it is a instantaneous rate

forward_rate1.isInstantaneous();   // returns false
forward_rate2.isInstantaneous();   // returns true