Inflearn brand logo image
Inflearn brand logo image

Python Algorithmic Trading Part 2: Real-Time Algorithmic Trading with the Interactive Brokers API

You can systematically learn stock trading automation using Python and the Interactive Brokers API, which holds the top spot in global market share.

(4.7) 16 reviews

101 students

Python
oop
Quant
Thumbnail

This course is prepared for Intermediate Learners.

What you will learn!

  • Implementing an automated trading system with Python connected to the Interactive Brokers API.

  • Data-driven Trading and Investment

  • In-depth Understanding of Python Object-Oriented Programming (OOP)

  • Real-time trading and trade schedule management

An investment strategy without execution is a dead strategy!

Create your own trading bot with your own strategies.

Notes before taking the course 📢

IMPORTANT NOTICE :

This course is designed to educate algorithmic trading and coding automation from a developer's perspective . The course content focuses on developing investment strategies and simulating them , and does not cover account opening, legal procedures, tax-related matters related to actual investments, etc. In addition, it does not serve as investment advice or financial counseling , and matters related to actual financial transactions should be carried out at one's own risk.

All trading strategies covered in the course are based on simulations and are for educational purposes only. If students have questions related to investing or trading, please understand that we cannot answer questions that are outside the scope of the course.


[Python Algorithm Trading Lecture] is a three-part series , and this lecture is 'Part 2'.

Part 2 is required to take Part 3 , and Part 1 is recommended.

  • Part 1 - 'Python Data Analysis for Algorithmic Trading'


  • Part 2 - 'Real-time algorithmic trading using Interactive Brokers API' (main lecture)


  • Part 3 - 'Cloud Transaction Automation'

    • Learn how to automatically launch virtual machines to match your stock trading schedule with cloud automation.


Course Review Event

  • There is a course review event. Please leave a course review for Part 1 and contact us by email (daniel@datatrain.education ) and we will issue a voucher for an additional 20% discount from the current price .

  • Please refer to the last public lecture of Part 1 lecture.

Why is API connection important in quant lectures? 🤔

I want to invest in US stocks, but is there an efficient way ? 🧐

What if my strategy loses money in automated trading ? ❓

How do I apply my own strategy based on proven strategies ? ❓

•••

If you are curious about the questions above, read the introduction below!

Utilizing the world's No. 1 investment service API
Building a real-time investment pipeline

This course was created after much thought on whether it would be possible to include a universally applicable 'method' in the course so that any investment strategy can be put into practice immediately. The use of the API of Interactive Brokers (IBKR), the world's No. 1 market share, will enhance your investment execution ability.

Interactive Brokers (IBKR) offers a variety of tools to help clients manage their assets effectively in over 150 markets worldwide. IBKR stands out as an online brokerage service thanks to its low transaction costs and advanced trading technology, and has been ranked #1 in Barron's annual Best Online Brokers review for six consecutive years.

Advantages of IBKR (Interactive Brokers)

Simple registration process : (For simulation purposes) You can register with just your email address.

Super-simple API connection : Connecting the API to Python is as simple as two clicks.

Practice is the answer : Any investment strategy can be simulated in real time through actual trading.

Initialization Settings : You can initialize the funds in your paper trading account, making it easier to test new strategies.

The answer is global : You can access global financial markets, including US stocks, through the IBKR API.

Despite the above advantages, the reality is that there are few lectures that apply the IBKR API, which has the world's No. 1 market share in Korea. This lecture connects the IBKR API to Python to create a pipeline that can trade in real time.

Based on the latest investment portfolio
Easy, fast and safe automated trading execution

Optimized trading with daily updates

Every morning, we select the optimal stock pairs and trading parameters based on the latest market data. This allows us to quickly respond to changing market conditions, maximizing the efficiency of your investments.

Automated trading execution with Python and IBKR API

The updated portfolio is imported directly into a Python script, and trades are automatically executed via the IBKR API within minutes. The whole process is easy and fast.

Ensures stability by preventing duplicate transactions

If there is a delay in the trading signal, the script automatically checks the signal transmission time to prevent duplicate transmission. This reduces unnecessary trading risks and maintains stable trading.

(Left: Python script vs. Right: Real-time trading via Interactive Brokers API)

Learning through Quant Investment Project
Object Oriented Programming

'Inheritance', one of the core principles of object-oriented programming, allows you to create a completely new class by extending or modifying the functionality of an existing class. In this process, the inherited class can shorten development time and maintain code consistency by reusing the properties and methods of the base class.

The importance of code blocking and management

Blocking and organizing your code is an often overlooked part of programming. When it comes to efficiently integrating external code and building on it to add new features, well-structured code offers the following benefits:

  • Performance Improvement : By reusing existing components, you can improve the performance of your overall system.

  • Ease of debugging : When the structure of your code is clear, it becomes easier to find and fix errors.

  • Extensibility : Code with a well-defined structure makes it easy to add new features or modify existing ones.

Hands-on example: PairsTradingUpdatePosition class

In our lectures Let's take the 'PairsTradingUpdatePosition' class as an example and see how this class can be extended by inheriting from other trading strategy classes through real code. Through this process, you will learn specifically how inheritance is applied to real code and how it affects code maintenance and optimization.


💡 What sets it apart from other Python quant courses

  • Access global markets through Interactive Brokers API, the world's #1 market share

  • Automatic algorithm updates and execution reflecting the dynamic characteristics of the market

  • Access to real-time data via Yahoo Finance, not historical data

  • Everything is an object. Deep object-oriented programming


Develop your quantitative investment skills with step-by-step learning!

This lecture is the second lecture of [Python Algorithm Trading].

333011

Go to Part 1 lecture >>

Things to note before taking the class

Learning Materials

  • All Python scripts are attached to the lecture materials.

Do you have any questions?

Q. Do I have to take Daniel Instructor’s Quant Part 1 lecture?

No, the purpose of this course is to put investment strategies into practice.

Since this course requires an investment strategy, there is a Part 1 lecture on the process of creating an investment strategy.

Q. How much Python knowledge is required?

This lecture is aimed at intermediate Python students. The lecture proceeds by guiding the installation process of Visual Studio Code or Conda without directly covering it.

Additionally, the lecture assumed a basic understanding of Python's object orientation.

Q. So, beginners can't take the course?

Based on my experience conducting in-house Python training at my company, I can say that the training results were the best when we trained while producing actual results.

Even if the lecture is difficult, I recommend it to beginners who can challenge themselves by looking up related materials and asking questions to the knowledge sharer.

Q. What about time difference issues when executing automated trading targeting US stocks?

When taking the course, we recommend that you study the last lecture (Section 4: Completing Real-Time Trading) during the US stock market opening hours (after 10:30 PM).

In the upcoming Quant lecture [Part 3], we aim to automate all processes in the cloud to achieve automatic trading without time lag issues.

Recommended for
these people!

Who is this course right for?

  • Looking for individuals who have taken the "Python Algorithm Trading Part 1" course or have an understanding of object-oriented programming.

  • For those looking to automate stock trading

  • Traders and investors looking to upgrade their trading activities to a professional and automated system

Need to know before starting?

  • Python Object-Oriented Programming

Hello
This is danielyouk

540

Students

50

Reviews

67

Answers

4.8

Rating

7

Courses

  • LLM 기반 AI 기업에서 Pod Lead로 활동

  • 서울대학교 기계항공 공학부 졸업

  • 유럽 소재 대학원에서 기계항공공학 석사

  • 독일 소재 공학 연구기관에서 박사 과정 연구 수행

  • 유럽 대형 에너지 기업에서 Senior Data Scientist 경험

  • 영국 소재 에너지 컨설팅 기업에서 Senior Consultant 활동

  • Databricks 기반 데이터 엔지니어링 프로젝트 수행

  • Kaggle 주식 거래 AI 대회 Top 3% 성과

  • AI Agent 개발팀장으로 현재 활동 중

More

Curriculum

All

20 lectures ∙ (2hr 7min)

Course Materials:

Lecture resources
Published: 
Last updated: 

Reviews

Not enough reviews.
Become the author of a review that helps everyone!