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.
Inheritance
object
OptimizerGrid
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TuringTrader.Optimizer
Assembly: TuringTrader.Simulator.dll
Syntax
public class OptimizerGrid
Constructors
| Improve this Doc 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
| Improve this Doc 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 |
---|---|
System.Collections.Generic.List<T><OptimizerResult> |
Properties
| Improve this Doc View SourceProgress
Progress of optimization as a double between 0 and 100.
Declaration
public double Progress { get; }
Property Value
Type | Description |
---|---|
double |
Methods
| Improve this Doc 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 |
---|---|---|
System.DateTime? | startTime | optimization start time |
System.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 |