Struct quantmath::dates::calendar::EveryDayCalendar[][src]

pub struct EveryDayCalendar();

An every-day calendar assumes that all days are business days, including weekends.

Methods

impl EveryDayCalendar
[src]

Trait Implementations

impl Debug for EveryDayCalendar
[src]

Formats the value using the given formatter. Read more

impl TypeId for EveryDayCalendar
[src]

impl Calendar for EveryDayCalendar
[src]

The name of this calendar. Conventionally, the name is a three-letter upper-case string such as "TGT" or "NYS", though this is not required. Read more

Is the given date a holiday or weekend? The opposite of a business day.

Count business days between the two given dates. The dates at the ends of the range may optionally be partly included in the count, by setting a fraction between zero and one. Read more

Step forward/backward by the given number of business days. The result is always a business day. If today is a business day, a zero step means staying where we are. If today is not a business day, we slip off to the nearest business day in the direction specified by the slip_forward flag. If the step is non-zero, the overall move is equivalent to a zero step followed by the given number of one-step moves. Read more

Returns the basis normally used for business day volatility. Roughly speaking this is the expected number of business days in a year, but conventionalised. It is 365 for EveryDayCalendar and 252 for a pure business day calendar. Read more

If the given date is a holiday, what weight should it receive? Returns 1.0 for a business day, 0.0 for a pure holiday with no weight, and potentially a number somewhere between for anything else. Read more

Specialised function where day-counts may be fractional, for example in volatility surfaces. For most calendars, the step is truncated towards zero and an integer number of steps is taken. Read more

Calculate the year-fraction between two date-times, given the count of business days and the standard basis. Read more

Auto Trait Implementations