swap.rate {FinancialMath} | R Documentation |
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=\sum_{k=1}^n[\frac{R}{(1+rates_k)^k}]+\frac{1}{(1+rates_n)^n}
For zero coupon bond prices: 1=\sum_{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")
[Package FinancialMath version 0.1.1 Index]