资源加载中... loading...

Backtest System Model

FMZ Quant Trading Platform divides the backtest system into bot level and simulation level. The bot level is to backtest completely according to the complete historical data; while simulation level backtest generates tick data according to the real K-line data at regular intervals for backtest. They are both based on the real historical data, but the bot level data is more accurate and the results are more credible. However, backtesting is just the performance of the strategy according to historical data. The historical data cannot fully represent the future market. The historical market may repeat, or it may also lead to the Black Swan. Therefore, the backtest results should be treated rationally and objectively.

The simulation level Tick generates the simulated tick data based on the underlying K-line period, each underlying K-line period will generate a maximum of 12 backtest time points; While the real market level Tick backtesting uses real collected second-by-second tick data, the volume of data is very large and the backtesting speed is slow, so it cannot be backtested for a very long period of time. The backtest mechanism of FMZ Quant allows the strategy to trade multiple times on a single K-line, avoiding the situation where the trading can only be executed at the closing price. It is more accurate while taking into account the speed of backtest.

Backtesting system mechanism description

  • Simulation Level Tick The simulation level Tick is based on the underlying K-line data of the backtest system, simulating tick data to backtest within the framework of the highest price, lowest price, opening price, and closing price values of a given underlying K-line bar according to a certain algorithm. As real-time tick data on the backtesting time series, it returns when the strategy program calls the interface. For details, please refer to: Backtesting System Simulation Level Mechanism Description.

  • Bot Level Tick The bot level backtest is the actual tick level data in the Bar time series. For strategies based on tick level data, using real market level to backtest is closer to reality. In bot level backtest, tick data is real recorded data, not simulated one. It supports depth data, record data playback of market tradings, custom depth and each individual trading data. The maximum size of the real-market-level data backtest is up to a maximum of 50MB, with no limit on the backtest time range within the upper limit of the dataset. If you need to enlarge the backtest time range as much as possible, you can reduce the value of the depth gear setting and do not use each individual trading data to increase the backtest time range. Call GetDepth, GetTrades functions to obtain playback market data. At a moment of market data on the timeline, calling GetTicker, GetTrades, GetDepth and GetRecords will not push the time multiple times when the time moves on the backtest timeline (which will not trigger a jump to the next market data moment). Repeated calls to one of the above functions will push the backtest time to move on the backtest timeline (jump to the next market data moment). When the real market level is used for backtest, an earlier time is not recommended to choose. There may be no real-market-level data in the premature time period.

Bot-level Tick and Simulation-level Tick modes, the transaction matching mechanism of the backtest system: order transaction matching is carried out according to the price seen and the full volume is traded. Therefore, the scenario of partial transaction cannot be tested in the backtest system.

Strategy Editor The Backtesting System Supports Multiple Programming Languages