swap.rate: Interest Rate Swap

Description Usage Arguments Details Value See Also Examples

Description

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

Usage

1
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

swap.commodity

Examples

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

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

FinancialMath documentation built on May 1, 2019, 11:16 p.m.