Skip to content

Learn-Quant

138 small, runnable lessons on quantitative finance and the Python it is written in. Each folder covers one idea. The README explains it, the code implements it without leaning on a library to do the hard part, and a test checks the code does what the README says.

150 Python files / 9 JavaScript files / MIT licence / GitHub

Where to start

There are also reading orders for a few common goals.

Tracks

Track Lessons Covers
Python Fundamentals 10 Numbers, strings, functions, NumPy and pandas, using market data as the running example.
Data Structures 4 Arrays, lists, dicts and sets, and when each one is the right container.
Algorithms 8 Sorting, searching, graphs and dynamic programming applied to prices and orders.
Advanced Python 6 Async, OOP, multiprocessing and error handling for code that has to keep running.
Quantitative Methods 27 Statistics, time series, stochastic processes and numerical methods, built from scratch.
Options, Derivatives & Finance 27 Option pricing and Greeks, bonds and yield curves, valuation and sizing.
Risk & Performance 12 VaR, drawdowns and the ratios used to judge whether a track record is any good.
Portfolio Management 8 Mean variance, risk parity, Black Litterman and other ways to size a book.
Strategies 9 Signals, backtests and execution for the standard strategy families.
AI & Machine Learning 14 Classifiers, clustering, trees and reinforcement learning, with the leakage traps spelled out.
Market Microstructure 3 Order books, spreads, liquidity and the cost of actually trading.
Utilities & Tools 10 Data feeds, logging, FX conversion, calendars and other plumbing.

Recently added

Running a lesson

git clone https://github.com/MeridianAlgo/Learn-Quant
cd Learn-Quant
pip install -r requirements.txt

cd "Quantitative Methods - GARCH"
python garch.py

The getting started page covers virtual environments, the JavaScript lessons and running the tests.