Table of Contents

Constructor BacktestConfig

Namespace
WhalesSecret.TradeScriptLib.Config
Assembly
WhalesSecret.TradeScriptLib.dll

BacktestConfig(DateTime, DateTime, TimeSpan, int?, IReadOnlyList<SymbolPair>, decimal, decimal, int)

Creates a new instance of the object.

[JsonConstructor]
public BacktestConfig(DateTime startTime, DateTime endTime, TimeSpan stepPeriod, int? rngSeed, IReadOnlyList<SymbolPair> symbolPairs, decimal makerFeePercent, decimal takerFeePercent, int maxDataAgeDays)

Parameters

startTime DateTime

Inclusive UTC time of the start of the backtesting period.

endTime DateTime

Exclusive UTC time of the end of the backtesting period.

stepPeriod TimeSpan

Period between two simulated steps in the backtest.

rngSeed int?

Random number generator seed, or null not to define any seed for the random number generator.

symbolPairs IReadOnlyList<SymbolPair>

List of symbol pairs that the backtested code may interact with.

makerFeePercent decimal

Trading maker fee in percent.

takerFeePercent decimal

Trading taker fee in percent.

maxDataAgeDays int

Number of days after which the simulation forgets the data to save the memory, or 0 to not delete old data at all.

Exceptions

InvalidArgumentException

Thrown if:

  • startTime is not strictly before endTime,
  • stepPeriod is not greater than Zero,
  • symbolPairs is empty,
  • maxDataAgeDays is negative.