Roadmap Start learning
QR01IntermediateQuant ResearcherEasy
Python for Quantitative Research
NumPy, pandas and SciPy, vectorisation and numerical stability: writing research code that is fast, correct and readable.
1.4 h of lessons~1.9 h of practice across 10 problems
Prerequisites not done
Lessons0 / 5 lessons
Mastery · target 80%0 / 10 solved
Completing the lessons finishes the module. Mastery also needs 80% of its problems solved.
What you will be able to do
- Replace Python loops with vectorised NumPy operations and explain the speed-up
- Reshape, join and resample time-indexed data with pandas
- Compute rolling and exponentially weighted statistics correctly at the edges
- Avoid catastrophic cancellation and overflow in numerical code
- Structure a research notebook so results are reproducible
Before you start
Prerequisites: this module uses their material directly.
Lessons
1.NumPy and VectorisationArrays, dtypes and integer overflow, the broadcasting rules, axis arguments, views versus copies, boolean masks, and how to reason about whether vectorised code is actually faster.17m2.pandas for Time SeriesDatetimeIndex slicing, resampling, rolling and ewm windows and their min_periods behaviour, shift and pct_change without look-ahead, per-ticker groupby, merge_asof for as-of joins, and missing data.19m3.SciPy: Optimisation, Statistics, Linear Algebrascipy.optimize (minimize with bounds and constraints, root_scalar, curve_fit), scipy.stats distributions and tests and how to read them, and scipy.linalg solve and Cholesky instead of explicit inverses.18m4.Numerical Stability in Research CodeLog-sum-exp, stable softmax and log-likelihoods, mergeable Welford variance for chunked data, condition numbers and why the normal equations square them, and when float32 is and is not safe.17m5.Reproducible Research WorkflowsSeeding with numpy's Generator and SeedSequence, pinning environments, sources of hidden nondeterminism, separating data, code and results, notebooks versus modules, and tests that catch look-ahead.16m
Practice problems (10)
- Best Single Round TripEasy
- Why Divide by n − 1?Medium
- Regressing Both WaysMedium
- Two-Asset Minimum-Variance PortfolioMedium
- Maximum DrawdownMedium
- EWMA Volatility FilterMedium
- Exact Dice-Sum ProbabilitiesMedium
- Standard Error of a Monte Carlo πMedium
- Implied Volatility by BisectionHard
- Monte Carlo European CallHard
Where this module fits
- Quant Trader: Not on the default path; recommended for Systematic Trading
- Quant Researcher: Required
- Quant Developer: Recommended; required for Python Research Engineering