Asset swap spread calculation
Posted by MDecau on Apr 10, 2015; 12:00pm
URL: http://quantlib.414.s1.nabble.com/Asset-swap-spread-calculation-tp16457.html
Hello!
I am trying to get the asset swap spread of a bond.
I set up the bond, an Ibor curve, and an asset swap with these two elements.
After setting the pricing engine, I called the fairSpread function on the new asset swap.
I did all of these with real market data (from Bloomberg), in order to test my results. Everything works fine (the bond valuation), except the asset swap spread, which is very far from the one provided by Bloomberg (2.994% with Quantlib and 0.118% with Bloomberg).
Because every results on the bond is good, my mistake has to be in the set up of the asset swap. Or maybe the fairSpread function does not do what I think. I tried to go inside the code of Quantlib, but it is very complex, I have a hard time to understand it.
I can't figure out what is wrong with it, I thought about it for a while and I am really stuck. It may be an easy thing to do, but I'm still learning. What could I do to fix this? How can I calculate the asset swap spread of a bond?
Thank you for your help