Lean  $LEAN_TAG$
QuantConnect.Scheduling.FuncTimeRule Class Reference

Uses a function to define a time rule as a projection of date times to date times More...

Inheritance diagram for QuantConnect.Scheduling.FuncTimeRule:
[legend]

Public Member Functions

 FuncTimeRule (string name, Func< IEnumerable< DateTime >, IEnumerable< DateTime >> createUtcEventTimesFunction)
 Initializes a new instance of the FuncTimeRule class More...
 
 FuncTimeRule (string name, PyObject createUtcEventTimesFunction)
 Initializes a new instance of the FuncTimeRule class using a Python function More...
 
IEnumerable< DateTime > CreateUtcEventTimes (IEnumerable< DateTime > dates)
 Creates the event times for the specified dates in UTC More...
 

Properties

string Name [get]
 Gets a name for this rule More...
 
- Properties inherited from QuantConnect.Scheduling.ITimeRule
string Name [get]
 Gets a name for this rule More...
 

Detailed Description

Uses a function to define a time rule as a projection of date times to date times

Definition at line 26 of file FuncTimeRule.cs.

Constructor & Destructor Documentation

◆ FuncTimeRule() [1/2]

QuantConnect.Scheduling.FuncTimeRule.FuncTimeRule ( string  name,
Func< IEnumerable< DateTime >, IEnumerable< DateTime >>  createUtcEventTimesFunction 
)

Initializes a new instance of the FuncTimeRule class

Parameters
nameThe name of the time rule
createUtcEventTimesFunctionFunction used to transform dates into event date times

Definition at line 35 of file FuncTimeRule.cs.

◆ FuncTimeRule() [2/2]

QuantConnect.Scheduling.FuncTimeRule.FuncTimeRule ( string  name,
PyObject  createUtcEventTimesFunction 
)

Initializes a new instance of the FuncTimeRule class using a Python function

Parameters
nameThe name of the time rule
createUtcEventTimesFunctionFunction used to transform dates into event date times in Python

Definition at line 46 of file FuncTimeRule.cs.

Member Function Documentation

◆ CreateUtcEventTimes()

IEnumerable<DateTime> QuantConnect.Scheduling.FuncTimeRule.CreateUtcEventTimes ( IEnumerable< DateTime >  dates)

Creates the event times for the specified dates in UTC

Parameters
datesThe dates to apply times to
Returns
An enumerable of date times that is the result of applying this rule to the specified dates

Implements QuantConnect.Scheduling.ITimeRule.

Definition at line 69 of file FuncTimeRule.cs.

Property Documentation

◆ Name

string QuantConnect.Scheduling.FuncTimeRule.Name
get

Gets a name for this rule

Definition at line 59 of file FuncTimeRule.cs.


The documentation for this class was generated from the following file: