I’ve been using strata for calculating price from yield and yield from price for bonds. Also defining and using a Canadian calendar to be used in the calculations. Really happy with the library.
Now I need to enhance this calculator module I wrote to include strips, real return bonds and callable bonds.
Looking through the API I couldn’t figure a way to deal with those instruments. I tried the strips by using the existing code with a zero coupon, but I get different results compared to Bloomberg (on the thirds and even second decimal place - so quite big a difference).
Can anyone point me in the right direction for implementing the right way a price/yield calculator for those instruments?
RRBs are Government of Canada bonds that pay you a rate of return that is adjusted for inflation