Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.Setup.BaseSetupHandler Class Reference

Base class that provides shared code for the ISetupHandler implementations More...

Static Public Member Functions

static void SetupCurrencyConversions (IAlgorithm algorithm, UniverseSelection universeSelection)
 Will first check and add all the required conversion rate securities and later will seed an initial value to them. More...
 
static bool InitializeDebugging (AlgorithmNodePacket algorithmNodePacket, WorkerThread workerThread)
 Initialize the debugger More...
 
static void LoadBacktestJobCashAmount (IAlgorithm algorithm, BacktestNodePacket job)
 Sets the initial cash for the algorithm if set in the job packet. More...
 
static void LoadBacktestJobAccountCurrency (IAlgorithm algorithm, BacktestNodePacket job)
 Sets the account currency the algorithm should use if set in the job packet More...
 
static Dictionary< SecurityType, List< TickType > > GetConfiguredDataFeeds ()
 Get the available data feeds from config.json, More...
 
static void SetBrokerageTradingDayPerYear (IAlgorithm algorithm)
 Set the number of trading days per year based on the specified brokerage model. More...
 

Properties

static TimeSpan AlgorithmCreationTimeout = TimeSpan.FromSeconds(Config.GetDouble("algorithm-creation-timeout", 90)) [get]
 Get the maximum time that the creation of an algorithm can take More...
 

Detailed Description

Base class that provides shared code for the ISetupHandler implementations

Definition at line 40 of file BaseSetupHandler.cs.

Member Function Documentation

◆ SetupCurrencyConversions()

static void QuantConnect.Lean.Engine.Setup.BaseSetupHandler.SetupCurrencyConversions ( IAlgorithm  algorithm,
UniverseSelection  universeSelection 
)
static

Will first check and add all the required conversion rate securities and later will seed an initial value to them.

Parameters
algorithmThe algorithm instance
universeSelectionThe universe selection instance

Definition at line 53 of file BaseSetupHandler.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ InitializeDebugging()

static bool QuantConnect.Lean.Engine.Setup.BaseSetupHandler.InitializeDebugging ( AlgorithmNodePacket  algorithmNodePacket,
WorkerThread  workerThread 
)
static

Initialize the debugger

Parameters
algorithmNodePacketThe algorithm node packet
workerThreadThe worker thread instance to use

Definition at line 170 of file BaseSetupHandler.cs.

Here is the caller graph for this function:

◆ LoadBacktestJobCashAmount()

static void QuantConnect.Lean.Engine.Setup.BaseSetupHandler.LoadBacktestJobCashAmount ( IAlgorithm  algorithm,
BacktestNodePacket  job 
)
static

Sets the initial cash for the algorithm if set in the job packet.

Should be called after initialize LoadBacktestJobAccountCurrency

Definition at line 192 of file BaseSetupHandler.cs.

Here is the call graph for this function:

◆ LoadBacktestJobAccountCurrency()

static void QuantConnect.Lean.Engine.Setup.BaseSetupHandler.LoadBacktestJobAccountCurrency ( IAlgorithm  algorithm,
BacktestNodePacket  job 
)
static

Sets the account currency the algorithm should use if set in the job packet

Should be called before initialize LoadBacktestJobCashAmount

Definition at line 211 of file BaseSetupHandler.cs.

Here is the call graph for this function:

◆ GetConfiguredDataFeeds()

static Dictionary<SecurityType, List<TickType> > QuantConnect.Lean.Engine.Setup.BaseSetupHandler.GetConfiguredDataFeeds ( )
static

Get the available data feeds from config.json,

Definition at line 223 of file BaseSetupHandler.cs.

Here is the call graph for this function:

◆ SetBrokerageTradingDayPerYear()

static void QuantConnect.Lean.Engine.Setup.BaseSetupHandler.SetBrokerageTradingDayPerYear ( IAlgorithm  algorithm)
static

Set the number of trading days per year based on the specified brokerage model.

Parameters
algorithmThe algorithm instance
Returns
The number of trading days per year. For specific brokerages (Coinbase, Binance, Bitfinex, Bybit, FTX, Kraken), the value is 365. For other brokerages, the default value is 252.

Definition at line 244 of file BaseSetupHandler.cs.

Here is the caller graph for this function:

Property Documentation

◆ AlgorithmCreationTimeout

TimeSpan QuantConnect.Lean.Engine.Setup.BaseSetupHandler.AlgorithmCreationTimeout = TimeSpan.FromSeconds(Config.GetDouble("algorithm-creation-timeout", 90))
staticget

Get the maximum time that the creation of an algorithm can take

Definition at line 45 of file BaseSetupHandler.cs.


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