Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Anyone knows how IB paper trading works? how realistic is it?

I have a strategy which for last two years have a Sharpe = -4 :) Yes, minus!
So it has a nice smooth decline through the whole period of time :)
But if I change default slippage model to my own - which executes not based on next minute's close price but based on next minutes' open price - the Sharpe changes to nice +2 and has a good potential to improvement.
I don't know which one is more realistic slippage model - mine or Quantopian (I hope mine is more realistic though).
The next option would be to test in Paper Trading mode. I think Quantopian paper trading have no difference (probably the same execution engine?) - so IB paper would be a better option. But this is not real trading and IB has their own simulation execution model I think.

So the question is if anyone knows how realistic IB paper trading model is. I know it executes right away instead of waiting for next minute's close price but anyway... Does anyone have any experience comparing IB paper with IB live? I know it can depends on lots of factors but any information would be helpful.

Thanks a lot in advance!

2 responses

IB's model captures the bid-ask, so as soon as your order gets transmitted, it gets matched against incoming orders / book and whenever your buy crosses an offer, the transaction occurs. If you have a passive order (an order that's not instantly executed but rather rests on the book and waits for someone to trade against it) I'm not sure how IB models queue priority but I suspect that for your purposes, it doesn't matter.

Unfortunately, with data like Quantopian's which lacks a bid-ask spread and just uses trade prices, using the open of the next bar is quite bad. You can use the open of the next bar but you need to add a decent amount of slippage in addition to that price. If you live-trade IB, you can get a nice report which tells you how your fill prices compare to the prices at the arrival at the order. In my case, for example, the slippage is about 5bps average, so perhaps that can help you calibrate your model. That said, for Quantopian simulations, I tend to use significantly higher slippage (trade at the next bar and at least 10bps of slippage on top) in order to prevent unrealistic optimism. Even still, when trading thinly-traded products with a wide bid-ask spread, Quantopian's fill model ends up too optimistic.

Trading in relatively relatively small amount on IB can be done pretty cheaply (the one constraint is a min 25k deposit to avoid day-trading limits) so I encourage you to try your model for a little bit and then compare the real fills to what Quantopian's simulator produces and use it to tune your simulations.

IB paper and IB real money live trading use the same settings - the slippage is set by the market, as Alex explained. Quantopian paper trading uses the slippage settings defined in your algo. To see an algo progress from backtesting to live trading, take a look at this thread.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.