I am new to quantlib (actually to the fixed income universe). I am trying to price a callable bond using the CallableFixedRateBond classe of quantlib, and compare it to the market data(bloomberg).
I create the bond, I created a flat term structure with 'the rate equal to the bond yield in the market' ( I am not sure that it is a good idea) and I feed it to a HullWhite model with the volatility given by the market data.
The price I get is slightly different from the market by 0.5%, instead of 101.03 I get 100.602, is it just because of the accuracy of the model or the rate I used to build the structure is wrong, Do I need a more sophisticated structure?
Actually the price I got for the equivalent non callable bond is closer to the market price 101.026 for 101.031.
Thanks in advance