Interest Rate Swap
Solves for the fixed interest rate given the variable interest rates (either as spot rates or zero coupon bond prices).
swap.rate(rates, type="spot_rate")
rates |
vector of variable rates |
type |
rates as either "spot_rate" or "zcb_price" |
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.
The fixed interest rate swap.
swap.rate(rates=c(.04, .05, .06), type = "spot_rate") swap.rate(rates=c(.93,.95,.98,.90), type = "zcb_price")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.