Free course · With Dylan Siegel

Build your first trading algorithm.

Learn the basics, test a simple trading rule, and turn it into a program with AI coding tools. Start at lesson one. By the end you can follow the research and start your own.

4 parts17 lessonsNo experience needed

Read the idea. Try the example. Take the next step.

Part 1 · 5 lessons

Understand markets

Learn what an algorithm does and how buying and selling set a price. No code yet.

  1. 1.1 Welcome to the courseSee what you will build and where to begin. 1 min read
  2. 1.2 What is a trading algorithm?Write a rule a computer could follow. Sample draft
  3. 1.3 How does a market work?Understand buyers, sellers, and the gap between their prices. 1 min read
  4. 1.4 What is a backtest?Try a rule on past data without using tomorrow’s answer. 1 min read
  5. 1.5 Why does timing matter?Separate noticing a price from acting on it. 1 min read

Part 2 · 3 lessons

Build a signal

Calculate a simple average and turn it into a rule you can explain.

  1. 2.1 What is a signal?Turn something you notice into a number. Sample draft
  2. 2.2 Calculate a moving averageUpdate an average when a new price arrives. Sample draft
  3. 2.3 Do you need another signal?Check what a second measurement actually adds. Sample draft

Part 3 · 4 lessons

Test your idea

Try your rule on past data and check whether the test is fair.

  1. 3.1 Choose one question to testWrite down the question before running the test. Sample draft
  2. 3.2 Save some data for laterCheck a fixed rule on data you did not use to choose it. Sample draft
  3. 3.3 Include the cost of a tradeKeep price changes separate from simulated trading results. Sample draft
  4. 3.4 Read the result carefullyFind out where the result comes from. Sample draft

Part 4 · 5 lessons

Build the program

Use AI tools to write a small program, then run it with simulated trades.

  1. 4.1 Plan the programGive each part of the program one job. Sample draft
  2. 4.2 Write one piece with AIAsk for a small function and check its answers. Sample draft
  3. 4.3 Replay a few pricesRun the same input twice and compare the decisions. Sample draft
  4. 4.4 Try simulated tradesMake each pretend trade and its assumptions visible. Sample draft
  5. 4.5 Pause, stop, and check your workFinish with a program you can inspect and control. Sample draft
Go deeper — optional reading (3)

These articles cover more detail. You can finish the course without reading them.

After the course

Finished the course? Follow the research.

The research notes use the same process on live tick data, with small neural networks in place of hand-written rules. You now know enough to read them.

Read the research →