Lean  $LEAN_TAG$
QuantConnect.TradingCalendar Class Reference

Class represents trading calendar, populated with variety of events relevant to currently trading instruments More...

Public Member Functions

 TradingCalendar (SecurityManager securityManager, MarketHoursDatabase marketHoursDatabase)
 Initialize a new TradingCalendar instance. More...
 
TradingDay GetTradingDay ()
 Method returns TradingDay that contains trading events associated with today's date More...
 
TradingDay GetTradingDay (DateTime day)
 Method returns TradingDay that contains trading events associated with the given date More...
 
IEnumerable< TradingDayGetTradingDays (DateTime start, DateTime end)
 Method returns TradingDay that contains trading events associated with the range of dates More...
 
IEnumerable< TradingDayGetDaysByType (TradingDayType type, DateTime start, DateTime end)
 Method returns TradingDay of the specified type (TradingDayType) that contains trading events associated with the range of dates More...
 

Detailed Description

Class represents trading calendar, populated with variety of events relevant to currently trading instruments

Definition at line 27 of file TradingCalendar.cs.

Constructor & Destructor Documentation

◆ TradingCalendar()

QuantConnect.TradingCalendar.TradingCalendar ( SecurityManager  securityManager,
MarketHoursDatabase  marketHoursDatabase 
)

Initialize a new TradingCalendar instance.

Parameters
securityManagerSecurityManager for this calendar
marketHoursDatabaseMarketHoursDatabase for this calendar

Definition at line 37 of file TradingCalendar.cs.

Member Function Documentation

◆ GetTradingDay() [1/2]

TradingDay QuantConnect.TradingCalendar.GetTradingDay ( )

Method returns TradingDay that contains trading events associated with today's date

Returns
Populated instance of TradingDay

Definition at line 46 of file TradingCalendar.cs.

◆ GetTradingDay() [2/2]

TradingDay QuantConnect.TradingCalendar.GetTradingDay ( DateTime  day)

Method returns TradingDay that contains trading events associated with the given date

Returns
Populated instance of TradingDay

Definition at line 57 of file TradingCalendar.cs.

Here is the call graph for this function:

◆ GetTradingDays()

IEnumerable<TradingDay> QuantConnect.TradingCalendar.GetTradingDays ( DateTime  start,
DateTime  end 
)

Method returns TradingDay that contains trading events associated with the range of dates

Parameters
startStart date of the range (inclusive)
endEnd date of the range (inclusive)
Returns
>Populated list of TradingDay

Definition at line 68 of file TradingCalendar.cs.

Here is the caller graph for this function:

◆ GetDaysByType()

IEnumerable<TradingDay> QuantConnect.TradingCalendar.GetDaysByType ( TradingDayType  type,
DateTime  start,
DateTime  end 
)

Method returns TradingDay of the specified type (TradingDayType) that contains trading events associated with the range of dates

Parameters
typeType of the events
startStart date of the range (inclusive)
endEnd date of the range (inclusive)
Returns
>Populated list of TradingDay

Definition at line 80 of file TradingCalendar.cs.

Here is the call graph for this function:

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