# Basic fixed rate bond pricing issue in Quantlib

I'm trying to price a fixed rate bond in Quantlib but the result comes out wrong.

I'm trying to price 1Y fixed rate bond:

issue_date= 06-03-2008
maturity_date = 06-03-2009
settlement_days=0
payment_frequency=semi-annual
day_count = ACT/ACT
coupon=0.02
yield=0.02
face_value=100
compounding=simple


I expect 100, however QL returns 99.99989509825711.

Both Bloomberg and Excel return 100, as does my manual calculation. Thanks!

This is how I would price the bond in Python with your inputs. You can translate it easily to C++ if that's what you're using.

from QuantLib import *

Settings.instance().evaluationDate = Date(6,3,2008)

schedule = Schedule(Date(6,3,2008), Date(6,3,2009), Period(6,Months),
NullCalendar(), Following, Following,
DateGeneration.Forward, False)

bond = FixedRateBond(0, 100.0, schedule, [0.02], ActualActual(ActualActual.ISMA))

print(bond.cleanPrice(0.02, ActualActual(ActualActual.ISMA), Simple, Semiannual))


and the result is 100 as expected (by the way, I'm not sure whether you should use Simple or Compounded as compounding, but it doesn't seem to make a difference in this case). I'm using the latest QuantLib version, 1.15.

Are you using the same code? If not, what is different?

• Thank you that's super helpful, we were not using NullCalendar which seems to be causing the issue! Feb 28 '19 at 12:03