Lean  $LEAN_TAG$
QuantConnect.Optimizer.Launcher.ConsoleLeanOptimizer Class Reference

Optimizer implementation that launches Lean as a local process More...

Inheritance diagram for QuantConnect.Optimizer.Launcher.ConsoleLeanOptimizer:
[legend]

Public Member Functions

 ConsoleLeanOptimizer (OptimizationNodePacket nodePacket)
 Creates a new instance More...
 
- Public Member Functions inherited from QuantConnect.Optimizer.LeanOptimizer
virtual void Start ()
 Starts the optimization More...
 
virtual void Dispose ()
 Disposes of any resources More...
 
int GetCurrentEstimate ()
 Returns the current optimization status and strategy estimates More...
 
Dictionary< string, string > GetRuntimeStatistics ()
 Get the current runtime statistics More...
 

Protected Member Functions

override string RunLean (ParameterSet parameterSet, string backtestName)
 Handles starting Lean for a given parameter set More...
 
override void AbortLean (string backtestId)
 Stops lean process More...
 
override void SendUpdate ()
 Sends an update of the current optimization status to the user More...
 
- Protected Member Functions inherited from QuantConnect.Optimizer.LeanOptimizer
 LeanOptimizer (OptimizationNodePacket nodePacket)
 Creates a new instance More...
 
virtual void TriggerOnEndEvent ()
 Triggers the optimization job end event More...
 
virtual string GetBacktestName (ParameterSet parameterSet)
 Get's a new backtest name More...
 
virtual void NewResult (string jsonBacktestResult, string backtestId)
 Handles a new backtest json result matching a requested backtest id More...
 
string GetLogDetails ()
 Helper method to have pretty more informative logs More...
 
virtual void SetOptimizationStatus (OptimizationStatus optimizationStatus)
 Sets the current optimization status More...
 

Additional Inherited Members

- Protected Attributes inherited from QuantConnect.Optimizer.LeanOptimizer
int CompletedBacktests => _failedBacktest + _completedBacktest
 The total completed backtests count More...
 
bool Disposed => _disposed
 Indicates whether optimizer was disposed More...
 
- Properties inherited from QuantConnect.Optimizer.LeanOptimizer
OptimizationStatus Status = OptimizationStatus.New [get]
 The current optimization status More...
 
Target OptimizationTarget [get]
 The optimization target More...
 
ConcurrentDictionary< string, ParameterSetRunningParameterSetForBacktest [get]
 Collection holding ParameterSet for each backtest id we are waiting to finish More...
 
ConcurrentQueue< ParameterSetPendingParameterSet [get]
 Collection holding ParameterSet for each backtest id we are waiting to launch More...
 
IOptimizationStrategy Strategy [get]
 The optimization strategy being used More...
 
OptimizationNodePacket NodePacket [get]
 The optimization packet More...
 
- Events inherited from QuantConnect.Optimizer.LeanOptimizer
EventHandler< OptimizationResultEnded
 Event triggered when the optimization work ended More...
 

Detailed Description

Optimizer implementation that launches Lean as a local process

Definition at line 30 of file ConsoleLeanOptimizer.cs.

Constructor & Destructor Documentation

◆ ConsoleLeanOptimizer()

QuantConnect.Optimizer.Launcher.ConsoleLeanOptimizer.ConsoleLeanOptimizer ( OptimizationNodePacket  nodePacket)

Creates a new instance

Parameters
nodePacketThe optimization node packet to handle

Definition at line 41 of file ConsoleLeanOptimizer.cs.

Member Function Documentation

◆ RunLean()

override string QuantConnect.Optimizer.Launcher.ConsoleLeanOptimizer.RunLean ( ParameterSet  parameterSet,
string  backtestName 
)
protectedvirtual

Handles starting Lean for a given parameter set

Parameters
parameterSetThe parameter set for the backtest to run
backtestNameThe backtest name to use
Returns
The new unique backtest id

Implements QuantConnect.Optimizer.LeanOptimizer.

Definition at line 80 of file ConsoleLeanOptimizer.cs.

Here is the call graph for this function:

◆ AbortLean()

override void QuantConnect.Optimizer.Launcher.ConsoleLeanOptimizer.AbortLean ( string  backtestId)
protectedvirtual

Stops lean process

Parameters
backtestIdSpecified backtest id

Implements QuantConnect.Optimizer.LeanOptimizer.

Definition at line 128 of file ConsoleLeanOptimizer.cs.

◆ SendUpdate()

override void QuantConnect.Optimizer.Launcher.ConsoleLeanOptimizer.SendUpdate ( )
protectedvirtual

Sends an update of the current optimization status to the user

Implements QuantConnect.Optimizer.LeanOptimizer.

Definition at line 141 of file ConsoleLeanOptimizer.cs.

Here is the call graph for this function:

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