Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Algorithmic Trading with Python (2026)
New
3 students

Algorithmic Trading with Python (2026)

Build, backtest and paper-trade crypto and stock strategies in Python, with real fees, honest tests and code that runs.
Created byLuis Betancourt
Last updated 10/2026
English
English

What you'll learn

  • Download free market data from Coinbase, Kraken and Alpaca, store it in Parquet, and keep every timestamp in UTC
  • Build SMA, EMA, RSI, Bollinger Bands and ATR from scratch, and turn them into signals without look-ahead bias
  • Write a vectorized backtester you can read in one sitting, and use an event-driven engine for stops and targets
  • Put real, dated fee schedules into every backtest and calculate the break-even cost of any strategy
  • Catch the classic traps: look-ahead, survivorship and overfitting, with out-of-sample tests, walk-forward analysis, Monte Carlo and benchmarks
  • Judge full case studies with honest verdicts: trend following, intraday mean reversion, breakouts with ATR stops and combined strategies
  • Paper-trade with Alpaca: API keys kept safe, orders, a trading loop, risk controls and monitoring
  • Test machine learning without fooling yourself, and keep your code working with pinned versions and golden tests

Course content

8 sections • 45 lectures • 2h 33m total length
  • What Algorithmic Trading Is (and Isn't)3:06
  • Your Toolkit in 20263:10

    Download the course code from this lecture's resources: algorithmic-trading-python-2026-course-code.zip. Unzip it, open the folder in a terminal and follow README.md: create the virtual environment, install requirements-lock.txt and run the golden tests. Every lesson script, notebook and exercise of the course is inside.

    The resources also include the two-page cheat sheet (PDF) with the rules, formulas, fees and checks of the course.

  • Free Market Data That Still Works3:01
  • Your First Download3:24
  • Quiz: Start Here

Requirements

  • Basic Python: variables, functions, lists and loops. No trading experience needed.
  • A computer with Python 3.14 (Windows, macOS or Linux). Only free accounts are used, and no real money.

Description

This course contains the use of artificial intelligence.

Most trading tutorials show you a beautiful backtest. This course shows you how to find out whether it is real.

You will build everything in Python 3.14 with pinned versions of pandas, NumPy and a handful of libraries, so the code you download is the code we ran. Every number on screen comes from running that code on real market data, and every fee comes from a published schedule, with the date it was checked.

Some of what you will see:

  • One missing line of code turns a bitcoin trend rule worth about 3,400% into more than 1.5 million percent. You will learn to spot that bug in any backtest.
  • An intraday strategy that made +500% before costs, with 70% winning trades, lost more than 99.9% with real exchange fees. You will calculate why, in one line.
  • 72 attempts to rescue it, chosen on 2021-2023 and tested on 2024-2026. Not one made money in both periods.
  • A machine-learning model that scored 67% with shuffled cross-validation scored about 50% when tested properly.

What you will build:

  • Sections 1-2: a free data pipeline (Coinbase, Kraken, Alpaca), stored in Parquet, in UTC.
  • Section 3: indicators and signals, and the shift(1) rule that removes look-ahead bias.
  • Section 4: a backtester with real costs, position sizing, the metrics that matter, and stops with an event-driven engine.
  • Section 5: the tests that keep you from fooling yourself: survivorship, overfitting, out-of-sample, walk-forward, Monte Carlo, benchmarks.
  • Section 6: full case studies with honest verdicts, including the ones that fail.
  • Section 7: a paper-trading bot on Alpaca, with risk controls and monitoring, and a comparison of paper results with the backtest.
  • Section 8: machine learning without the hype, running your bot in the cloud, and keeping your code alive.

Along the way you build your own strategy on ether in five hands-on exercises, each with a full solution video, and test yourself with a quiz at the end of every section. The course includes the full course code and the golden tests that check it still gives the same answers.

How this course was made

This course was produced with the help of AI tools. The narration uses Google Cloud Text-to-Speech, and AI assisted with drafting scripts, code, visuals and quiz questions. The instructor approved the curriculum, and every number in the lessons comes from running the course code on real market data.

Risk notice

Educational content, not financial advice. Trading involves risk of loss, and past results, including every backtest in this course, do not guarantee future results. Use paper accounts while you learn.

Independence

This course is independent training. It is not affiliated with, endorsed by, or reviewed by Coinbase, Kraken, Alpaca or any other company mentioned. Names are used only to describe the data sources and tools used in the course. Fees and APIs change, so always check the official pages before trading.

Who this course is for:

  • Python programmers who want to test trading ideas properly before risking money
  • Traders who want to automate their rules and check whether they actually work after costs
  • Anyone who has followed a trading tutorial whose code no longer runs