DayCounters
DayCounters.AFBActualActual
DayCounters.Actual360
DayCounters.Actual365
DayCounters.Actual365Fixed
DayCounters.ActualActual
DayCounters.Annual
DayCounters.ArgentinaCalendar
DayCounters.Bimonthly
DayCounters.Biweekly
DayCounters.BondActualActual
DayCounters.BondBasisThirty360
DayCounters.BrazilCalendar
DayCounters.BrazilExchange
DayCounters.BrazilSettlement
DayCounters.BusinessDay
DayCounters.BusinessDayConvention
DayCounters.BusinessMonth
DayCounters.BusinessWeek
DayCounters.BusinessYear
DayCounters.Daily
DayCounters.DayCountConvention
DayCounters.EuroActualActual
DayCounters.EurobondBasisThirty360
DayCounters.EuropeanThirty360
DayCounters.EveryFourthMonth
DayCounters.EveryFourthWeek
DayCounters.FederalReserve
DayCounters.Following
DayCounters.GermanThirty360
DayCounters.GovernmentBond
DayCounters.HalfMonthModifiedFollowing
DayCounters.HistoricalActualActual
DayCounters.ISDAActualActual
DayCounters.ISMAActualActual
DayCounters.ItalianThirty360
DayCounters.LiborImpact
DayCounters.ModifiedFollowing
DayCounters.ModifiedPreceding
DayCounters.Monthly
DayCounters.NERC
DayCounters.NYSE
DayCounters.Nearest
DayCounters.NoFrequency
DayCounters.Once
DayCounters.OtherFrequency
DayCounters.Preceding
DayCounters.Quarterly
DayCounters.Semiannual
DayCounters.Settlement
DayCounters.TARGETCalendar
DayCounters.Thirty360
DayCounters.USAThirty360
DayCounters.Unadjusted
DayCounters.UnitedStatesCalendar
DayCounters.Weekly
DayCounters.adjustdate
DayCounters.advance
DayCounters.daycount
DayCounters.daysperyear
DayCounters.isbusinessday
DayCounters.isholiday
DayCounters.yearfraction
DayCounters.AFBActualActual
— TypeAFBActualActual
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.
DayCounters.Actual360
— TypeActual360([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.
DayCounters.Actual365
— TypeActual365
Is an alias for ISDAActualActual
.
DayCounters.Actual365Fixed
— TypeActual365Fixed
Day count convention, also known as "Actual/365 (Fixed)", "Act/365 (Fixed)", or "A/365F".
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.
DayCounters.ActualActual
— TypeActualActual
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.
DayCounters.Annual
— TypeAnnual
Once a year.
DayCounters.ArgentinaCalendar
— TypeArgentinaCalendar
Buenos Aires, Argentina, stock exchange calendar.
DayCounters.Bimonthly
— TypeBimonthly
Every two months.
DayCounters.Biweekly
— TypeBiweekly
Every two weeks.
DayCounters.BondActualActual
— TypeBondActualActual
Is an alias for ISMAActualActual
.
DayCounters.BondBasisThirty360
— TypeBondBasisThirty360
Is an alias for USAThirty360
.
DayCounters.BrazilCalendar
— TypeBrazilCalendar
Brazilian calendar.
DayCounters.BrazilExchange
— TypeBrazilExchange
Holidays for the Bovespa stock exchange.
DayCounters.BrazilSettlement
— TypeBrazilSettlement
Calendar including public holidays.
DayCounters.BusinessDay
— MethodBusinessDay(v)
Construct a BusinessDay
object with the given v
value. Input must be losslessly convertible to an Int64
.
DayCounters.BusinessDayConvention
— TypeBusinessDayConvention
Supertype for elements that provide algorithms used to adjust a date in case it is not a valid business day.
DayCounters.BusinessMonth
— MethodBusinessMonth(v)
Construct a BusinessMonth
object with the given v
value. Input must be losslessly convertible to an Int64
.
DayCounters.BusinessWeek
— MethodBusinessWeek(v)
Construct a BusinessWeek
object with the given v
value. Input must be losslessly convertible to an Int64
.
DayCounters.BusinessYear
— MethodBusinessYear(v)
Construct a BusinessYear
object with the given v
value. Input must be losslessly convertible to an Int64
.
DayCounters.Daily
— TypeDaily
Once a day.
DayCounters.DayCountConvention
— TypeDayCountConvention
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.
DayCounters.EuroActualActual
— TypeEuroActualActual
Is an alias for AFBActualActual
.
DayCounters.EurobondBasisThirty360
— TypeEurobondBasisThirty360
Is an alias for EuropeanThirty360
.
DayCounters.EuropeanThirty360
— TypeEuropeanThirty360
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.
DayCounters.EveryFourthMonth
— TypeEveryFourthMonth
Every four months.
DayCounters.EveryFourthWeek
— TypeEveryFourthWeek
Every four weeks.
DayCounters.FederalReserve
— TypeFederalReserve
to be done.
DayCounters.Following
— TypeFollowing
A BusinessDayConvention
subtype that chooses the first business day after the given holiday.
DayCounters.GermanThirty360
— TypeGermanThirty360([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.
DayCounters.GovernmentBond
— TypeGovernmentBond
Government bond market calendar (data from http://www.bondmarkets.com).
DayCounters.HalfMonthModifiedFollowing
— TypeHalfMonthModifiedFollowing
A BusinessDayConvention
subtype that chooses 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.
DayCounters.HistoricalActualActual
— TypeHistoricalActualActual
Is an alias for ISDAActualActual
.
DayCounters.ISDAActualActual
— TypeISDAActualActual
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).
DayCounters.ISMAActualActual
— TypeISMAActualActual
Also known as "Actual/Actual (Bond)" is a ActualActual
subtype day count convention where the denominator is the actual number of days in the period...
DayCounters.ItalianThirty360
— TypeItalianThirty360
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.
DayCounters.LiborImpact
— TypeLiborImpact
to be done.
DayCounters.ModifiedFollowing
— TypeModifiedFollowing
A BusinessDayConvention
subtype that chooses 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.
DayCounters.ModifiedPreceding
— TypeModifiedPreceding
A BusinessDayConvention
subtype that chooses 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.
DayCounters.Monthly
— TypeMonthly
Once a month.
DayCounters.NERC
— TypeNERC
North American Energy Reliability Council calendar (data from http://www.nerc.com/~oc/offpeaks.html):
DayCounters.NYSE
— TypeNYSE
Stock exchange calendar (data from http://www.nyse.com).
DayCounters.Nearest
— TypeNearest
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.
DayCounters.NoFrequency
— TypeNoFrequency
Null frequency.
DayCounters.Once
— TypeOnce
Only once, e.g., a zero-coupon.
DayCounters.OtherFrequency
— TypeOtherFrequency
Some other unknown frequency.
DayCounters.Preceding
— TypePreceding
A BusinessDayConvention
subtype that chooses the first business day before the given holiday.
DayCounters.Quarterly
— TypeQuarterly
Every three months.
DayCounters.Semiannual
— TypeSemiannual
Twice a year.
DayCounters.Settlement
— TypeSettlement
Calendar including public holidays (see: http://www.opm.gov/fedhol/).
DayCounters.TARGETCalendar
— TypeTARGETCalendar
TARGET calendar (European Central Bank).
DayCounters.Thirty360
— TypeThirty360
Day count convention that can be calculated according to to US, European, Italian or German conventions.
DayCounters.USAThirty360
— TypeUSAThirty360
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.
DayCounters.Unadjusted
— TypeUnadjusted
A BusinessDayConvention
subtype that provides no date adjustment.
DayCounters.UnitedStatesCalendar
— TypeUnitedStatesCalendar
Supertype for United States calendars.
DayCounters.Weekly
— TypeWeekly
Once a week.
DayCounters.adjustdate
— Functionadjustdate(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.
DayCounters.advance
— Functionadvance(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
DayCounters.daycount
— Functiondaycount(dt1::Date, dt2::Date, convention::DayCountConvention) -> Int64
Returns the number of days between two dates considering the corresponding DayCountConvention
.
DayCounters.daysperyear
— Functiondaysperyear(::DayCountConvention) -> Int64
Returns the number of days in a year considering the corresponding DayCountConvention
.
DayCounters.isbusinessday
— Functionisbusinessday(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.
DayCounters.isholiday
— Methodisholiday(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.
DayCounters.yearfraction
— Functionyearfraction(dt1::Date, dt2::Date, convention::DayCountConvention) -> Real
Returns the period between two dates as a fraction of year considering the corresponding DayCountConvention
.