Learn quant finance by working through it.

Read a short lesson, write the Python, and see the result on a chart. Free to begin. Built for learning, not predictions or financial advice.

See how it works

No brokerage connection. No real-money trading.

Calculate a Trailing Moving Average

18-minute guided exercise, illustrative prices

Step 1: Lesson

A trailing average summarizes recent history without using future data. Until a full window exists, there is no average yet.

MAt = (Pt−4 + … + Pt) / 5

Step 2: Python, in your browser

def rolling_average(prices, window):    averages = []    for i in range(len(prices)):        if i < window - 1:            averages.append(None)            continue        recent = prices[i - window + 1 : i + 1]        averages.append(sum(recent) / window)    return averages

>>> rolling_average(prices, 5)

[None, None, None, None, 101.44, 101.92, …]

Step 3: Chart

  • Close
  • 5-day trailing average
Illustrative closes and 5-day trailing average by day
DayClose5-day trailing average
1100.00None
2101.20None
3100.60None
4102.30None
5103.10101.44
6102.40101.92
7104.00102.48
8105.20103.40
9104.10103.76
10103.00103.74
11101.80103.62
12102.60103.34
13104.40103.18
14106.10103.58
15107.00104.38
16106.20105.26
17108.30106.40
18109.10107.34
19108.00107.72
20109.60108.24
21111.20109.24
22110.40109.66
23112.10110.26
24113.00111.26
Illustrative prices, not market data. The Backtester’s SMA Crossover strategy is built on this same trailing average.

Commit to an answer. Then see why.

Every lesson leads into a guided problem you calculate by hand, and a Python exercise that turns the same idea into code.

Guided problems
45, with progressive hints
Python exercises
40, run in your browser

Calculate a Simple Return

Beginner, 4 min

A share price moves from $50 to $54. What is the simple return?

  • 4%
  • 8%Correct
  • 10%
  • 108%

Divide the $4 change by the starting price, not the ending price.

($54 − $50) / $50 = 0.08 = 8%

A finite map, start to finish.

102 short lessons in 20 ordered modules, from market data and returns to backtesting, Python, probability, and complete projects. You always know what comes next.

Core path

8 modules, 68 lessons

  1. 1Getting Started with Quant FinanceBeginner
  2. 2Financial Markets and DataBeginner
  3. 3Returns and GrowthBeginner
  4. 4Risk BasicsBeginner
  5. 5Portfolio FoundationsIntermediate
  6. 6Backtesting FoundationsIntermediate
  7. 7Python for Quant FinanceBeginner
  8. 8Building Quant ProjectsIntermediate

Probability track

12 modules, 34 lessons

  1. 1Probability LanguageBeginner
  2. 2Counting and CombinatoricsBeginner
  3. 3Conditional ProbabilityBeginner
  4. 4Bayes' TheoremIntermediate
  5. 5Random Variables and Expected ValueBeginner
  6. 6Important Discrete DistributionsIntermediate
  7. 7Continuous Variables and DistributionsIntermediate
  8. 8Joint ProbabilityIntermediate
  9. 9Sampling and Limit ResultsIntermediate
  10. 10Simulation and Monte CarloIntermediate
  11. 11Probability in Quantitative ResearchIntermediate
  12. 12Final Review and CapstoneIntermediate

Then test the idea against history.

5 focused tools for questions with a defined scope. Historical and simulated results stay labeled, with costs and limits in view.

SMA Crossover vs. buy and hold

  • SMA Crossover, after costs
  • Buy and hold
Illustrative values, not a real result. A backtest describes its assumptions; it does not predict future performance.

Backtester. Run a defined rule over historical data, then compare costs, benchmarks, and risk.

The boundaries are part of the lesson.

Quant work is only useful when the data source, assumptions, and limits stay attached to the result.

  • Educational only—not financial advice
  • No real-money trading or brokerage connection
  • Historical data may be delayed, partial, or unavailable
  • Backtests describe assumptions and do not predict future performance
  • Lessons include sources and further reading
  • Python exercises run locally in the browser through Pyodide
  • Account progress is stored through Supabase with row-level security

Start with one lesson.

Your first lesson takes about five minutes. Each idea then carries into a problem, a Python exercise, and a historical tool.