Framework Reference
WEALTHLAB FRAMEWORK / CLASS REFERENCE

StrategyEvolverResult

API documentation, members, signatures, and C# examples.

Search the framework

Find classes, members, and documentation.

NamespaceWealthLab.Backtest
Parent
Object

Contains the results and metadata for a single Strategy Evolver run, including its evolved Gene code, generation information, Building Block Strategy definition, PositionSize, filtering state, and performance metrics. public string GeneCode

Gets or sets the code representing the evolved Genes that compose the Strategy for this result.

Constructors

1

StrategyEvolverResult

public StrategyEvolverResult()
public StrategyEvolverResult(
int generation,
GeneticStrategy gs,
List<string> metrics)

The parameterless constructor creates an empty StrategyEvolverResult. The second constructor creates a result from the supplied GeneticStrategy and generation number. It copies the evolved Strategy's Gene code, generation survival count, slot number, Apex status, StrategyData, PositionSize, single-position setting, performance metrics, filtering state, name, and pattern number. For each name in metrics that is not already present in PerformanceMetrics, the constructor adds an entry with a value of Double.NaN.

Methods

1

GenerateStrategy

public Strategy GenerateStrategy()

Creates and returns a new Building Block Strategy based on this Evolver result. The method creates a Strategy with StrategyType.BuildingBlock, assigns this result's StrategyData, and applies its PosSize as the Strategy's PositionSize. The returned Strategy can then be used like any other Building Block Strategy.

Properties

13

DisplayName

public string DisplayName

Returns a display name for the Evolver result. The value starts with Name. If GeneCode is not empty, the GeneCode is appended in parentheses. For example:

Generation

public int Generation

Gets or sets the generation number in which this Evolver result occurred.

IsApex

public bool IsApex

Gets or sets whether the evolved Strategy was flagged as an Apex Strategy. The default value is false.

IsSinglePosition

public bool IsSinglePosition

Gets or sets whether the evolved Building Block Strategy uses single-position mode.

Name

public string Name

Gets or sets the name assigned to the Evolver result.

Opacity

public double Opacity

Returns an opacity value suitable for displaying the result in the Evolver interface. Returns 0.4 when WasFiltered is true, and 1.0 otherwise.

PatternNumber

public int PatternNumber

Gets or sets the pattern number assigned to this Evolver result. The pattern number identifies the result within the overall evolution process.

PerformanceMetrics

public Dictionary<string, double> PerformanceMetrics

Gets or sets the Dictionary containing the performance metrics for this Evolver result. Each Dictionary key is a metric name and its value is the corresponding metric value. A new StrategyEvolverResult initializes this property to an empty Dictionary.

PosSize

public PositionSize PosSize

Gets or sets the PositionSize used by the evolved Strategy.

SlotNumber

public int SlotNumber

Gets or sets the initial Evolver slot number associated with this result.

StrategyData

public string StrategyData

Gets or sets the persisted Building Block Strategy definition for this Evolver result. GenerateStrategy uses this value to recreate the evolved Strategy.

WasFiltered

public bool WasFiltered

Gets or sets whether the result was filtered out during the evolution process. The default value is false. Filtered results are represented with a reduced Opacity value.

Need help with this API?

Ask the community or explore custom development services.