Algorithmic Trading Using Interactive Brokers Python Api

Implement algorithmic trading strategies on Interactive Broker's platform

Last updated 2022-01-10 | 4.6

- Algorithmic Trading
- Interactive Broker API
- Quantitative Finance

What you'll learn

Algorithmic Trading
Interactive Broker API
Quantitative Finance
Advanced Python Concepts

* Requirements

* Interactive Broker Account
* Basic python skills (should be familiar with data types
* data structures
* loops
* functions
* installing and importing libraries etc.)
* Intermediate level familiarity with finance/trading

Description

Design and deploy trading strategies on Interactive Broker's platform. Automate every step of your strategy including, extracting data (stock data and fundamental data), performing technical/fundamental analysis, generating signals, placing trades, risk management etc. Gain a thorough understanding of native interactive broker's API.

You can expect to gain the following skills from this course

  • API trading

  • Advanced python concepts (OOP concepts, multi-threading etc.)

  • Extracting historical data

  • Extracting fundamental data

  • Harnessing streaming tick level data

  • Incorporating technical indicators using python

  • End to End strategy design and deployment

  • Handling asynchronous calls

  • Sqlite database management

  • Interactive Broker's TWS terminal

  • Relevant account settings in IB


#############################################################################################

Important note - Course prerequisites:

Please note that this course requires basic python proficiency. At the minimum, you should be comfortable with:

  • basic python data types and format

  • basic python data structures such as list, dictionary, tuple etc.

  • how to create python functions

  • how to implement loops in python

  • installing and importing libraries 

Basic python proficiency is mandatory because Interactive Broker API's python client uses advanced OOP and asynchronous programming concepts. While, I have devoted an entire section explaining these concepts, students with no python knowledge will really struggle to follow along.

#############################################################################################


Who this course is for:

  • Traders looking to automate their strategies on Interactive Broker's platform
  • Anyone interested in Algorithmic trading

Course content

11 sections • 77 lectures

IB TWS Introduction Preview 08:57

IB API Architecture Preview 07:01

Anaconda Distribution Intro Preview 03:37

Creating Virtual Environment (Optional) Preview 09:59

Installing IB Python Client Preview 05:01

API Configuration Settings Preview 07:27

OOP Basics (Class - I) Preview 15:52

OOP Basics (Class - II) Preview 08:34

OOP Basics (Inheritance) Preview 12:25

Threads in Python Preview 14:49

Turning "Daemon" Threads into Your Angel Preview 06:36

Multi threading using Event object Preview 07:09

Websocket Intro Preview 13:17

Eclient and Ewrapper Class Intro Preview 14:48

Getting Contract Info Preview 14:19

Asynchronous Implementation Intro Preview 10:42

Asynchronous Implementation Using Event Preview 05:06

Market Data Subscription Preview 06:04

Getting Historical Data Using IBAPI Preview 11:55

Getting Historical Data (multiple tickers) using IBAPI Preview 15:12

Storing Historical Data in Dataframes Preview 12:42

Storing Historical Data in Dataframes - II Preview 06:51

Extracting Historical Data Iteratively Preview 11:07

Storing Historical Data of Stocks from Different Exchanges Preview 00:31

Placing a Simple Limit Order Using IBAPI Preview 11:49

Placing Order - Reusable Code Preview 05:08

Cancelling Orders Preview 07:35

Modifying Orders Preview 05:14

Other Important Order Types Preview 16:12

Getting Open Orders Information Preview 07:47

Getting Position Details Preview 07:08

Homework - Getting Account Summary & PnL Details Preview 03:56

Homework Solution Preview 00:27

Technical Indicators Intro Preview 04:40

TWS Terminal - Technical Indicators Preview 06:54

MACD Overview Preview 08:09

MACD Implementation Using IBAPI Preview 12:06

ATR and Bollinger Bands Overview Preview 08:20

Bollinger Bands Implementation Using IBAPI Preview 07:53

ATR Implementation Using IBAPI Preview 08:15

RSI Overview and Excel Implementation Preview 09:52

RSI Implementation Using IBAPI Preview 08:55

ADX Overview Preview 04:14

ADX Implementation in Excel Preview 12:46

ADX Implementation Using IBAPI Preview 11:44

Stochastic Oscillator Overview Preview 06:31

Stochastic Oscillator Implementation Using IBAPI Preview 06:40

Backtesting Intro Preview 03:11

CAGR Implementation using IBAPI Preview 14:59

Volatility & Sharpe Implementation using IBAPI Preview 08:01

Maximum Drawdown Implementation Preview 11:42

KPIs for Intraday Strategies Preview 03:15

Backtesting Sample Strategy (MACD+Stochastic) Preview 04:01

Backtesting Strategy - Extracting Data Preview 06:48

Backtesting Strategy - Signal Generation & Return Calculation Preview 19:41

Backtesting Strategy - KPI Calculation Preview 06:56

Homework - Implement Intraday KPIs Preview 01:27

Homework Solution Preview 00:07

Strategy Implementation - Blueprint Preview 10:27

Strategy Implementation - Data Preparation Preview 09:30

Strategy Implementation - Signal Preview 15:56

Strategy Execution Demo Preview 04:57

Closing All Positions Programatically Preview 04:57

Streaming Tick Level Data Preview 12:46

Streaming Aggregated Snapshot Data - I Preview 14:40

Streaming Aggregated Snapshot Data - II Preview 10:14

Storing Tick Data in SQL DB - I Preview 14:05

Storing Tick Data in SQL DB - II Preview 12:43

Storing Tick Data in SQL DB - III Preview 08:39

Accessing Data in DB Preview 03:24

Converting Ticks to Candles Preview 10:29

Fundamental Data API Basics Preview 09:56

Storing Fundamental Data in XML File Preview 11:08

Parsing XML Data - I Preview 17:08

Parsing XML Data - II Preview 19:36

Parsing XML Data - III Preview 10:58

Handling Multiple Fundamental Data Files Preview 11:07