1.5. What Topics Will Be Covered?
We're going to cover a wide range of topics in financial markets that will be relevant to all kinds of traders. These topics were chosen with two goals in mind. The first is to provide you with experience and knowledge on how to write code for the different types of trading-related tasks you'd actually want to complete regularly. The second goal is to provide you with repeated practice and exposure to Python language fundamentals so your skills are solidified over time.
Content is released on the weekly timeline below. We've found that a regular release schedule helps students maintain consistency and spaced repetition, but do not feel like you must maintain pace with the timeline as it's outlined. Everyone goes at their own speed, and there's no need to "catch up" just because you didn't get to some content in the week it was released. In particular, weeks with projects may take longer than others.
Week 0
- Module 1 is all about course structure, contents, and goals. We cover the prerequisites and intended audience for this course to ensure students find what they need here. This module is the only non-technical one before getting to Python content in module 2.
- Module 2 is a broad introduction to Python, and it may be something of a whirlwind because of the sheer amount of coding concepts it introduces. Because this course is Python for Traders, I wanted to ensure that the majority of its content is specifically focused on Python for trading. The tradeoff though is that my direct, formal treatment of just the Python language, and programming basics in general, is relatively succinct.
- I understand that may be concerning to students who have never written a line of code before, but there are a few ways I can provide you assurance. First, while the direct treatment of the programming language is only in Module 2, every following module contains more indirect and applied knowledge on Python's usage, constructs, performance, etc. that arise naturally from the topics being covered. The reality is that languages are not learned from a knowledge dump with bunch of rules that you internalize in a single sitting, but rather by repeated application and deeper understanding that you develop naturally from practice and exposure over time. Therefore, while Module 2 serves as an excellent initial exposure, and later as a useful reference for you, the real learning will occur gradually throughout the remainder of the course.
- Lastly, please see sections 1.8 How Much Coding Knowledge Do I Need? and 1.9 Is This Course For Me? if you'd like more information or to test your current knowledge.
Week 1
- Module 3 is all about working with financial data. Another big and important topic, we will cover common types of financial data, data structures for handling it, formats for storing it, and code for cleaning, transforming, and deriving calculations and statistics from raw datasets. Just like Module 2, these topics will be absolutely essential for your productivity and daily workflows, and this initial module will just serve as your first exposure to them with more knowledge being spread throughout the remaining lessons as it becomes naturally relevant.
Week 2
- Module 4 introduces the concept of a trading algorithm. First of all, we try to bring some clarity to the traditionally nebulous concept of algorithms (they're easier to understand than you think!). Then we'll examine the architecture of a realistic trading algorithm in Python, so you get a feel for how the different components work and fit together to make an automated system. With that knowledge in place, another major tool in your software toolbox will be introduced: a backtester. We'll see how to backtest an algorithm written in Python, and by the end of this module you'll have established a strong and applicable research workflow.
Project 1: Build and Backtest a Trading Algorithm
- At this point you'll have learned Python language foundations, how to work with financial data, and how to write and backtest a trading algorithm, making you ready to tackle the first semi-guided coding project. This project takes you through the end-to-end process of gathering a dataset, calculating statistics and signals from that dataset, converting to those signals into trading logic, coding that logic into an algorithm, and backtesting that algorithm to assess its historical performance. This covers the entire basic quantitative research workflow!
- The data, signals, and algorithm will be relatively simple and based off standard technical factors and common sense trading rules. The important part is converting that idea into functioning Python code and arriving at the results that tell you how valuable your strategy could be if you trade it for real.
Week 3
With some experience performing the fundamental quantitative research workflow under your belt, part 2 begins diving into intermediate topics in coding and finance.
- Module 5 is an introduction to automation. It teaches how to connect to public APIs to build interesting datasets from scratch, how to scrape data from websites, how to schedule code to run at certain times of the day, and how to automate your general data-oriented workflows. You'll learn how to deploy your code so it stays running 24/7 and how to re-use scripts to simplify and perform repetitive tasks with ease.
- Module 6 is about advanced analysis techniques, specifically oriented towards working with fundamentals. Fundamental data is typically unstructured, like a news article or a form 10-K. From a programming perspective, it's an entirely different ballgame to manage and process unstructured data like this into a useful form. We will discuss how to accomplish similar tasks as before - collecting, cleaning, computing, storing - this new type of data and see how it can be leveraged in trading strategies.
Week 4
- Module 7 is about options and derivatives. It's no secret that this is a math-heavy area of finance. The main goal of this module will be to gain enough of a rough understanding of valuation techniques, like the Black-Scholes equations and Monte Carlo simulations, to be able to implement them in Python. Even if you don't fully understand the abstract mathematics, the real exercise will be in translating it to working code that can take in some inputs and produce a realistic value.
Project 2: Write a Volatility Surface Analysis Tool
- With the knowledge you gain from Module 7, you'll then go off and write your own code to calculate and plot a 3D volatility surface. Again, I understand not every trader is necessarily interested in options or derivatives, especially not the crazy math behind them, but regardless this is an excellent lesson in using Python to understand the market dynamics of a financial instrument, which is the heart of trading anyway.
Week 5
The last part of this course will focus more on higher frequency strategies and fully automated trading.
- Module 8 is going to cover automated and high-frequency trading in general, so you understand how impossible it would be to execute some of these strategies without code. We'll discuss pure arbitrage, statistical arbitrage, and market making, and news trading so you are familiar with the timescales and edges that power algorithmic traders.
Project 3: Build & Design a Limit Order Book
- The third project involves designing & building a limit order book, which is a key data structure at the heart of how electronic financial markets work. Designing this data structure is a foundational exercise for building an automated trading system and simultaneously teaches good and optimal design for a complex system.
Weeks 6-7
Capstone Project: Build a Market Making Bot
Your final capstone project will be to develop a simplified market making bot. Your bot will be able to get the order book in real-time, estimate the fair value of the asset, compute its bid price and ask price, and then send limit orders to the exchange. After a certain amount of time, it will cancel its orders and re-compute its fair value, sending new orders. This is the basic model of being a fully automated market maker!
This project will be challenging, requiring everything you've learned so far to execute successfully. But once you are done, you'll have written your first fully fledged bot that can interact with an exchange! Please note that during development you must work with your paper trading account, that is, no real-money orders will be sent during development. If you wish to migrate your bot over to real trading after this course, it will be designed in such a way that it's easy to do.