|
Lean
$LEAN_TAG$
|
Helper class used to provide better syntax when defining date rules More...
Public Member Functions | |
| DateRules (SecurityManager securities, DateTimeZone timeZone, MarketHoursDatabase marketHoursDatabase) | |
| Initializes a new instance of the DateRules helper class More... | |
| void | SetDefaultTimeZone (DateTimeZone timeZone) |
| Sets the default time zone More... | |
| IDateRule | On (int year, int month, int day) |
| Specifies an event should fire only on the specified day More... | |
| IDateRule | On (params DateTime[] dates) |
| Specifies an event should fire only on the specified days More... | |
| IDateRule | Every (DayOfWeek day) |
| Specifies an event should fire on each of the specified days of week More... | |
| IDateRule | Every (params DayOfWeek[] days) |
| Specifies an event should fire on each of the specified days of week More... | |
| IDateRule | EveryDay () |
| Specifies an event should fire every day More... | |
| IDateRule | EveryDay (Symbol symbol, bool extendedMarketHours=false) |
| Specifies an event should fire every day the symbol is trading More... | |
| IDateRule | YearStart (int daysOffset=0) |
| Specifies an event should fire on the first of each year + offset More... | |
| IDateRule | YearStart (Symbol symbol, int daysOffset=0, bool extendedMarketHours=true) |
| Specifies an event should fire on the first tradable date + offset for the specified symbol of each year More... | |
| IDateRule | YearEnd (int daysOffset=0) |
| Specifies an event should fire on the last of each year More... | |
| IDateRule | YearEnd (Symbol symbol, int daysOffset=0, bool extendedMarketHours=true) |
| Specifies an event should fire on the last tradable date - offset for the specified symbol of each year More... | |
| IDateRule | MonthStart (int daysOffset=0) |
| Specifies an event should fire on the first of each month + offset More... | |
| IDateRule | MonthStart (Symbol symbol, int daysOffset=0, bool extendedMarketHours=true) |
| Specifies an event should fire on the first tradable date + offset for the specified symbol of each month More... | |
| IDateRule | MonthEnd (int daysOffset=0) |
| Specifies an event should fire on the last of each month More... | |
| IDateRule | MonthEnd (Symbol symbol, int daysOffset=0, bool extendedMarketHours=true) |
| Specifies an event should fire on the last tradable date - offset for the specified symbol of each month More... | |
| IDateRule | WeekStart (int daysOffset=0) |
| Specifies an event should fire on Monday + offset each week More... | |
| IDateRule | WeekStart (Symbol symbol, int daysOffset=0, bool extendedMarketHours=true) |
| Specifies an event should fire on the first tradable date + offset for the specified symbol each week More... | |
| IDateRule | WeekEnd (int daysOffset=0) |
| Specifies an event should fire on Friday - offset More... | |
| IDateRule | WeekEnd (Symbol symbol, int daysOffset=0, bool extendedMarketHours=true) |
| Specifies an event should fire on the last - offset tradable date for the specified symbol of each week More... | |
Public Member Functions inherited from QuantConnect.Scheduling.BaseScheduleRules | |
| BaseScheduleRules (SecurityManager securities, DateTimeZone timeZone, MarketHoursDatabase marketHoursDatabase) | |
| Initializes a new instance of the TimeRules helper class More... | |
Public Attributes | |
| IDateRule | Today |
| Specifies an event should only fire today in the algorithm's time zone using _securities.UtcTime instead of 'start' since ScheduleManager backs it up a day More... | |
| IDateRule | Tomorrow |
| Specifies an event should only fire tomorrow in the algorithm's time zone using _securities.UtcTime instead of 'start' since ScheduleManager backs it up a day More... | |
Additional Inherited Members | |
Protected Member Functions inherited from QuantConnect.Scheduling.BaseScheduleRules | |
| SecurityExchangeHours | GetSecurityExchangeHours (Symbol symbol) |
| Helper method to fetch the security exchange hours More... | |
Properties inherited from QuantConnect.Scheduling.BaseScheduleRules | |
| DateTimeZone | TimeZone [get, set] |
| The algorithm's default time zone More... | |
| SecurityManager | Securities [get, set] |
| The security manager More... | |
| MarketHoursDatabase | MarketHoursDatabase [get, set] |
| The market hours database instance to use More... | |
Helper class used to provide better syntax when defining date rules
Definition at line 29 of file DateRules.cs.
| QuantConnect.Scheduling.DateRules.DateRules | ( | SecurityManager | securities, |
| DateTimeZone | timeZone, | ||
| MarketHoursDatabase | marketHoursDatabase | ||
| ) |
Initializes a new instance of the DateRules helper class
| securities | The security manager |
| timeZone | The algorithm's default time zone |
| marketHoursDatabase | The market hours database instance to use |
Definition at line 37 of file DateRules.cs.
| void QuantConnect.Scheduling.DateRules.SetDefaultTimeZone | ( | DateTimeZone | timeZone | ) |
Sets the default time zone
| timeZone | The time zone to use for helper methods that can't resolve a time zone |
Definition at line 46 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.On | ( | int | year, |
| int | month, | ||
| int | day | ||
| ) |
Specifies an event should fire only on the specified day
| year | The year |
| month | The month |
| day | The day |
Definition at line 58 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.On | ( | params DateTime[] | dates | ) |
Specifies an event should fire only on the specified days
| dates | The dates the event should fire |
Definition at line 69 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.Every | ( | DayOfWeek | day | ) |
Specifies an event should fire on each of the specified days of week
| day | The day the event should fire |
| IDateRule QuantConnect.Scheduling.DateRules.Every | ( | params DayOfWeek[] | days | ) |
Specifies an event should fire on each of the specified days of week
| days | The days the event should fire |
Definition at line 106 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.EveryDay | ( | ) |
Specifies an event should fire every day
Definition at line 116 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.EveryDay | ( | Symbol | symbol, |
| bool | extendedMarketHours = false |
||
| ) |
Specifies an event should fire every day the symbol is trading
| symbol | The symbol whose exchange is used to determine tradable dates |
| extendedMarketHours | True to include days with extended market hours only, like sunday for futures |
Definition at line 127 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.YearStart | ( | int | daysOffset = 0 | ) |
Specifies an event should fire on the first of each year + offset
| daysOffset | The amount of days to offset the schedule by; must be between 0 and 365. |
Definition at line 138 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.YearStart | ( | Symbol | symbol, |
| int | daysOffset = 0, |
||
| bool | extendedMarketHours = true |
||
| ) |
Specifies an event should fire on the first tradable date + offset for the specified symbol of each year
| symbol | The symbol whose exchange is used to determine the first tradable date of the year |
| daysOffset | The amount of tradable days to offset the schedule by; must be between 0 and 365 |
| extendedMarketHours | True to include days with extended market hours only, like sunday for futures |
Definition at line 151 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.YearEnd | ( | int | daysOffset = 0 | ) |
Specifies an event should fire on the last of each year
| daysOffset | The amount of days to offset the schedule by; must be between 0 and 365 |
Definition at line 174 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.YearEnd | ( | Symbol | symbol, |
| int | daysOffset = 0, |
||
| bool | extendedMarketHours = true |
||
| ) |
Specifies an event should fire on the last tradable date - offset for the specified symbol of each year
| symbol | The symbol whose exchange is used to determine the last tradable date of the year |
| daysOffset | The amount of tradable days to offset the schedule by; must be between 0 and 365. |
| extendedMarketHours | True to include days with extended market hours only, like sunday for futures |
Definition at line 186 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.MonthStart | ( | int | daysOffset = 0 | ) |
Specifies an event should fire on the first of each month + offset
| daysOffset | The amount of days to offset the schedule by; must be between 0 and 30. |
Definition at line 209 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.MonthStart | ( | Symbol | symbol, |
| int | daysOffset = 0, |
||
| bool | extendedMarketHours = true |
||
| ) |
Specifies an event should fire on the first tradable date + offset for the specified symbol of each month
| symbol | The symbol whose exchange is used to determine the first tradable date of the month |
| daysOffset | The amount of tradable days to offset the schedule by; must be between 0 and 30 |
| extendedMarketHours | True to include days with extended market hours only, like sunday for futures |
Definition at line 222 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.MonthEnd | ( | int | daysOffset = 0 | ) |
Specifies an event should fire on the last of each month
| daysOffset | The amount of days to offset the schedule by; must be between 0 and 30 |
Definition at line 239 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.MonthEnd | ( | Symbol | symbol, |
| int | daysOffset = 0, |
||
| bool | extendedMarketHours = true |
||
| ) |
Specifies an event should fire on the last tradable date - offset for the specified symbol of each month
| symbol | The symbol whose exchange is used to determine the last tradable date of the month |
| daysOffset | The amount of tradable days to offset the schedule by; must be between 0 and 30. |
| extendedMarketHours | True to include days with extended market hours only, like sunday for futures |
Definition at line 251 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.WeekStart | ( | int | daysOffset = 0 | ) |
Specifies an event should fire on Monday + offset each week
| daysOffset | The amount of days to offset monday by; must be between 0 and 6 |
Definition at line 268 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.WeekStart | ( | Symbol | symbol, |
| int | daysOffset = 0, |
||
| bool | extendedMarketHours = true |
||
| ) |
Specifies an event should fire on the first tradable date + offset for the specified symbol each week
| symbol | The symbol whose exchange is used to determine the first tradeable date of the week |
| daysOffset | The amount of tradable days to offset the first tradable day by |
| extendedMarketHours | True to include extended market hours, false otherwise |
Definition at line 289 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.WeekEnd | ( | int | daysOffset = 0 | ) |
Specifies an event should fire on Friday - offset
| daysOffset | The amount of days to offset Friday by; must be between 0 and 6 |
Definition at line 312 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.WeekEnd | ( | Symbol | symbol, |
| int | daysOffset = 0, |
||
| bool | extendedMarketHours = true |
||
| ) |
Specifies an event should fire on the last - offset tradable date for the specified symbol of each week
| symbol | The symbol whose exchange is used to determine the last tradable date of the week |
| daysOffset | The amount of tradable days to offset the last tradable day by each week |
| extendedMarketHours | True to include extended market hours, false otherwise |
Definition at line 332 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.Today |
Specifies an event should only fire today in the algorithm's time zone using _securities.UtcTime instead of 'start' since ScheduleManager backs it up a day
Definition at line 80 of file DateRules.cs.
| IDateRule QuantConnect.Scheduling.DateRules.Tomorrow |
Specifies an event should only fire tomorrow in the algorithm's time zone using _securities.UtcTime instead of 'start' since ScheduleManager backs it up a day
Definition at line 90 of file DateRules.cs.