# What rate/structure to use in <yield term structure> for the pricing of callable bond using QuantLib

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.

• "the rate equal to the bond yield in the market" -- what type bond yield are you using, e.g. yield-to-call, yield-to-worst, yield-to-maturity? edit i actually don't see yield as an input to CallableFixedRateBond based on QL's github repo: github.com/lballabio/QuantLib/blob/master/ql/experimental/… – Will Gu Nov 29 '17 at 20:44