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:

  1. Approximate a derivative → divided differences → grid marching. → Finite-Difference Methods.
  2. Approximate an integral / expectation → sampling → Monte Carlo. → Monte Carlo.
  3. Find a root or a minimum → iteration → Newton/quasi-Newton. → Numerical Optimization.
  4. Solve a linear system / eigenproblem → factorisation or iteration. → Numerical Linear Algebra.
  5. 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.

FamilyDiscretisesError knobAsymptotic errorCost per unit accuracy
Divided difference / FDMa derivative / a PDE on a meshmesh (space), (time); centred , one-sided cheap per point, but scales badly with dimension ()
Monte Carloan integral / expectationsamples , independent of work per halving of error
Deterministic quadraturean integralnodes trapezoid in 1-D, in exact but cursed by dimension
Root / optimisation iterationa zero / an extremumiterationsbisection 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):

SchemeTime orderStability (heat / BS)Solve per step
Explicit Eulerconditional: none (matrix-free)
Implicit Eulerunconditionaltridiagonal LU
Crank–Nicolsonunconditional, but ⇒ ringingtridiagonal LU
Extrapolated implicit Euler-unconditional, no ringing ()2 LU solves
Rannacher (2 implicit steps then CN)mixedunconditional, ringing suppressedtridiagonal 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 methodEstimator / parameterVariance factor
Control variate,
Antithetic; works iff
Stratified (proportional); Neyman never worse than plain MC
Latin hypercubestratify each marginal into bins (Owen)
Importance samplingcan be if $g\propto

Lookup 4 - the numerical linear-algebra and optimisation kernels.

TaskMethodCostGuarantee
Solve tridiagonal Thomas (LU)exact in exact arithmetic
Solve dense LU / Cholesky (SPD)
Large sparse SPD conjugate gradient steps exact; fast if small
Dominant eigenvaluepower iterationrate $
Root of Newton quadratic, ~1 solve/stepquadratic convergence near a simple root
Minimise gradient descent / NewtonGD linear rate ; Newton quadraticGD 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:

  1. 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).
  2. 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).
  3. 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).
  4. 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).
  5. 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

Beginner: start at 01 · Practitioner: start at 05