Bojan Nikolic: Using and Understanding the QuantLib Addin

[website home] | [BN Algorithms]

Periods of time in QuantLib

Many functions in QuantLib take a period of time, expressed as a relative measure from some reference date. The periods are expressed by a natural number followed by an abbreviation:

<Day>

Abbreviated as ‘D’

<Week>

Abbreviated as ‘W’

<Month>

Abbreviated as ‘M’

<Year>

Abbreviated as ‘Y’

Multiple periods can be specified together in which case they are added together, for example 2Y6M is interpreted as two years and six months.