I have been using Interactive Brokers platform to teach my students how to trade for over 5 years. We covered topics ranging from commodities and futures trading, equity arbitrage trading, risk management, portfolio management, and more. The platform is features rich and provides a realistic introduction to the world of trading. Best of all, it covers a diverse range of asset classes including Bonds, CFDs, ETFs, Forex, Futures, Indices, Metals, Options, Stocks and markets. Interactive Brokers was kind enough to feature me in the social media.
As with all educators, I can’t move away from this introduction without talking about my students’ achievement. In 2006, a team of student from my school participated in the CME Group Trading Challenge and they came out the winner for the competition. I attribute their success to their hard work and diligence. Having exposure to Interactive Brokers platform naturally helped them a lot to come up to speed with the workings of financial markets.
The one challenge that I have however was to monitor my students progress. In the early days, I had some 40 students enrolled in my course concurrently. Although Interactive Brokers provided me with a professor account that allows me to view all my students’ portfolio, it was still extremely time-consuming to go through all their account one-by-one. That drove me to look for alternative solutions…
Interactive Brokers API and Python
Out of my desperation, I stumbled upon Interactive Brokers API. At the time, there was no native support for Python. I had to resort to third party solution that provided a wrapper around the Java API – IbPy. Early this year, Interactive Brokers finally provided native support for Python. I will cover that in another post. Attached below is a “tutorial” that I devised to demonstrate some of the capabilities of Interactive Brokers with IbPy. There is a lot that you can do with this. I have seen Hedge Funds using Interactive Brokers to build their whole algorithmic trading platform. Of course, there is some limitation to the platform but that is just being picky.
I will end this post with the tutorial attached. In future posts, I will demonstrate how you can make use of this platform to build your own personal algorithmic trading strategies. I will try to find time to incorporate machine learning into it too. If you are impatient, you can have a look at what Rob Carver did and Quantopian as well.
If you like what you read, do remember to subscribe.