Hello,
I’m new to Strata and found it very interesting at first sight. I was looking for pure Java financial library and this really seem to fit my needs.
My main need now is related to the pricing of a fixed vanilla bond. I explain what I need. Currently I have a portfolio of vanilla Euro fixed bond. My goal is to price those bonds, and to calculate interest rate sensitivities.
My input is a set of rate corresponding to the current Euro Swap curve used as the base to discount the bonds.
I would like to:
Create a curve from those spot rate
Calculate the static spread from a bond , so the spread to be put identical on each rate that discounting the flow give me the market price I need.
Then I need to add/substract the shock I need from this spread in order to be able to calculate parallel interest rate sensitivites on the same bond.
Is this possibile in strata? any suggestion, code would be so appreciated.
Pricing and measures related to bonds are in the pricers “DiscountingFixedCouponBondTradePricer” and “DiscountingFixedCouponBondProductPricer”. In particular the computation of the spread you want (called Z Spread in the library) can be obtained with the method “zSpreadFromCurvesAndDirtyPrice”.
It is possible to compute different interest rate sensitivities for the instruments (bonds in particular). You can compute zero-coupon (curve parameters) sensitivities or market rate (market quote) sensitivities. For bonds there is also the conventional modified duration (representing the change of price for a change of yield).
We have not implemented FRN into Strata at this stage.
For Zero Coupon bonds, we don’t have a specific instruments for that. You can create a FixedCouponBond with a fixedRate = 0. From a legal perspective this may be different from a pure zero coupon bond, but from a pricing and risk perspective it will be the same.
what i’m missing from this example is where the curve to discount is considered? or it’s returning the IRR of the bond? in case I need to performe sensitivies and calculate the z-spread I need a discounting curve. I’m a bit confused on this.