Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

swap.rate

Interest Rate Swap


Description

Solves for the fixed interest rate given the variable interest rates (either as spot rates or zero coupon bond prices).

Usage

swap.rate(rates, type="spot_rate")

Arguments

rates

vector of variable rates

type

rates as either "spot_rate" or "zcb_price"

Details

For spot rates: 1=∑_{k=1}^n[\frac{R}{(1+rates_k)^k}]+\frac{1}{(1+rates_n)^n}

For zero coupon bond prices: 1=∑_{k=1}^n(R*rates_k)+rates_n

Where R= fixed swap rate.

Value

The fixed interest rate swap.

See Also

Examples

swap.rate(rates=c(.04, .05, .06), type = "spot_rate")

swap.rate(rates=c(.93,.95,.98,.90), type = "zcb_price")

FinancialMath

Financial Mathematics for Actuaries

v0.1.1
GPL-2
Authors
Kameron Penn [aut, cre], Jack Schmidt [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.