Class OptimizerGrid
Exhaustive grid optimizer. This optimizer iterate through all possible parameter combinations in a brute-force fashion. Individual iterations are executed in parallel, as far as possible.
Inherited Members
Namespace: TuringTrader.Optimizer
Assembly: TuringTrader.Simulator.dll
Syntax
public class OptimizerGrid
Constructors
| Edit this page View SourceOptimizerGrid(IAlgorithm, bool)
Crearte and initialize new grid optimizer instance.
Declaration
public OptimizerGrid(IAlgorithm masterInstance, bool verbose = true)
Parameters
| Type | Name | Description |
|---|---|---|
| IAlgorithm | masterInstance | algorithm to optimize |
| bool | verbose | show progress information |
Fields
| Edit this page View SourceMasterInstance
Master instance of algorithm to optimize.
Declaration
public IAlgorithm MasterInstance
Field Value
| Type | Description |
|---|---|
| IAlgorithm |
Results
Return list of optimization results.
Declaration
public List<OptimizerResult> Results
Field Value
| Type | Description |
|---|---|
| List<OptimizerResult> |
Properties
| Edit this page View SourceProgress
Progress of optimization as a double between 0 and 100.
Declaration
public double Progress { get; }
Property Value
| Type | Description |
|---|---|
| double |
Methods
| Edit this page View SourceNumIterations(IAlgorithm)
Number of optimizer iterations
Declaration
public static int NumIterations(IAlgorithm algo)
Parameters
| Type | Name | Description |
|---|---|---|
| IAlgorithm | algo | algorithm to optimize |
Returns
| Type | Description |
|---|---|
| int | of iterations |
ResultsToExcel(string)
Export optimizer results to Excel.
Declaration
public void ResultsToExcel(string excelPath)
Parameters
| Type | Name | Description |
|---|---|---|
| string | excelPath |
Run(DateTime?, DateTime?)
Run optimization.
Declaration
public void Run(DateTime? startTime = null, DateTime? endTime = null)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime? | startTime | optimization start time |
| DateTime? | endTime | optimization end time |
SetParametersFromResult(OptimizerResult)
Set master instance to parameters from optimzation result.
Declaration
public void SetParametersFromResult(OptimizerResult result)
Parameters
| Type | Name | Description |
|---|---|---|
| OptimizerResult | result | optimization result |