×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts

Changes

Jump to navigation Jump to search

Precise Backtesting

11 bytes removed, 13:38, 23 March 2023
no edit summary
==Understanding Precise Backtesting==
Depending on the strategy, Precise Strategy Back Testing Backtesting can give the user a more realistic emulation during back testingbacktesting. To back test backtest high frequency strategies like statistical arbitrage, the user may need to take into account the historical bid/ask data in addition to the historical trade data.
With Precise Back TestingBacktesting, the user can load the historical bid data series and the historical ask data series into MultiCharts. MultiCharts will use the ask data series to fill buy market, buy stop and buy limit orders. Similarly, MultiCharts will use the bid data series to fill sell market, sell stop and sell limit orders.
Consider a situation where a market order to buy 1 contract and a market order to sell 1 contract are submitted at the same time at the close of a bar. If the user only uses the trade data series, then there is only one price for the close. The back test backtest will show that these two orders were filled at the same price, and the profit/loss is zero. In reality, there's a bid/ask spread. If the price quote doesn’t move suddenly, then these two orders will undoubtedly generate an instantaneous loss due to the bid/ask spread. That's why it’s more precise to back test backtest with a bid data series and an ask data series.
Consider another situation where the trade price doesn't occur on either the bid or the ask. Due to liquidity or other reasons, the historical data series may show that the trade price was either in between or outside the bid/ask. In this situation, the user may want to be conservative and assume fills at the bid/ask instead of at the trade price.
If Time=1100 Then Sell 1 Contract This Bar on Close;</syntaxhighlight>
If this strategy was back tested backtested on simply a data series of historical trade prices, then the back test backtest will assume that the trades were filled at the close prices of the bars. However, it's unclear whether the trades would have been filled at the close prices, because the close prices could have been on either the bid or the ask.
If the close price was an ask price and the strategy was buying, then the fill price was realistic.
However, if the close price was an ask price and the strategy was selling, then the fill price was unrealistic.
With Precise Back TestingBacktesting, users can load two separate data series onto the chart. The first data series is for historical bid prices. The second data series is for historical ask prices. MultiCharts will use these two data series to determine realistic fill prices. The bar's close will have a bid and an ask price associated with it. MultiCharts will use the ask price to fill a buy order and the bid price to fill a sell order.
==Using Precise Backtesting==
To use Precise Strategy Back TestingBacktesting:
# Make sure the symbol contains historical bid and ask data.

Navigation menu