powered by
swap.rate(rates, type="spot_rate")
For zero coupon bond prices: $1=\sum_{k=1}^n(R*rates_k)+rates_n$
Where $R=$ fixed swap rate.
swap.commodity
swap.rate(rates=c(.93,.95,.98,.90), type = "zcb_price")
Run the code above in your browser using DataLab