Table of Contents

Class BruteForceOptimizer

Namespace
StockSharp.Algo.Strategies.Optimization
Assembly
StockSharp.Algo.dll

The brute force optimizer of strategies.

public class BruteForceOptimizer : BaseOptimizer, IPersistable, ILogReceiver, ILogSource, IDisposable
Inheritance
BruteForceOptimizer
Implements
IPersistable
Derived
Inherited Members
Extension Methods

Constructors

BruteForceOptimizer(ISecurityProvider, IPortfolioProvider, IStorageRegistry)

Initializes a new instance of the BruteForceOptimizer.

public BruteForceOptimizer(ISecurityProvider securityProvider, IPortfolioProvider portfolioProvider, IStorageRegistry storageRegistry)

Parameters

securityProvider ISecurityProvider

The provider of information about instruments.

portfolioProvider IPortfolioProvider

The portfolio to be used to register orders. If value is not given, the portfolio with default name Simulator will be created.

storageRegistry IStorageRegistry

Market data storage.

BruteForceOptimizer(ISecurityProvider, IPortfolioProvider, IExchangeInfoProvider, IStorageRegistry, StorageFormats, IMarketDataDrive)

Initializes a new instance of the BruteForceOptimizer.

public BruteForceOptimizer(ISecurityProvider securityProvider, IPortfolioProvider portfolioProvider, IExchangeInfoProvider exchangeInfoProvider, IStorageRegistry storageRegistry, StorageFormats storageFormat = StorageFormats.Binary, IMarketDataDrive drive = null)

Parameters

securityProvider ISecurityProvider

The provider of information about instruments.

portfolioProvider IPortfolioProvider

The portfolio to be used to register orders. If value is not given, the portfolio with default name Simulator will be created.

exchangeInfoProvider IExchangeInfoProvider

Exchanges and trading boards provider.

storageRegistry IStorageRegistry

Market data storage.

storageFormat StorageFormats

The format of market data. Binary is used by default.

drive IMarketDataDrive

The storage which is used by default. By default, DefaultDrive is used.

BruteForceOptimizer(IEnumerable<Security>, IEnumerable<Portfolio>, IStorageRegistry)

Initializes a new instance of the BruteForceOptimizer.

public BruteForceOptimizer(IEnumerable<Security> securities, IEnumerable<Portfolio> portfolios, IStorageRegistry storageRegistry)

Parameters

securities IEnumerable<Security>

Instruments, the operation will be performed with.

portfolios IEnumerable<Portfolio>

Portfolios, the operation will be performed with.

storageRegistry IStorageRegistry

Market data storage.

Methods

GetProgress()

Get progress value.

protected override int GetProgress()

Returns

int

Operation result.

Start(DateTime, DateTime, IEnumerable<(Strategy strategy, IStrategyParam[] parameters)>, int)

Start optimization.

public void Start(DateTime startTime, DateTime stopTime, IEnumerable<(Strategy strategy, IStrategyParam[] parameters)> strategies, int iterationCount)

Parameters

startTime DateTime

Date in history for starting the paper trading.

stopTime DateTime

Date in history to stop the paper trading (date is included).

strategies IEnumerable<(Strategy strategy, IStrategyParam[] parameters)>

The strategies and parameters used for optimization.

iterationCount int

Iteration count.

Start(DateTime, DateTime, Func<IPortfolioProvider, (Strategy strategy, IStrategyParam[] parameters)?>, int)

Start optimization.

public void Start(DateTime startTime, DateTime stopTime, Func<IPortfolioProvider, (Strategy strategy, IStrategyParam[] parameters)?> tryGetNext, int iterationCount)

Parameters

startTime DateTime

Date in history for starting the paper trading.

stopTime DateTime

Date in history to stop the paper trading (date is included).

tryGetNext Func<IPortfolioProvider, (Strategy strategy, IStrategyParam[] parameters)?>

Handler to try to get next strategy object.

iterationCount int

Iteration count.