Basic Prerequisites: Linear Algebra & Matrices, Multivariable Calculus & Optimization, and Probability & Measure Theory. (these are the folder-level prerequisites for pages 02–06; page 01 states its own, smaller, entry requirements)
1. Intuition & Practical Objective
Almost nothing closed-form survives contact with a real problem. The moment a model has a free boundary, a jump, a stochastic volatility, a non-linear constraint, or more than two state variables, the analytic solution disappears and the answer must be computed. Numerical methods are the discipline of computing those answers with a known, quantifiable error.
This folder is the general numerical-methods toolbox - the core techniques that any quantitative field needs, independent of the specific model. It is deliberately model-agnostic: the same finite-difference machinery solves the heat equation and the Black–Scholes PDE; the same Monte Carlo estimator prices an option and evaluates a risk integral; the same Newton iteration finds a root and minimises a loss.
Everything reduces to five primitive operations:
- Approximate a derivative → divided differences → grid marching. → Finite-Difference Methods.
- Approximate an integral / expectation → sampling → Monte Carlo. → Monte Carlo.
- Find a root or a minimum → iteration → Newton/quasi-Newton. → Numerical Optimization.
- Solve a linear system / eigenproblem → factorisation or iteration. → Numerical Linear Algebra.
- Interpolate / approximate a function → basis expansion.
This page is the hub: it gives the fast error-order and cost lookup below and routes you to six sub-pages that build each primitive from first principles, quantify its error, and show the failure modes it violates.
The one-sentence essence. “Every numerical method trades work against error, and its quality is decided by two numbers - the order with which the error vanishes as the mesh/further refinement shrinks, and the conditioning that amplifies the input noise - so know both before trusting a digit.”
2. Mathematical Ground Truth & Derivations
Lookup 1 - the three ways to approximate, and their error laws. Each family has exactly one error knob; knowing the order of the error is the whole discipline.
| Family | Discretises | Error knob | Asymptotic error | Cost per unit accuracy |
|---|---|---|---|---|
| Divided difference / FDM | a derivative / a PDE on a mesh | mesh (space), (time) | ; centred , one-sided | cheap per point, but scales badly with dimension () |
| Monte Carlo | an integral / expectation | samples | , independent of | work per halving of error |
| Deterministic quadrature | an integral | nodes | trapezoid in 1-D, in | exact but cursed by dimension |
| Root / optimisation iteration | a zero / an extremum | iterations | bisection linear; Newton quadratic; GD linear rate | one linear solve per Newton step |
The single most important comparison in all of computational finance: Monte Carlo is in every dimension, whereas deterministic quadrature is . For the sampling route wins outright (Glasserman §1.1).
Lookup 2 - the finite-difference schemes. Writing the one-factor parabolic operator as and the -method weight on the new time level (Duffy eqs. 6.17–6.19, 7.4):
| Scheme | Time order | Stability (heat / BS) | Solve per step | |
|---|---|---|---|---|
| Explicit Euler | conditional: | none (matrix-free) | ||
| Implicit Euler | unconditional | tridiagonal LU | ||
| Crank–Nicolson | unconditional, but ⇒ ringing | tridiagonal LU | ||
| Extrapolated implicit Euler | - | unconditional, no ringing () | 2 LU solves | |
| Rannacher (2 implicit steps then CN) | mixed | unconditional, ringing suppressed | tridiagonal LU |
Von Neumann amplification factor (Duffy eqs. 8.35, 8.38, 8.39), with and frequency :
The triangle that governs everything (Duffy Defs. 8.1–8.4 + Thm 8.1): consistency (truncation error ) stability () convergence - the Lax equivalence theorem.
Lookup 3 - the Monte Carlo estimator and its error (Glasserman eqs. 1.1–1.8):
| Variance-reduction method | Estimator / parameter | Variance factor |
|---|---|---|
| Control variate | , | |
| Antithetic | ; works iff | |
| Stratified (proportional) | ; Neyman | never worse than plain MC |
| Latin hypercube | stratify each marginal into bins | (Owen) |
| Importance sampling | can be if $g\propto |
Lookup 4 - the numerical linear-algebra and optimisation kernels.
| Task | Method | Cost | Guarantee |
|---|---|---|---|
| Solve tridiagonal | Thomas (LU) | exact in exact arithmetic | |
| Solve dense | LU / Cholesky (SPD) | ||
| Large sparse SPD | conjugate gradient | steps exact; fast if small | |
| Dominant eigenvalue | power iteration | rate $ | |
| Root of | Newton | quadratic, ~1 solve/step | quadratic convergence near a simple root |
| Minimise | gradient descent / Newton | GD linear rate ; Newton quadratic | GD needs ; Newton needs |
Lookup 5 - the discrete condition of a root/root-finding and the round-off floor. For any difference formula the total error is truncation plus round-off ; the sum is minimised at (Conte & de Boor give for the second difference). Below that, shrinking the step makes the answer worse.
3. Computational Implementation - the three primitives on one screen
One script, stdlib only, showing the three things numerical methods actually do: solve a PDE, estimate an expectation, invert a non-linear function.
4. Failure Modes & First-Principles Breakdowns
Hub signposts - the full first-principles analysis lives on the sub-pages. In one line each:
- Stability is a property of the discretisation, not the formula. The explicit heat scheme is correct and useless outside : the same code that returns at returns at (page 02; sign is chaotic near blow-up).
- Second-order accuracy is not the same as “well-behaved”. Crank–Nicolson is unconditionally stable, yet goes negative at high frequencies, producing spurious oscillations near kinks/strikes (Duffy Ch 33).
- Monte Carlo’s does not distinguish bias from variance. Discretising an SDE adds an bias on top of the sampling error; the fix is a better scheme or MSE balancing, not more paths (Glasserman §1.1.3, 6.3.3).
- Conditioning, not the algorithm, sets the achievable digits. At , a perturbation to the right-hand side moves the solution by - no factorisation can recover what the conditioning destroyed (page 05).
- Round-off imposes a floor. The centred difference of at degrades from at back to at (page 01).
5. References
- Duffy, Daniel J.: Finite Difference Methods in Financial Engineering (Wiley, 2006)
- Glasserman, Paul: Monte Carlo Methods in Financial Engineering (Springer, 2004)
- Tsay, Ruey S.: Analysis of Financial Time Series (3rd ed., 2010)
- Golub, G. H. & Van Loan, C. F.: Matrix Computations
- Nocedal, J. & Wright, S. J.: Numerical Optimization
- Hull, John C.: Options, Futures, and Other Derivatives (11th ed.)
6. Connected Graph Bridges
- Foundational base: Linear Algebra · Multivariable Calculus & Optimization · Probability & Measure Theory
- Applied destination: Derivative-Pricing Numerical Methods - the pricing-specific application of exactly these tools
- Sub-pages (in-folder): 01 From Zero · 02 Finite Differences · 03 Monte Carlo · 04 Numerical Optimization · 05 Numerical Linear Algebra · 06 Advanced Extensions