nautechsystems / nautilus_trader

A high-performance algorithmic trading platform and event-driven backtester
https://nautilustrader.io
GNU Lesser General Public License v3.0
2.15k stars 485 forks source link

Added backtest order fill options #450

Closed cjdsellers closed 3 years ago

cjdsellers commented 3 years ago

We recommend running backtests on order book or tick data for maximum realism and accuracy.

Running backtests on bar data by pre-processing bars into ticks has been possible, however occasionally produces some surprising results. To help offset this until a full refactoring pass of the OrderBook and SimulatedExchange matching engine is carried out, two options have been added.

These boolean flags are available when adding a venue to a BacktestEngine. They result in orders being filled at their original price (preventing/overriding any slippage for STOP_MARKET orders, or executions away from the orders price for LIMIT orders).

cjdsellers commented 3 years ago

These have now been replaced with a bar_execution flag which achieves the same functionality.