Courses Mathematical Foundations for Quant Finance
Mathematical Foundations for Quant Finance
Algebra, calculus, linear algebra, probability and differential equations, each taught with the finance it is used for. A Proof Gym runs alongside for learners who want to read and write proofs.
- 7 levels
- 49 modules
- 256 lessons
- About 164 hours
- Before you start: School algebra and basic Python
Your progress
0 of 256 lessons
Start here
0.2.1 Symbols, sets and function notation
Concept · About 15 minutes
How each module works
- 1Concept lessonsOne idea at a time, with runnable code
- 2Practice setQuick questions with instant feedback
- 3Case studiesThe ideas applied to real finance problems
Level 0 · About 6 hours
Orientation and fluency
Rebuild algebra fluency and learn to read the symbols in a formula; the placement check lets you skip what is solid.
0 of 9 lessons
0.1Placement checkSkip what you know
- You will learn:
- One or two questions for each module of Levels 0 to 6, Each module marked skip, review or learn.
- Applied to:
- Your map of Foundations, so you can skip what you know and test out of a level for your track
0.2Reading maths4 lessons
- You will learn:
- Σ and Π, indices, ∈ ∀ ∃ and function notation, 'let' and 'such that', Translating a formula into code.
- Applied to:
- Portfolio return Σ wᵢrᵢ and net present value written as sums
- In Python:
- Write NPV three ways (loop, comprehension, NumPy) and check they agree
0.3Algebra fluency5 lessons
- You will learn:
- Fractions and percentages, Order of operations, Rearranging equations, Inequalities, Absolute value.
- Applied to:
- Rearranging simple-interest and break-even formulas
- In Python:
- SymPy as your answer-checker
Level 1 · About 18 hours
Precalculus
Functions, roots, exponents, logarithms and series. Each module teaches the rules first, then applies them to bonds, returns and payoffs.
0 of 34 lessons
1.1Functions and graphs5 lessons
- You will learn:
- Domain and range, Transformations, Piecewise functions, Composition, Inverses.
- Applied to:
- Option payoff diagrams; price and yield as inverse functions
- In Python:
- Plot call, put and straddle payoffs from one function
1.2Lines and quadratics4 lessons
- You will learn:
- Slope and intercept, Completing the square, Vertex of a parabola.
- Applied to:
- Security market line; portfolio variance as a parabola in the weight
- In Python:
- Find the minimum-variance weight of a two-asset portfolio
1.3Equations and roots5 lessons
- You will learn:
- Polynomials and their roots, Bisection, Newton's method (preview).
- Applied to:
- Internal rate of return and yield to maturity as roots
- In Python:
- Write bisection from scratch, then compare with scipy.optimize.brentq
1.4Exponents and logarithms7 lessons
- You will learn:
- Exponent rules, Exponential functions and , Logarithms as the inverse of exponentials, Log rules, Solving for an unknown exponent.
- Applied to:
- Compounding conventions, continuous rates, simple and log returns
- In Python:
- Check each rule numerically; convert between compounding conventions; compute and add up returns
- 1.4.1 Exponents and their rulesConcept25 min
- 1.4.2 Exponential functions and the number eConcept25 min
- 1.4.3 Logarithms and their rulesConcept25 min
- 1.4.4 Solving exponential and logarithmic equationsConcept25 min
- 1.4.5 Practice set: exponents and logarithmsPractice set25 min
- 1.4.6 Case study: compounding and continuous ratesCase study35 min
- 1.4.7 Case study: simple returns and log returnsCase study30 min
1.5Sequences and series5 lessons
- You will learn:
- Sequences, Arithmetic and geometric series, Working with Σ, Convergence intuition.
- Applied to:
- Annuities, perpetuities and bond prices from scratch
- In Python:
- Price a bond with a loop, then with the closed-form annuity formula
1.6Interpolation4 lessons
- You will learn:
- Linear interpolation, Cubic-spline interpolation.
- Applied to:
- Building a zero curve from par yields
- In Python:
- scipy.interpolate on a realistic yield curve
1.7Trigonometry and complex numbers4 lessons
- You will learn:
- Unit circle, Sine and cosine, Complex numbers, Euler's formula .
- Applied to:
- The groundwork for Fourier methods in option pricing
- In Python:
- Plot on the unit circle
Level 2 · About 30 hours
Single-variable calculus
Limits, derivatives and integrals as rules you can use, then as the language of sensitivity in duration, convexity and the Greeks.
0 of 40 lessons
2.1Limits and continuity5 lessons
- You will learn:
- Intuitive limits, One-sided limits, Continuity, Limits at infinity.
- Applied to:
- Continuous compounding as the limit of (1 + r/n)ⁿ
- In Python:
- Tabulate and plot a limit numerically
2.2The derivative4 lessons
- You will learn:
- Rate of change, Tangent slope, Definition as a limit, Finite-difference estimate.
- Applied to:
- Bond price sensitivity to yield; duration as a derivative
- In Python:
- Estimate dP/dy by bumping the yield
2.3Differentiation rules7 lessons
- You will learn:
- Power, product, quotient and chain rules, Derivatives of exp and log, Derivatives of sine and cosine.
- Applied to:
- Modified duration; elasticity
- In Python:
- Check every hand derivative with SymPy
- 2.3.1 Power, constant and sum rulesConcept25 min
- 2.3.2 Product and quotient rulesConcept25 min
- 2.3.3 The chain ruleConcept30 min
- 2.3.4 Derivatives of exponentials and logarithmsConcept30 min
- 2.3.5 Derivatives of sine and cosineConcept35 min
- 2.3.6 Practice set: differentiationPractice set25 min
- 2.3.7 Case study: modified duration and elasticityCase study30 min
2.4Using derivatives6 lessons
- You will learn:
- Maxima and minima, Concavity, Second derivative, Newton's method.
- Applied to:
- Convexity; risk aversion as the curvature of utility; solving for yield and implied volatility
- In Python:
- Implement Newton's method for implied volatility
- 2.4.1 Maxima and minimaConcept25 min
- 2.4.2 Concavity and the second derivativeConcept25 min
- 2.4.3 Newton's method with derivativesConcept30 min
- 2.4.4 Practice set: using derivativesPractice set25 min
- 2.4.5 Case study: convexity and risk aversionCase study30 min
- 2.4.6 Case study: implied volatility by Newton's methodCase study30 min
2.5Integration5 lessons
- You will learn:
- Riemann sums, Antiderivatives, Fundamental Theorem of Calculus.
- Applied to:
- Present value of a continuous cash-flow stream; area under a density
- In Python:
- Riemann sums converging to an exact integral
2.6Integration techniques5 lessons
- You will learn:
- Substitution, Integration by parts, Improper integrals, The Gaussian integral.
- Applied to:
- The normal-distribution integrals behind Black–Scholes
- In Python:
- scipy.integrate.quad against closed forms
2.7Taylor series4 lessons
- You will learn:
- Taylor polynomials, The size of the error, Standard series for eˣ, ln(1 + x), sin x and cos x.
- Applied to:
- Duration–convexity and delta–gamma approximations
- In Python:
- Measure approximation error as the shock grows
2.8Numerical calculus4 lessons
- You will learn:
- Forward, backward and central differences, Trapezoid and Simpson rules, Error against step size.
- Applied to:
- Bump-and-reprice Greeks; numerical present values
- In Python:
- Plot error against step size on a log-log chart
Level 3 · About 22 hours
Linear algebra
Vectors and matrices as objects you can picture and compute with, then as portfolios, covariance and factor models.
0 of 34 lessons
3.1Vectors4 lessons
- You will learn:
- Addition and scaling, Dot product, Length and angle, Orthogonality.
- Applied to:
- Portfolio return as w·r; correlation as the cosine of an angle
- In Python:
- NumPy vectors and the dot product
3.2Matrices5 lessons
- You will learn:
- Multiplication, Transpose, Identity and inverse, A matrix as a linear map.
- Applied to:
- The covariance matrix; portfolio variance wᵀΣw
- In Python:
- Portfolio variance three ways
3.3Linear systems4 lessons
- You will learn:
- Gaussian elimination, Rank, Solution sets.
- Applied to:
- Replicating a payoff; when a market is complete
- In Python:
- numpy.linalg.solve and matrix_rank
3.4Determinants3 lessons
- You will learn:
- Volume scaling, Invertibility test.
- Applied to:
- Spotting redundant assets in a payoff matrix
- In Python:
- Determinants of near-singular covariance matrices
3.5Spaces and projections5 lessons
- You will learn:
- Span, Basis, Independence, Orthogonal projection, Least squares.
- Applied to:
- Regression as a projection; the minimum-variance hedge
- In Python:
- Least squares by projection and by numpy.linalg.lstsq
3.6Eigenvalues and eigenvectors5 lessons
- You will learn:
- Characteristic polynomial, Diagonalisation, Spectral theorem for symmetric matrices.
- Applied to:
- Principal components of the yield curve: level, slope, curvature
- In Python:
- numpy.linalg.eigh on a yield-change covariance matrix
3.7Positive definiteness and Cholesky4 lessons
- You will learn:
- Quadratic forms, Positive definite and semidefinite tests, Cholesky factorisation.
- Applied to:
- Valid correlation matrices; simulating correlated returns
- In Python:
- Simulate correlated normals and check the sample correlation
3.8Singular value decomposition (optional)4 lessons
- You will learn:
- Singular value decomposition, Low-rank approximation.
- Applied to:
- Compressing a factor model
- In Python:
- Rank-k approximation of a returns matrix
Level 4 · About 20 hours
Multivariable calculus and optimisation
Partial derivatives, gradients and constrained optimisation, then the Greeks and portfolio choice.
0 of 32 lessons
4.1Functions of several variables4 lessons
- You will learn:
- Surfaces and level curves, Partial derivatives.
- Applied to:
- Option value V(S, σ, t); the Greeks as partial derivatives
- In Python:
- Surface plot of an option value
4.2Gradient and chain rule4 lessons
- You will learn:
- Gradient, Directional derivative, Multivariable chain rule, Total differential.
- Applied to:
- Attributing P&L to risk factors
- In Python:
- Attribute a P&L move to each factor
4.3Second order4 lessons
- You will learn:
- Hessian, Multivariable Taylor expansion, Saddle points.
- Applied to:
- Delta–gamma–vega P&L approximation
- In Python:
- Compare the approximation with full revaluation
4.4Unconstrained optimisation5 lessons
- You will learn:
- First- and second-order conditions, Gradient descent, Newton's method in several variables.
- Applied to:
- Fitting a curve by least squares
- In Python:
- Gradient descent from scratch against scipy.optimize.minimize
4.5Constrained optimisation5 lessons
- You will learn:
- Lagrange multipliers, KKT intuition, Convexity.
- Applied to:
- Minimum-variance portfolio; efficient frontier; two-fund theorem
- In Python:
- Closed-form frontier against a numerical optimiser
- 4.5.1 Lagrange multipliersConcept30 min
- 4.5.2 Inequality constraints and the KKT conditionsConcept30 min
- 4.5.3 Convex functions and convex problemsConcept30 min
- 4.5.4 Practice set: constrained optimisationPractice set25 min
- 4.5.5 Case study: the minimum-variance portfolio and the efficient frontierCase study35 min
4.6Portfolio theory5 lessons
- You will learn:
- Utility, Mean–variance, CAPM derivation, Sharpe ratio.
- Applied to:
- The tangency portfolio
- In Python:
- Derive it, then confirm with scipy.optimize
4.7Multiple integrals5 lessons
- You will learn:
- Double integrals, Change of variables, Jacobian, Polar coordinates.
- Applied to:
- Joint densities; why the Gaussian integral equals √π
- In Python:
- Monte Carlo against exact double integrals
Level 5 · About 35 hours
Probability and statistics
Random variables, conditional expectation and limit theorems made routine, then estimation and regression on return data.
0 of 55 lessons
5.1Probability basics6 lessons
- You will learn:
- Sample space and events, Axioms, Counting, Conditional probability, Bayes' rule, Independence.
- Applied to:
- Default and rating-migration probabilities
- In Python:
- Simulate and count
- 5.1.1 Sample spaces, events and the axioms of probabilityConcept30 min
- 5.1.2 CountingConcept30 min
- 5.1.3 Conditional probability and independenceConcept30 min
- 5.1.4 Bayes' ruleConcept25 min
- 5.1.5 Practice set: probabilityPractice set25 min
- 5.1.6 Case study: default and rating-migration probabilitiesCase study35 min
5.2Discrete random variables5 lessons
- You will learn:
- PMF and CDF, Bernoulli, Binomial, Geometric, Poisson.
- Applied to:
- One-period binomial asset model; counting defaults
- In Python:
- scipy.stats discrete distributions
- 5.2.1 Random variables, PMFs and CDFsConcept25 min
- 5.2.2 Bernoulli, binomial and geometric distributionsConcept30 min
- 5.2.3 The Poisson distributionConcept30 min
- 5.2.4 Practice set: discrete distributionsPractice set25 min
- 5.2.5 Case study: the one-period binomial model, and counting defaultsCase study35 min
5.3Expectation and moments5 lessons
- You will learn:
- Expectation, LOTUS, Variance, Skewness, Kurtosis, Linearity.
- Applied to:
- Return moments; why kurtosis matters for value at risk
- In Python:
- Sample moments of simulated and realistic returns
5.4Continuous distributions6 lessons
- You will learn:
- PDF, Uniform, Exponential, Normal, Lognormal, Student t, χ².
- Applied to:
- Lognormal prices; fat-tailed returns
- In Python:
- Fit and compare densities
- 5.4.1 Densities, distribution functions and the uniform distributionConcept30 min
- 5.4.2 The exponential distributionConcept25 min
- 5.4.3 The normal distributionConcept30 min
- 5.4.4 The lognormal, Student t and chi-squared distributionsConcept30 min
- 5.4.5 Practice set: continuous distributionsPractice set25 min
- 5.4.6 Case study: lognormal prices and fat-tailed returnsCase study35 min
5.5Joint distributions5 lessons
- You will learn:
- Joint, marginal and conditional distributions, Covariance and correlation, Independence, Multivariate normal.
- Applied to:
- Portfolio risk; a first look at conditional expectation E[X | Y]
- In Python:
- Simulate a bivariate normal and estimate E[X | Y]
- 5.5.1 Joint, marginal and conditional distributionsConcept30 min
- 5.5.2 Covariance, correlation and independenceConcept35 min
- 5.5.3 The multivariate normal distributionConcept35 min
- 5.5.4 Practice set: joint distributionsPractice set25 min
- 5.5.5 Case study: portfolio risk and conditional expectationCase study35 min
5.6Transformations and generating functions5 lessons
- You will learn:
- Functions of random variables, Jacobian method, Moment generating function, Characteristic function, Sums of random variables.
- Applied to:
- Lognormal from normal; sums of independent normals
- In Python:
- Check a transformed density by simulation
5.7Inequalities and limit theorems5 lessons
- You will learn:
- Markov, Chebyshev, Jensen, Law of large numbers, Central limit theorem.
- Applied to:
- Monte Carlo error shrinks like 1/√N
- In Python:
- Watch the central limit theorem emerge
5.8Statistical inference5 lessons
- You will learn:
- Estimators, Bias and consistency, Sampling distributions, Confidence intervals, Hypothesis tests.
- Applied to:
- Is this Sharpe ratio significant?
- In Python:
- Bootstrap against analytic confidence intervals
5.9Maximum likelihood4 lessons
- You will learn:
- Likelihood, Log-likelihood, Maximum likelihood estimator, Fisher information, Standard errors.
- Applied to:
- Calibrate a Student t to daily returns
- In Python:
- Write the log-likelihood and maximise it
5.10Linear regression5 lessons
- You will learn:
- OLS in scalar and matrix form, Assumptions, t and F tests, Multiple regression.
- Applied to:
- Beta estimation; hedge ratios
- In Python:
- OLS by hand with NumPy and scipy.stats
5.11Discrete-time processes4 lessons
- You will learn:
- Random walks, Markov chains, The binomial tree as a process.
- Applied to:
- Multi-step binomial option pricing
- In Python:
- Build and price on a recombining tree
Level 6 · About 14 hours
Differential equations
The ODE and PDE essentials, solved by hand and numerically, then used for bond prices and option-pricing grids.
0 of 20 lessons
6.1First-order ODEs4 lessons
- You will learn:
- Separable equations, Linear equations, Integrating factors.
- Applied to:
- Bond price under a deterministic short rate; continuous dividends
- In Python:
- scipy.integrate.solve_ivp against the exact solution
6.2Second-order linear ODEs4 lessons
- You will learn:
- Constant coefficients, Characteristic equation, General solution.
- Applied to:
- The perpetual American put
- In Python:
- Solve and plot the boundary-value problem
6.3PDE basics4 lessons
- You will learn:
- What a PDE is, Boundary, initial and terminal conditions.
- Applied to:
- Option value V(S, t) pinned down by its payoff at expiry
- In Python:
- Visualise a solution surface
6.4The heat equation4 lessons
- You will learn:
- Diffusion intuition, Fundamental solution, Change of variables.
- Applied to:
- Transform Black–Scholes into the heat equation
- In Python:
- Simulate diffusion of heat and of probability
6.5Finite differences for PDEs4 lessons
- You will learn:
- Explicit scheme, Implicit scheme, Crank–Nicolson, Stability.
- Applied to:
- Price a European option on a grid
- In Python:
- Match the closed form within 1 cent
Proof Gym
About 19 hours, one session a week alongside the levels. Proofs live here, not in the lessons. Weekly practice in four formats (reorder the steps, fill the gap, find the error, write it yourself), so a proof-based course feels like a step, not a cliff.
PG1 · alongside Levels 0–1
Logic and languageExample: Negate "the fund beats the index every year" correctly
PG2 · alongside Levels 1–2
Proof techniquesExample: √2 is irrational; the exponent and log rules from Level 1, proved
PG3 · alongside Levels 1–2
InductionExample: The geometric-series and annuity formulas
PG4 · alongside Level 2
ε–δ limitsExample: (1 + 1/n)ⁿ converges
PG5 · alongside Level 2
Series and convergenceExample: The Taylor series of eˣ converges for every x
PG6 · alongside Levels 3–5
Sets and functionsExample: Why infinitely many coin tosses needs measure theory
32 lessons in 6 stages. Each one checks a claim with numbers first, then proves it.