Releases: MeridianAlgo/Learn-Quant
Release list
v2.11.0
Three new modules covering statistical testing, the core machine learning optimiser, and a drawdown based performance ratio. Each is documented, commented, and unit tested.
New modules
- Quantitative Methods, Hypothesis Testing builds the everyday significance tests from scratch, one sample and Welch two sample t tests, a z test, and confidence intervals, so you can tell a real edge from noise with a p value.
- Machine Learning, Gradient Descent fits a linear model by both full batch and stochastic descent on plain NumPy, showing how the learning rate and feature scaling decide whether the loss falls or blows up.
- Finance, Calmar Ratio measures a track record by its compound annual growth over its worst peak to trough drawdown, the companion to the Sharpe and Sortino lessons.
Stats
- 121 modules, up from 118
- 578 tests passing, up from 551 (27 new)
- Strict documentation build passes and the docs site auto extends with the new pages
Learn-Quant v2.10.0
What is New in v2.10.0
Two new beginner friendly lessons on how Python imports actually work. Both come with a README, a runnable demo, and unit tests.
- Python Basics, Imports and Modules explains the three import forms, what a package is, how Python searches sys.path for code, and how to load a module safely at runtime when you are not sure it is installed.
- Python Basics, Essential Libraries walks through the ten imports a quant reaches for most often and what each one does, from numpy and pandas through scipy and scikit learn down to the standard library staples math, datetime, random, and json.
Also
- 18 new unit tests bring the suite to 551 passing, up from 533.
- The docs site auto extends to 118 modules and passes the strict documentation build.
118 modules and 551 tests passing.
Learn-Quant v2.9.0
What's New in v2.9.0
Three new from-scratch modules — each with a README, runnable demo, and unit tests:
- Options Pricing - Binomial Tree — the Cox-Ross-Rubinstein lattice: prices European and American calls/puts, converges to Black-Scholes as steps grow, plus bisection implied vol.
- Quantitative Methods - Markov Chains — transition matrices, n-step powers, stationary distributions, expected return times, and path simulation for market-regime modelling.
- Machine Learning - Logistic Regression — probabilistic classification: numerically-stable sigmoid, log-loss, gradient descent with L2, and the standard metrics, applied to up/down-day prediction.
Also
- 28 new unit tests bring the suite to 533 passing (up from 505).
- Fixed a Windows
cp1252console crash in the NumPy / Pandas / Comprehensions tutorial demos. - Docs site auto-extends to 116 modules and passes
mkdocs build --strict.
116 modules · 533 tests passing
v2.8.0 - Dates & Times, Numerical Methods, Bayesian Inference & K-Means
Learn-Quant v2.8.0
Four new self-contained lessons, each shipping a README, a runnable implementation, and unit tests — spanning the curriculum from Python fundamentals to unsupervised machine learning.
Four new modules
- Python Basics - Dates and Times - trading-day counting (weekends + holidays), T+N settlement, and the ACT/365, ACT/360 and 30/360 day-count conventions every dated calculation relies on.
- Quantitative Methods - Numerical Methods - bisection, Newton-Raphson and secant root finders, central-difference derivatives, and trapezoid/Simpson integration, all built from first principles.
- Quantitative Methods - Bayesian Inference - Beta-Binomial and Normal-Normal conjugate updating, credible intervals, and shrinkage of noisy return estimates.
- Machine Learning - K-Means Clustering - k-means++ from scratch, inertia/elbow and silhouette scoring to choose k, applied to asset clustering.
Repository
- 113 modules (up from 109), 127 Python lesson files.
- 505 tests passing (up from 459) - 46 new unit tests across the four modules.
- Docs site auto-extends to the new lessons and passes
mkdocs build --strict; lint and format checks pass clean.
Full changelog: v2.7.0...v2.8.0
v2.7.0 - Docs Site Overhaul, New Modules & Test-Suite Repair
Learn-Quant v2.7.0
Documentation site overhauled
- Hand-built landing page, card-grid module index, and new guides: Getting Started, Learning Paths, Glossary, FAQ.
- Every module page now carries difficulty/language badges, a copy-paste run command, a source link, and "see also" related-module cards.
- Cross-module links now resolve on the site (fixed 26 broken links); upgraded theme (instant nav, palette toggle) and branded CSS.
Four new modules (README + implementation + tests)
- Strategies - Backtesting Engine - look-ahead-free, cost-aware vectorised backtester (CAGR, Sharpe, Sortino, drawdown, Calmar, turnover).
- Quantitative Methods - Extreme Value Theory - Peaks-Over-Threshold GPD fitting, EVT VaR/ES, Hill estimator.
- Finance - Implied Volatility Surface - Black-Scholes IV inversion (Newton + bisection) and an interpolated vol surface with skew/term structure.
- Machine Learning - Feature Engineering - stationary feature matrix, triple-barrier labelling, leak-free purged train/test split.
Improved existing lessons
- Value at Risk (VaR) - added historical, Monte Carlo and Conditional VaR plus a Kupiec backtest (was parametric-only).
- CAPM - added Jensen's alpha, beta estimation and the security market line.
Test suite repaired and expanded
- Fixed stale import paths across the suite; 459 tests now pass (up from 65), 0 failures.
Full module count: 109 across 12 categories.
v2.5.0 - Fixed Linting Issues
Full Changelog: v2.4.0...v2.5.0
v2.4.0 - Renamed Utilities and New Quant Models
Full Changelog: v2.3.0...v2.4.0
v2.3.0 - Advanced Quant Modules
Highlights
Five new advanced quant modules. Lint clean (0 errors). 392 tests pass. Pages deploy fixed.
New Modules
| Module | Capability |
|---|---|
GARCH (UTILS - Quantitative Methods - GARCH) |
EWMA + GARCH(1,1) MLE fit, multi-step variance forecast |
Cointegration (UTILS - Quantitative Methods - Cointegration) |
ADF unit-root, Engle-Granger two-step, OU half-life, rolling z-score |
Performance Attribution (UTILS - Finance - Performance Attribution) |
Brinson-Hood-Beebower 3-factor + 2-factor, information ratio, tracking error |
Stress Testing (UTILS - Risk Metrics - Stress Testing) |
Hypothetical + historical scenario engine (2008 GFC, 2020 COVID, 1987, dotcom, 2022), reverse stress, sensitivity |
Trend Following (UTILS - Strategies - Trend Following) |
Donchian breakout (Turtles), MA crossover, time-series momentum (MOP 2012), ATR-based volatility position sizing |
Fixes
- Resolved 27 ruff lint errors across 16 existing modules + tests (I001 import order, F541 placeholder-less f-strings, B904 raise-from, E741, C401, C408, F401)
- Rewrote
.github/workflows/pages.ymlto useactions/upload-pages-artifact+actions/deploy-pages(fixesgh-deploy --forcerejection against the protectedgh-pagesbranch) - Bumped Python in CI from 3.10 to 3.11
Stats
- Tests: 392 passed, 1 skipped, 0 failures
- Lint:
ruff check .clean - Format:
ruff format --check .clean
Install
git clone https://github.com/MeridianAlgo/Learn-Quant
cd Learn-Quant
pip install -r requirements.txt
pytestv2.2.0: 13 New Quant Finance Modules
What's New
13 New Modules
- Expected Shortfall (CVaR) — Historical, parametric, Cornish-Fisher ES
- Duration & Convexity — Macaulay/Modified duration, DV01, convexity
- Black-Litterman — Bayesian portfolio optimization with investor views
- Market Making — Avellaneda-Stoikov optimal bid-ask model
- Regime Detection — GMM, MA crossover, volatility regime classifiers
- Drawdown Analysis — Max DD, Calmar ratio, Ulcer Index, UPI
- Kelly Criterion — Discrete, continuous, fractional, multi-asset Kelly
- Covariance Estimation — Ledoit-Wolf shrinkage, constant correlation, EWMA
- Interest Rate Models — Vasicek and CIR with closed-form bond pricing
- Exotic Options — Monte Carlo barrier, Asian, lookback options
- Merton Credit Model — Distance-to-default, PD, credit spread
- FX Tools — Forward rates, CIP deviation, Garman-Kohlhagen FX options
- Transaction Cost Analysis — VWAP/TWAP, implementation shortfall, Almgren-Chriss
Tests
122 new tests, all passing.
v2.1.0 - Interactive Quiz-Based Tutorials
What is New in v2.1.0
Four new interactive, quiz-based Python tutorials. Run them from the terminal to learn with live worked examples and immediate quiz feedback.
New Tutorials
- statistics_tutorial.py (UTILS - Quantitative Methods - Statistics): Normal distribution, Z-scores, correlation, hypothesis testing, skewness/kurtosis
- options_tutorial.py (UTILS - Black-Scholes Option Pricing): Black-Scholes formula, all five Greeks, put-call parity, implied volatility
- risk_tutorial.py (UTILS - Risk Metrics): Historical and parametric VaR, CVaR/Expected Shortfall, drawdown, Sharpe and Sortino ratios
- portfolio_tutorial.py (UTILS - Portfolio Optimizer): Portfolio variance, efficient frontier, Sharpe maximisation, MPT limits
How to Use
Run any tutorial directly:
python statistics_tutorial.py
python options_tutorial.py
python risk_tutorial.py
python portfolio_tutorial.py
Press ENTER to advance sections and type A/B/C/D to answer quiz questions.
Tests
91 new tests added (222 total passing, 0 failures).