AnnualizedReturn
public double AnnualizedReturnContains the annualized return of the optimization run. This value is used when calculating Walk-Forward Optimization (WFO) Efficiency. The default value is Double.NaN.
API documentation, members, signatures, and C# examples.
Find classes, members, and documentation.
The OptimizationResult class contains the results of a single optimization run, including the Parameter values used, calculated performance metrics, run information, and any error that occurred during the run.
public double AnnualizedReturnContains the annualized return of the optimization run. This value is used when calculating Walk-Forward Optimization (WFO) Efficiency. The default value is Double.NaN.
public string ErrorMessageContains the message from an Exception that occurred during the optimization run, or null if no Exception occurred.
public Exception ExceptionContains the Exception instance that occurred during the optimization run, or null if no Exception occurred.
public double GetMetricValue(string metricName)Returns the value of the performance metric specified in metricName. If PerformanceMetrics does not contain the specified metric, returns Double.NaN.
public PreferredValueList GetPreferredValueList(IOptimizerHost optHost)Creates and returns a PreferredValueList based on this optimization result's ParameterValues and the optimizable Parameters exposed by the specified optHost. Each generated PreferredValue contains the Parameter name and corresponding value from this optimization run.
public string NameContains an optional name for the optimization result. This value is used when displaying results in the Filter Sets tool.
public double OpacityControls the display opacity of the optimization result in interfaces such as the Filter Sets tool. Filtered results can use a reduced opacity to appear dimmed. The default value is 1.0.
public List<double> ParameterValuesReturns the Parameter values used for this optimization run, in the same order as the Parameters being optimized.
public virtual void Parse(string s)Restores the OptimizationResult from its persisted string representation specified in s. The restored information includes RunNumber, Symbol, ParameterValues, PerformanceMetrics, AnnualizedReturn, ErrorMessage, and, for newer persisted versions, Name.
public Dictionary<string, double> PerformanceMetricsContains the performance metrics calculated for the optimization run, keyed by metric name. The metrics included are determined by the performance metrics selected for the optimization.
public virtual string Persist()Returns a persisted string representation of the OptimizationResult. The persisted information includes RunNumber, Symbol, ParameterValues, PerformanceMetrics, AnnualizedReturn, ErrorMessage, and Name.
public bool ReturnedFromCacheReturns true if this OptimizationResult was returned from an existing cached optimization result rather than produced by executing a new backtest. The default value is false.
public int RunNumberContains the chronological run number of this optimization result.
public string SymbolContains the symbol associated with this result when the optimization is being performed on a symbol-by-symbol basis.
public object TagContains optional information that an Optimizer can associate with this OptimizationResult. The meaning of this value is determined by the Optimizer using it.
public override string ToString()Returns a comma-delimited string containing the values in ParameterValues, with each value formatted to two decimal places.
Ask the community or explore custom development services.