Learn R Programming

termstrc (version 1.3.7)

impl_fwr: Implied Forward Rate Calculation

Description

Calculates the implied forward rates from given spot rates.

Usage

impl_fwr(m, s)

Arguments

m
maturity vector.
s
spot rate vector.

Value

  • The function returns the calculated forward rate vector.

Details

Implied forward rates can be calculated using the following relationship:

$$f(t',T) = \frac{s(m_T)m_T - s(m_{t'})m_{t'}}{m_T-m_{t'}},$$

whereas $s(m_T), s(m_{t'})$ is the spot rate for a maturity $m_T,m_{t'}$ respectively.

Examples

Run this code
s <-  spr_ns(c(0.03,0.02,0.01,5),1:30)
impl_fwr(s,m=1:30)

Run the code above in your browser using DataLab