Lean  $LEAN_TAG$
QuantConnect.Lean.Engine.Setup.ISetupHandler Interface Reference

Interface to setup the algorithm. Pass in a raw algorithm, return one with portfolio, cash, etc already preset. More...

Inheritance diagram for QuantConnect.Lean.Engine.Setup.ISetupHandler:
[legend]

Public Member Functions

IAlgorithm CreateAlgorithmInstance (AlgorithmNodePacket algorithmNodePacket, string assemblyPath)
 Create a new instance of an algorithm from a physical dll path. More...
 
IBrokerage CreateBrokerage (AlgorithmNodePacket algorithmNodePacket, IAlgorithm uninitializedAlgorithm, out IBrokerageFactory factory)
 Creates the brokerage as specified by the job packet More...
 
bool Setup (SetupHandlerParameters parameters)
 Primary entry point to setup a new algorithm More...
 

Properties

WorkerThread WorkerThread [set]
 The worker thread instance the setup handler should use More...
 
List< Exception > Errors [get, set]
 Any errors from the initialization stored here: More...
 
TimeSpan MaximumRuntime [get]
 Get the maximum runtime for this algorithm job. More...
 
decimal StartingPortfolioValue [get]
 Algorithm starting capital for statistics calculations More...
 
DateTime StartingDate [get]
 Start date for analysis loops to search for data. More...
 
int MaxOrders [get]
 Maximum number of orders for the algorithm run – applicable for backtests only. More...
 

Detailed Description

Interface to setup the algorithm. Pass in a raw algorithm, return one with portfolio, cash, etc already preset.

Definition at line 30 of file ISetupHandler.cs.

Member Function Documentation

◆ CreateAlgorithmInstance()

IAlgorithm QuantConnect.Lean.Engine.Setup.ISetupHandler.CreateAlgorithmInstance ( AlgorithmNodePacket  algorithmNodePacket,
string  assemblyPath 
)

Create a new instance of an algorithm from a physical dll path.

Parameters
assemblyPathThe path to the assembly's location
algorithmNodePacketDetails of the task required
Returns
A new instance of IAlgorithm, or throws an exception if there was an error

Implemented in QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler, and QuantConnect.Lean.Engine.Setup.BacktestingSetupHandler.

Here is the caller graph for this function:

◆ CreateBrokerage()

IBrokerage QuantConnect.Lean.Engine.Setup.ISetupHandler.CreateBrokerage ( AlgorithmNodePacket  algorithmNodePacket,
IAlgorithm  uninitializedAlgorithm,
out IBrokerageFactory  factory 
)

Creates the brokerage as specified by the job packet

Parameters
algorithmNodePacketJob packet
uninitializedAlgorithmThe algorithm instance before Initialize has been called
factoryThe brokerage factory
Returns
The brokerage instance, or throws if error creating instance

Implemented in QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler, and QuantConnect.Lean.Engine.Setup.BacktestingSetupHandler.

Here is the caller graph for this function:

◆ Setup()

bool QuantConnect.Lean.Engine.Setup.ISetupHandler.Setup ( SetupHandlerParameters  parameters)

Primary entry point to setup a new algorithm

Parameters
parametersThe parameters object to use
Returns
True on successfully setting up the algorithm state, or false on error.

Implemented in QuantConnect.Lean.Engine.Setup.BrokerageSetupHandler, and QuantConnect.Lean.Engine.Setup.BacktestingSetupHandler.

Here is the caller graph for this function:

Property Documentation

◆ WorkerThread

WorkerThread QuantConnect.Lean.Engine.Setup.ISetupHandler.WorkerThread
set

The worker thread instance the setup handler should use

Definition at line 36 of file ISetupHandler.cs.

◆ Errors

List<Exception> QuantConnect.Lean.Engine.Setup.ISetupHandler.Errors
getset

Any errors from the initialization stored here:

Definition at line 44 of file ISetupHandler.cs.

◆ MaximumRuntime

TimeSpan QuantConnect.Lean.Engine.Setup.ISetupHandler.MaximumRuntime
get

Get the maximum runtime for this algorithm job.

Definition at line 53 of file ISetupHandler.cs.

◆ StartingPortfolioValue

decimal QuantConnect.Lean.Engine.Setup.ISetupHandler.StartingPortfolioValue
get

Algorithm starting capital for statistics calculations

Definition at line 61 of file ISetupHandler.cs.

◆ StartingDate

DateTime QuantConnect.Lean.Engine.Setup.ISetupHandler.StartingDate
get

Start date for analysis loops to search for data.

Definition at line 69 of file ISetupHandler.cs.

◆ MaxOrders

int QuantConnect.Lean.Engine.Setup.ISetupHandler.MaxOrders
get

Maximum number of orders for the algorithm run – applicable for backtests only.

Definition at line 77 of file ISetupHandler.cs.


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