Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
What happened to the backtest in Q2?

My live fills very closely matched the backtest fills of Q1. The new Q2 backtester that breaks down orders over a slew of minutes has negated any accuracy the backtest used to have for me.

That being said, I trade an active strategy that is greatly affected by this notion that the buy/sell fills would take place over 2-8 minutes. In fact, having to wait for the close of a minute bar severely cripples the strategy to begin with - but I make do because these are the best toos currently at my disposal at this level.

But my real life trading results have never had an issue getting filled instantly, within a seconds time, of placing an order. So to have it spread out over the course of as much as 8 minutes is as far from realistic as I can think.

Is there a way to go back to the old way of testing? Is there some code that stops Q from spreading out my orders? It doesn't happen in live trading, and shouldn't be forced in the backtest.

Any help would be greatly appreciated! Or anyone else suffering from this ailment, please throw your hat into the ring.

Thanks!

7 responses

Just use your own slippage model, theirs is very pessimistic as you have seen.

God. I'm glad I'm not the only one extremely annoyed at the crippling inaccuracy of the slippage model for active trading.

Simon's got the best solution, but if you are in a hurry another suggestion is to just reduce your starting account balance to something like $100K or $50K or even $10K. The smaller order sizes will fill quicker.

Richard I tried that but oddly enough the results are nearly the same.

My backtest is almost a full 50% off from what it used to be.

Did you try sending several smaller orders for the same security in the same minute?

No. Why would I do that? Order fills aren't an issue in live trading. I want the backtest to mimick live trading (don't we all?) This new slippage model is a circus.

I'm not a programmer, I'm a trader. Every little change takes time and money for me which is why I seek answers from you kind folk before the shotgun trial and error method.

Speaking of, thank you for all of your feedback thus far.

Does anyone know if under Q2, using a custom slippage model, orders can be forced to be filled immediately? Or are the orders always subject to a trade event for the security being encountered by the backtester? I'm wondering if something along these lines could be used:

https://www.quantopian.com/posts/trade-at-the-open-slippage-model

But if the order doesn't get filled because minutes/hours pass because the next historical trade is required, then it'll require some tweaking.

If Eric is saying that his orders always get filled within seconds, then as I recall, there should be enough flexibility in a custom slippage model to do it, but I'm not quite clear if there might be a "gotcha" for minute bars and stocks that don't trade every minute.