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.
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
Days 1 to 4 return None. That warm-up is part of the answer, not an error.
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
| Day | Close | 5-day trailing average |
|---|---|---|
| 1 | 100.00 | None |
| 2 | 101.20 | None |
| 3 | 100.60 | None |
| 4 | 102.30 | None |
| 5 | 103.10 | 101.44 |
| 6 | 102.40 | 101.92 |
| 7 | 104.00 | 102.48 |
| 8 | 105.20 | 103.40 |
| 9 | 104.10 | 103.76 |
| 10 | 103.00 | 103.74 |
| 11 | 101.80 | 103.62 |
| 12 | 102.60 | 103.34 |
| 13 | 104.40 | 103.18 |
| 14 | 106.10 | 103.58 |
| 15 | 107.00 | 104.38 |
| 16 | 106.20 | 105.26 |
| 17 | 108.30 | 106.40 |
| 18 | 109.10 | 107.34 |
| 19 | 108.00 | 107.72 |
| 20 | 109.60 | 108.24 |
| 21 | 111.20 | 109.24 |
| 22 | 110.40 | 109.66 |
| 23 | 112.10 | 110.26 |
| 24 | 113.00 | 111.26 |
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
- 1Getting Started with Quant FinanceBeginner
- 2Financial Markets and DataBeginner
- 3Returns and GrowthBeginner
- 4Risk BasicsBeginner
- 5Portfolio FoundationsIntermediate
- 6Backtesting FoundationsIntermediate
- 7Python for Quant FinanceBeginner
- 8Building Quant ProjectsIntermediate
Probability track
12 modules, 34 lessons
- 1Probability LanguageBeginner
- 2Counting and CombinatoricsBeginner
- 3Conditional ProbabilityBeginner
- 4Bayes' TheoremIntermediate
- 5Random Variables and Expected ValueBeginner
- 6Important Discrete DistributionsIntermediate
- 7Continuous Variables and DistributionsIntermediate
- 8Joint ProbabilityIntermediate
- 9Sampling and Limit ResultsIntermediate
- 10Simulation and Monte CarloIntermediate
- 11Probability in Quantitative ResearchIntermediate
- 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
Backtester. Run a defined rule over historical data, then compare costs, benchmarks, and risk.
- Portfolio BuilderBuild an allocation and see how weights shape diversification, risk, and historical results.
- Stock LookupInspect a ticker’s latest available quote, price history, company context, and data status.
- Code EditorPractice financial Python in guided exercises that run in your browser.
- Paper TradingReplay historical bars and study how simulated orders change cash and NAV.
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.