StrategyParamHelper

StockSharp.Algo.Strategies

補助クラスStrategyParam@

メソッド

CanOptimize
public static bool CanOptimize(Type type)
result = StrategyParamHelper.CanOptimize(type)

パラメータを最適化することができます。

type
パラメータ値の型。

戻り値: パラメータを最適化できる場合は、 .

CreateParam
public static IStrategyParam CreateParam(Type type, string id)
result = StrategyParamHelper.CreateParam(type, id)

パラメータを作成します。

type
仕様
id
サインイン

戻り値: 担当: 佐藤 宏

GetIterationsCount
public static int GetIterationsCount(IStrategyParam param)
result = StrategyParamHelper.GetIterationsCount(param)

パラメータの最適化回数を取得します。

param
担当: 佐藤 宏

戻り値: 反復の数。

GetIterationsCount
public static int GetIterationsCount(Type type, object from, object to, object step, IEnumerable values)
result = StrategyParamHelper.GetIterationsCount(type, from, to, step, values)

Get the number of optimization iterations for a parameter shape.

type
The type of the parameter value.
from
Initial value, or .
to
Final value, or .
step
Increment value, or .
values
Explicit values, or . Win over the range when not empty.

戻り値: Number of iterations, zero when the shape defines no values of its own.

GetName
public static string GetName(IStrategyParam param)
result = StrategyParamHelper.GetName(param)

パラメータ名を取得する。

param
担当: 佐藤 宏

戻り値: ディスプレイ名。

GetOptimizationValues
public static IEnumerable<object> GetOptimizationValues(Type type, object from, object to, object step, IEnumerable values)
result = StrategyParamHelper.GetOptimizationValues(type, from, to, step, values)

Get all optimization values for a parameter shape.

type
The type of the parameter value.
from
Initial value, or .
to
Final value, or .
step
Increment value, or .
values
Explicit values, or . Win over the range when not empty.

戻り値: Enumerable of all optimization values, empty when the shape defines none of its own.

GetOptimizationValues
public static IEnumerable<object> GetOptimizationValues(IStrategyParam param)
result = StrategyParamHelper.GetOptimizationValues(param)

パラメータのすべての最適化値を取得します。

param
担当: 佐藤 宏

戻り値: すべての最適化値の有効化。

GetRandom
public static object GetRandom(IStrategyParam param, IRandomProvider provider)
result = StrategyParamHelper.GetRandom(param, provider)

Generate a random value within the optimization range for the parameter.

param
IStrategyParam
provider
Where the value is drawn from. A search worth keeping the result of is worth running again, so the caller states the source rather than a default deciding for it - RandomProvider is the one a strategy runs on.

戻り値: Random value within the optimization range.

GetRandomValues
public static HashSet<object> GetRandomValues(IStrategyParam param, int count, IRandomProvider provider)
result = StrategyParamHelper.GetRandomValues(param, count, provider)

Generate a set of unique random values for the parameter.

param
IStrategyParam
count
Number of random values to generate.
provider
Where the values are drawn from.

戻り値: Set of unique random values.

GetRandomValues``1
public static HashSet<T> GetRandomValues<T>(StrategyParam<T> param, int count, IRandomProvider provider)
result = StrategyParamHelper.GetRandomValues(param, count, provider)

Generate a set of unique random values for the parameter.

param
StrategyParam
count
Number of random values to generate.
provider
Where the values are drawn from.

戻り値: Set of unique random values.

GetRandom``1
public static T GetRandom<T>(StrategyParam<T> param, IRandomProvider provider)
result = StrategyParamHelper.GetRandom(param, provider)

Generate a random value within the optimization range for the parameter.

param
StrategyParam
provider
Where the value is drawn from.

戻り値: Random value within the optimization range.

ToBruteForce
public static IEnumerable<ValueTuple<Strategy, IStrategyParam[]>> ToBruteForce(Strategy strategy, IEnumerable<ValueTuple<IStrategyParam, IEnumerable>> parameters, IStrategyParam[] optimizedParams, int totalCount)
result = StrategyParamHelper.ToBruteForce(strategy, parameters, optimizedParams, totalCount)

ブルトフォース最適化のためのパラメータの透過率ですべての戦略クローンを作成します。 金融商品、DataTypeなどのパラメータの明示的な値リストをサポートします。

strategy
クローンするベース戦略。
parameters
範囲ではなく、オプションの明示値を持つパラメータ。
optimizedParams
出力:最適化に関わるすべてのパラメーター。
totalCount
出力: 通気の総数。

戻り値: パラメータ配列で戦略クローンのレイジー列挙。

ToBruteForce
public static IEnumerable<ValueTuple<Strategy, IStrategyParam[]>> ToBruteForce(Strategy strategy, IStrategyParam[] parameters, IStrategyParam[] optimizedParams, int totalCount)
result = StrategyParamHelper.ToBruteForce(strategy, parameters, optimizedParams, totalCount)

ブルトフォース最適化のためのパラメータの透過率ですべての戦略クローンを作成します。

strategy
クローンするベース戦略。
parameters
最適化するパラメータ。
optimizedParams
出力:最適化に関わるすべてのパラメーター。
totalCount
出力: 通気の総数。

戻り値: パラメータ配列で戦略クローンのレイジー列挙。

ToBruteForceAsync
public static IAsyncEnumerable<ValueTuple<Strategy, IStrategyParam[]>> ToBruteForceAsync(Strategy strategy, IStrategyParam[] parameters, IStrategyParam[] optimizedParams, int totalCount)
result = StrategyParamHelper.ToBruteForceAsync(strategy, parameters, optimizedParams, totalCount)

Generate all strategy clones with parameter permutations for brute force optimization.

strategy
The base strategy to clone.
parameters
The parameters to optimize.
optimizedParams
Output: all parameters involved in optimization.
totalCount
Output: total number of iterations.

戻り値: Lazy enumerable of strategy clones with their parameter arrays.

ToBruteForceAsync
public static IAsyncEnumerable<ValueTuple<Strategy, IStrategyParam[]>> ToBruteForceAsync(Strategy strategy, IEnumerable<ValueTuple<IStrategyParam, IEnumerable>> parameters, IStrategyParam[] optimizedParams, int totalCount)
result = StrategyParamHelper.ToBruteForceAsync(strategy, parameters, optimizedParams, totalCount)

Generate all strategy clones with parameter permutations for brute force optimization. Supports explicit value lists for parameters like Security, DataType.

strategy
The base strategy to clone.
parameters
The parameters with optional explicit values to use instead of range.
optimizedParams
Output: all parameters involved in optimization.
totalCount
Output: total number of iterations.

戻り値: Lazy enumerable of strategy clones with their parameter arrays.

ToBruteForceRandom
public static IEnumerable<ValueTuple<Strategy, IStrategyParam[]>> ToBruteForceRandom(Strategy strategy, IStrategyParam[] parameters, int randomCount, IStrategyParam[] optimizedParams, int totalCount)
result = StrategyParamHelper.ToBruteForceRandom(strategy, parameters, randomCount, optimizedParams, totalCount)

ブルトフォース最適化のためのランダムパラメータ値ですべての戦略クローンを作成します。

strategy
クローンするベース戦略。
parameters
最適化するパラメータ。
randomCount
パラメータごとのランダムサンプルの数。
optimizedParams
出力:最適化に関わるすべてのパラメーター。
totalCount
出力: 通気の総数。

戻り値: パラメータ配列で戦略クローンのレイジー列挙。

ToBruteForceRandomAsync
public static IAsyncEnumerable<ValueTuple<Strategy, IStrategyParam[]>> ToBruteForceRandomAsync(Strategy strategy, IStrategyParam[] parameters, int randomCount, IStrategyParam[] optimizedParams, int totalCount)
result = StrategyParamHelper.ToBruteForceRandomAsync(strategy, parameters, randomCount, optimizedParams, totalCount)

Generate all strategy clones with random parameter values for brute force optimization.

strategy
The base strategy to clone.
parameters
The parameters to optimize.
randomCount
Number of random samples per parameter.
optimizedParams
Output: all parameters involved in optimization.
totalCount
Output: total number of iterations.

戻り値: Lazy enumerable of strategy clones with their parameter arrays.

ToGeneticParameters
public static ValueTuple<IStrategyParam, object, object, object, IEnumerable>[] ToGeneticParameters(Strategy strategy, IStrategyParam[] parameters)
result = StrategyParamHelper.ToGeneticParameters(strategy, parameters)

戦略パラメータを遺伝子最適化形式に変換します。

strategy
パラメータを持つ戦略。
parameters
最適化するパラメータ。

戻り値: CancellationToken に適しているタプルの配列。

ToGeneticParameters
public static ValueTuple<IStrategyParam, object, object, object, IEnumerable>[] ToGeneticParameters(Strategy strategy, IEnumerable<ValueTuple<IStrategyParam, IEnumerable>> parameters)
result = StrategyParamHelper.ToGeneticParameters(strategy, parameters)

戦略パラメータを遺伝子最適化フォーマットに変換し、明示的な値のサポートを行います。

strategy
パラメータを持つ戦略。
parameters
範囲ではなく、オプションの明示値を持つパラメータ。

戻り値: CancellationToken に適しているタプルの配列。