Bojan Nikolic: Using and Understanding the QuantLib Addin

[website home] | [BN Algorithms]

Day Count(ing) Conventions

Day Count convention is a convention that translates an actual period of time into the units of time that are used for computing accrued interest. Several conventions are widely used, see for example [1] and [2]

The conventions available in QuantLib are:

  • Actual/360

  • Actual/365F

  • Actual/Actual

  • Business/252

  • 30/360

(And additionally some day count conventions that are not often used in practice but are useful for comparison of simple theoretical calculations.) The conventions are specified to parameters simply by their names.

There is also an online QuantLib calendar calculator here http://quantpanel.bnikolic.co.uk/Calendar

Example

The example below shows that one calendar year generally does not correspond to a unit measure of time as used for interest calculations. The example uses the function qlDayCounterYearFraction to compute the year fraction, i.e., the time that passes in units of years as used for interest calculation, in the calendar year running from 1st December 2011 to 1st December 2012.

2011-12-01

2012-12-01

->

2011-12-01

2012-12-01

=qlDayCounterYearFraction(“Actual/360”,R[-1]C,R[-1]C[1])

->

1.01666667