6

I have started using IB in combination with IBridgePy and I was wondering whether it is possible to somehow perform any backtests, does anyone how to do this?

Ade Bijon
  • 85
  • 1
  • 1
  • 4
  • Hey, this is something you're going to have to talk to IB too - you can also talk to TipRanks which works with IB and does backtests (disclosure: I used to work for TipRanks but am no longer affiliated with it though still have friends like [Madara](https://stackoverflow.com/users/871050/madara-uchiha) who work there). Also - this is a bit of an offtopic question since it's about what services they'd allow you to use. I'm not sure a "No" is viable. – Benjamin Gruenbaum Jul 29 '18 at 12:34

3 Answers3

5

IB doesn't have a ready made backtesting/replay tool. Basically, you have to download historical data and run it through your strategy.

VictorS
  • 201
  • 1
  • 3
3

IB don't offer a real backtesting environment for your Python API. So you have to build your own backtesting environment. You should split it into 2 steps. Step 1 is collecting the historical data and step 2 is feeding your strategy with that data.

By the way, in TWS you can use Portfolio Builder. It's an easy to use tool for testing simple strategies. Check here: https://www.interactivebrokers.com/de/index.php?f=15968&ns=T

I think it's very helpful for the first steps. For more advanced strategies you have to use API as mentioned above.

epsimatic88
  • 73
  • 1
  • 1
  • 8
2

IBridgePy does not provide the backtest function. You can only collecting the historical and fundamental data after you subscribe IB's specific data feeding. However, I suggest 6 main backtesting framworks for Python:

  1. PyAlgoTrade
  2. bt - Backtesting for Python
  3. Backtrader
  4. pysystemtrade
  5. Zipline
  6. quantopian

You may choose a few of them depend on your needs.

Aqueous Carlos
  • 445
  • 7
  • 20