microsat2 Posted August 29, 2015 Report Share Posted August 29, 2015 (edited) When we backtest, should we consider the spread between last and bid/ask? Suppose a bar's close price is 50 (last) and triggers a market buy order, would the market order be filled at 50? If not, what price is it most likely to be filled at? ask price? (suppose ask price be 51) Suppose later a bar's close price reaches 52(last) and triggers a exitlong market order, would the market sell order be filled at 52? if not, it would be filled at bid price? (suppose bid price be 51) If you don't consider spread, the trading above is a win trade (2 - commission fee). But when you consider spread, the trading above is a loss trade (0- commision fee). How to consider the effect of bid-ask spread in Ninjatrader's backtest? Edited August 29, 2015 by microsat2 Quote Link to comment Share on other sites More sharing options...
⭐ JDizzle22 Posted August 29, 2015 Report Share Posted August 29, 2015 When we backtest, should we consider the spread between last and bid/ask? Suppose a bar's close price is 50 (last) and triggers a market buy order, would the market order be filled at 50? If not, what price is it most likely to be filled at? ask price? (suppose ask price be 51) Suppose later a bar's close price reaches 52(last) and triggers a exitlong market order, would the market sell order be filled at 52? if not, it would be filled at bid price? (suppose bid price be 51) If you don't consider spread, the trading above is a win trade (2 - commission fee). But when you consider spread, the trading above is a loss trade (0- commision fee). How to consider the effect of bid-ask spread in Ninjatrader's backtest? I normally just change slippage to 1 or 2 depending on the market I am back testing. Although this is not perfect, back testing isn't perfect. You should still go through your executions to see if the market was moving too quickly to get filled at all your levels/filled at the price even with slipapge. Quote Link to comment Share on other sites More sharing options...
microsat2 Posted August 29, 2015 Author Report Share Posted August 29, 2015 thanks. Do you mean the slippage option in the ninjatrader backctest already contains the effect of this kind of spread? I am just wondering why ninjatrader's backtest cannot just use bid or ask price to enter/exit trades. For example, when a bar with close price of 50 is triggerred, the market buy orer would be filled at the ask price of 51. And in the chart, 51 is plotted as entry. It is not difficult to add this function to ninjatrader's backtest. I am just wondering why not? In addition to the slippage caused by spread, there is another slippage which is caused by market's fast movement. If we could set spread slippage and market's fast movement slippage separately, it would help us determine the effect of each one. I normally just change slippage to 1 or 2 depending on the market I am back testing. Although this is not perfect, back testing isn't perfect. You should still go through your executions to see if the market was moving too quickly to get filled at all your levels/filled at the price even with slipapge. Quote Link to comment Share on other sites More sharing options...
⭐ JDizzle22 Posted August 29, 2015 Report Share Posted August 29, 2015 Yes, ninjatrader doesn't currently store bid ask data in its database...that's why there are packages such as gomi developed to record bids and asks, hopefully in ninjatrader 8 this will be solved Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.