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
startTimeDateTimeInclusive UTC time of the start of the backtesting period.
endTimeDateTimeExclusive UTC time of the end of the backtesting period.
stepPeriodTimeSpanPeriod between two simulated steps in the backtest.
rngSeedint?Random number generator seed, or
nullnot to define any seed for the random number generator.symbolPairsIReadOnlyList<SymbolPair>List of symbol pairs that the backtested code may interact with.
makerFeePercentdecimalTrading maker fee in percent.
takerFeePercentdecimalTrading taker fee in percent.
maxDataAgeDaysintNumber of days after which the simulation forgets the data to save the memory, or
0to not delete old data at all.
Exceptions
- InvalidArgumentException
Thrown if:
startTimeis not strictly beforeendTime,stepPeriodis not greater than Zero,symbolPairsis empty,maxDataAgeDaysis negative.