QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
Modules | Classes | Typedefs | Enumerations
Date and time calculations

Modules

 Calendars
 
 Day counters
 

Classes

class  DateInterval
 Date interval described by a number of a given time unit. More...
 
class  PricingPeriod
 Time pricingperiod described by a number of a given time unit. More...
 
class  Calendar
 calendar class More...
 
class  Date
 Concrete date class. More...
 
struct  DateGeneration
 Date-generation rule. More...
 
class  DayCounter
 day counter class More...
 
class  Period
 
class  Schedule
 Payment schedule. More...
 

Typedefs

typedef Integer Day
 Day number. More...
 
typedef Integer Year
 Year number. More...
 

Enumerations

enum  BusinessDayConvention {
  Following , ModifiedFollowing , Preceding , ModifiedPreceding ,
  Unadjusted , HalfMonthModifiedFollowing , Nearest
}
 Business Day conventions. More...
 
enum  Month {
  January = 1 , February = 2 , March = 3 , April = 4 ,
  May = 5 , June = 6 , July = 7 , August = 8 ,
  September = 9 , October = 10 , November = 11 , December = 12 ,
  Jan = 1 , Feb = 2 , Mar = 3 , Apr = 4 ,
  Jun = 6 , Jul = 7 , Aug = 8 , Sep = 9 ,
  Oct = 10 , Nov = 11 , Dec = 12
}
 Month names. More...
 
enum  Frequency {
  NoFrequency = -1 , Once = 0 , Annual = 1 , Semiannual = 2 ,
  EveryFourthMonth = 3 , Quarterly = 4 , Bimonthly = 6 , Monthly = 12 ,
  EveryFourthWeek = 13 , Biweekly = 26 , Weekly = 52 , Daily = 365 ,
  OtherFrequency = 999
}
 Frequency of events. More...
 
enum  TimeUnit {
  Days , Weeks , Months , Years ,
  Hours , Minutes , Seconds , Milliseconds ,
  Microseconds
}
 Units used to describe time periods. More...
 
enum  Weekday {
  Sunday = 1 , Monday = 2 , Tuesday = 3 , Wednesday = 4 ,
  Thursday = 5 , Friday = 6 , Saturday = 7 , Sun = 1 ,
  Mon = 2 , Tue = 3 , Wed = 4 , Thu = 5 ,
  Fri = 6 , Sat = 7
}
 

Detailed Description

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

Typedef Documentation

◆ Day

typedef Integer Day

Day number.

Definition at line 53 of file date.hpp.

◆ Year

typedef Integer Year

Year number.

Definition at line 87 of file date.hpp.

Enumeration Type Documentation

◆ BusinessDayConvention

Business Day conventions.

These conventions specify the algorithm used to adjust a date in case it is not a valid business day.

Enumerator
Following 

Choose the first business day after the given holiday.

ModifiedFollowing 

Choose the first business day after the given holiday unless it belongs to a different month, in which case choose the first business day before the holiday.

Preceding 

Choose the first business day before the given holiday.

ModifiedPreceding 

Choose the first business day before the given holiday unless it belongs to a different month, in which case choose the first business day after the holiday.

Unadjusted 

Do not adjust.

HalfMonthModifiedFollowing 

Choose the first business day after the given holiday unless that day crosses the mid-month (15th) or the end of month, in which case choose the first business day before the holiday.

Nearest 

Choose the nearest business day to the given holiday. If both the preceding and following business days are equally far away, default to following business day.

Definition at line 41 of file businessdayconvention.hpp.

◆ Month

enum Month

Month names.

Enumerator
January 
February 
March 
April 
May 
June 
July 
August 
September 
October 
November 
December 
Jan 
Feb 
Mar 
Apr 
Jun 
Jul 
Aug 
Sep 
Oct 
Nov 
Dec 

Definition at line 57 of file date.hpp.

◆ Frequency

enum Frequency

Frequency of events.

Enumerator
NoFrequency 

null frequency

Once 

only once, e.g., a zero-coupon

Annual 

once a year

Semiannual 

twice a year

EveryFourthMonth 

every fourth month

Quarterly 

every third month

Bimonthly 

every second month

Monthly 

once a month

EveryFourthWeek 

every fourth week

Biweekly 

every second week

Weekly 

once a week

Daily 

once a day

OtherFrequency 

some other unknown frequency

Definition at line 37 of file frequency.hpp.

◆ TimeUnit

enum TimeUnit

Units used to describe time periods.

Enumerator
Days 
Weeks 
Months 
Years 
Hours 
Minutes 
Seconds 
Milliseconds 
Microseconds 

Definition at line 37 of file timeunit.hpp.

◆ Weekday

enum Weekday

Day's serial number MOD 7; WEEKDAY Excel function is the same except for Sunday = 7.

Enumerator
Sunday 
Monday 
Tuesday 
Wednesday 
Thursday 
Friday 
Saturday 
Sun 
Mon 
Tue 
Wed 
Thu 
Fri 
Sat 

Definition at line 41 of file weekday.hpp.