Multi-Assets Trading with Interactive Brokers

Background

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.

 

Challenge

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.

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

algorithmic trading
Seeking Alpha in Alternative Data

This is a webinar that I did with Quantopian on 14 Dec 2017.   The challenge for a quant is how to make sense and ultimately extract useful trading signals out of alternative data. In this webinar, Anthony Ng will use Quantopian’s alternative datasets and demonstrate one way to extract …

algorithmic trading
Classification Based Machine Learning for Price Prediction

It is quite common to observe that a lot of the initial application of machine learning techniques are on directly the market price (Open, High, Low, Close, Volume). As understanding of machine learning increase, the sophistication level starts to increase. Quants are starting to look for alpha by adding factors …

algorithmic trading
Download Historical FX Data Using Oanda V20 API

A couple of weeks ago, a student of mine on Python Algo Trading: FX Trading with Oanda asked me how to download historical fx data from the Oanda V20 API. I developed the following simple Jupyter notebook to assist him his query. The basic idea of this notebook is to …