Algorithmic trading is where you use computers to make investment decisions. Computer algorithms can make trades at near-instantaneous speeds and frequencies – much faster than humans would be able to.

We've released a complete course on the freeCodeCamp.org YouTube channel that will teach you the basics of algorithmic trading.

Nick McCullum developed this course. Nick has worked as an investment analyst, portfolio manager, and software developer at financial startups for his entire career. He has a knack for explaining complex investment topics in a way that beginners can understand.

This course uses Python. Python is the most popular programming language for algorithmic trading. Python is powerful but relatively slow, so the Python often triggers code that runs in other languages.

Along with Python, this course uses the NumPy library to speed up the code. NumPy is the most popular Python library for performing numerical computing. Although NumPy is written for use in Python, the core underlying functionality is written in C, which is a much faster language.

Note that this course is meant for educational purposes only. The data and information presented in this video is not investment advice. One benefit of this course is that you get access to unlimited scrambled test data (rather than live production data), so that you can experiment as much as you want without risking any money or paying any fees.

Course Outline

In this course you will first learn the basics of algorithmic trading. Then you will learn how the IEX Cloud API works. We will use the API to gather data.

The bulk of this course teaches how to build three algorithmic trading projects.

Section 1: Algorithmic Trading Fundamentals

  • What is Algorithmic Trading?
  • The Differences Between Real-World Algorithmic Trading and This Course

Section 2: Course Configuration & API Basics

  • How to Install Python
  • Cloning The Repository & Installing Our Dependencies
  • Jupyter Notebook Basics
  • The Basics of API Requests

Section 3: Building An Equal-Weight S&P 500 Index Fund

  • Theory & Concepts
  • Importing our Constituents
  • Pulling Data For Our Constituents
  • Calculating Weights
  • Generating Our Output File
  • Additional Project Ideas

Section 4: Building A Quantitative Momentum Investing Strategy

  • Theory & Concepts
  • Pulling Data For Our Constituents
  • Calculating Weights
  • Generating Our Output File
  • Additional Project Ideas

Section 5: Building A Quantitative Value Investing Strategy

  • Theory & Concepts
  • Importing our Constituents
  • Pulling Data For Our Constituents
  • Calculating Weights
  • Generating Our Output File
  • Additional Project Ideas

The first project in the course is an equal-weight S&P 500 screener. The S&P 500 is the world's most popular stock market index. In this project, you will build an alternative version of the S&P 500 Index Fund where each company has the same weighting.

The second project is a quantitative momentum screener. Momentum investing means investing in assets that have increased in price the most. You will create an algorithm that implements this strategy. First, you will build a strategy that uses a single momentum metric. Then, you will expand to build a more sophisticated strategy that uses multiple metrics together.

The final project is a quantitative value screener. Value investing means investing in stocks that are trading below their perceived intrinsic value. Like the previous project, you will first build a strategy that uses 1 value metric. Then, you will expand to build a more sophisticated strategy that uses 5 different value metrics together.

How to Get Started with the Course

This course is original content created by our nonprofit, freeCodeCamp.org. It was made possible a grant provided by IEX Cloud, and with market data they provided us. Any opinions or assertions contained herein do not represent the opinions or beliefs of IEX Cloud, its third-party data providers, or any of its affiliates or employees.

📺 You can watch the full course on the freeCodeCamp.org YouTube channel (4-hour watch).

And you can access the full open source course files, with both starter files and finished files, at this GitHub repository. Happy coding.