DayCounters

DayCounters.AFBActualActualType
AFBActualActual

Also known as "Actual/Actual (Euro)" is a ActualActual subtype day count convention where the denominator is either 365 (if the calculation period does not contain 29th February) or 366 (if the calculation period includes 29th February). For periods longer than one year... to be completed.

source
DayCounters.Actual360Type
Actual360([lastday = false])

Day count convention, also known as "Actual/360", "Act/360", or "A/360". Can include the last day in computations depending on the lastday value.

source
DayCounters.Actual365FixedType
Actual365Fixed

Day count convention, also known as "Actual/365 (Fixed)", "Act/365 (Fixed)", or "A/365F".

Warning

According to ISDA, "Actual/365" (without "Fixed") is an alias for "Actual/Actual (ISDA)" (see ActualActual). If Actual/365 is not explicitly specified as fixed in an instrument specification, you might want to double-check its meaning.

source
DayCounters.ActualActualType
ActualActual

Day count convention that can be calculated according to the ISDA, ISMA and AFB conventions. The difference between these conventions lie in the computation of the denominator. The numerator is, in all cases, equal to the actual number of days between two dates, including the first one and excluding the last one.

For more details, please refer to https://www.isda.org/a/pIJEE/The-Actual-Actual-Day-Count-Fraction-1999.pdf.

source
DayCounters.BusinessDayMethod
BusinessDay(v)

Construct a BusinessDay object with the given v value. Input must be losslessly convertible to an Int64.

source
DayCounters.BusinessMonthMethod
BusinessMonth(v)

Construct a BusinessMonth object with the given v value. Input must be losslessly convertible to an Int64.

source
DayCounters.BusinessWeekMethod
BusinessWeek(v)

Construct a BusinessWeek object with the given v value. Input must be losslessly convertible to an Int64.

source
DayCounters.BusinessYearMethod
BusinessYear(v)

Construct a BusinessYear object with the given v value. Input must be losslessly convertible to an Int64.

source
DayCounters.DayCountConventionType
DayCountConvention

Supertype for elements that provide methods for determining the length of a time period according to given market convention, both as a number of days and as a year fraction.

source
DayCounters.EuropeanThirty360Type
EuropeanThirty360

Also known as "30E/360", or "Eurobond Basis" is a Thirty360 subtype day count convention. Starting dates or ending dates that occur on the 31st of a month become equal to the 30th of the same month.

source
DayCounters.GermanThirty360Type
GermanThirty360([islastperiod = false])

Also known as "30E/360 ISDA" is a Thirty360 subtype day count convention. Starting dates or ending dates that occur on the last day of February become equal to 30 for computational sake, except for the termination date.

source
DayCounters.ISDAActualActualType
ISDAActualActual

Also known as "Actual/Actual (Historical)", "Actual/Actual", "Act/Act", and according to ISDA also "Actual/365", "Act/365", and "A/365", is a ActualActual subtype day count convention where the denominator varies depending on whether a portion of relevant calculation period falls within a leap year (for the portion of the calculation period falling within a leap year, the denominator is 366 and for the portion falling outside a leap year, the denominator is 365).

source
DayCounters.ItalianThirty360Type
ItalianThirty360

Is a Thirty360 subtype day count convention. Starting dates or ending dates that occur on February and are grater than 27 become equal to 30 for computational sake.

source
DayCounters.NERCType
NERC

North American Energy Reliability Council calendar (data from http://www.nerc.com/~oc/offpeaks.html):

source
DayCounters.NearestType
Nearest

A BusinessDayConvention subtype that chooses 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.

source
DayCounters.Thirty360Type
Thirty360

Day count convention that can be calculated according to to US, European, Italian or German conventions.

source
DayCounters.USAThirty360Type
USAThirty360

Also known as "30/360", "360/360", or "Bond Basis" is a Thirty360 subtype day count convention. If the starting date is the 31st of a month, it becomes equal to the 30th of the same month. If the ending date is the 31st of a month and the starting date is earlier than the 30th of a month, the ending date becomes equal to the 1st of the next month, otherwise the ending date becomes equal to the 30th of the same month.

source
DayCounters.adjustdateFunction
adjustdate(dt::Date, calendar::BusinessCalendar, [convention::BusinessDayConvention = Following()]) -> Date

Adjusts a non-business day to the appropriate near business day with respect to the given convention. The convention defaults to Following if not provided.

source
DayCounters.advanceFunction
advance(dt::Date, step::DatePeriod, calendar::BusinessCalendar, [convention::BusinessDayConvention = Following()])

Advances the given date dt, step number of days and returns the result. step can be either a DatePeriod or a BusinessDatePeriod. In the first case, the date advances using calendar days and if it falls in a holiday (i.e., a non business day), it is adjusted using the convention. On the second case, the date advances using business days, so it is expected that step can be converted to BusinessDay. It is important to note that if the provided step is either 0 days or 0 businessdays and dt is a holiday, it will be adjusted using the convention.

julia> dt = Date(2001, 12, 26)
2001-12-26

julia> advance(dt, Day(4), ArgentinaCalendar())
2002-01-02

julia> advance(dt, BusinessDay(4), ArgentinaCalendar())
2002-01-03

julia> dt = Date(2002, 1, 1)
2002-01-01

julia> advance(dt, Day(0), ArgentinaCalendar())
2002-01-02

julia> advance(dt, BusinessDay(0), ArgentinaCalendar())
2002-01-02
source
DayCounters.isbusinessdayFunction
isbusinessday(dt::Date, calendar::BusinessCalendar) -> Bool

Provides methods for determining whether a date dt is or not a business day. A calendar, defined for specific exchange holiday schedule or for general country holiday schedule, must be provided.

source
DayCounters.isholidayMethod
isholiday(dt::Date, calendar::BusinessCalendar) -> Bool

Provides methods for determining whether a date dt is or not a holiday. A calendar, defined for specific exchange holiday schedule or for general country holiday schedule, must be provided.

source