Date and time calculations

Documentation for this part of the library is in progress.

Dates

The concrete class QuantLib::Date implements the concept of date. Its functionalities include:

  • providing basic information such as weekday, day of the month, day of the year, month, and year;

  • comparing two dates to determine whether they are equal, or which one is the earlier or later, or the difference between them expressed in days;

  • incrementing or decrementing a date of a given number of days, or of a given period expressed in weeks, months, or years.

Calendars

The abstract class QuantLib::Calendar provides the interface for determining whether a date is a business day or a holiday for a given market, or incrementing/decrementing a date of a given number of business days. A number of calendars is contained in the QuantLib::Calendars namespace.

Day counters

The abstract class QuantLib::DayCounter provides more advanced means of measuring the distance between two dates according to a given market convention, both as number of days of fraction of year. A number of such conventions is contained in the QuantLib::DayCounters namespace, namely,

  • Actual/360
  • Actual/365
  • Actual/Actual, which can be calculated according to:
    • ISMA and US Treasury convention, also known as "Actual/Actual (Bond)";
    • ISDA, also known as "Actual/Actual (Historical)";
    • AFB, also known as "Actual/Actual (Euro)";
  • 30/360, which can be calculated according to:
    • USA convention;
    • European convention;
    • Italian convention.

QuantLib.org
QuantLib
Hosted by
SourceForge.net Logo
Documentation generated by
doxygen