Basic Prerequisites: 03 · Itô Integral & Doeblin.


1. Intuition & Practical Objective

An SDE is a definition of a stochastic process by its differential:

read rigorously as an integral equality . The Drift sets the expected growth; Diffusion sets the random spread and (because then ) feeds back into Itô–Doeblin computations.

Practical objective: three workhorse SDEs drive all of quantitative finance -

  • GBM (equities, indices; closed-form lognormal solution),
  • Vasicek (Gaussian mean-reversion; interest rates, closed form),
  • CIR (mean-reversion with vol proportional to ; no closed form, stays nonnegative under the Feller condition).

The whole point of this page: know which SDEs have exact transitions (simulate without error) vs which need discrete schemes (Euler–Maruyama, Milstein) - and what each scheme gets wrong.


2. Mathematical Ground Truth & Derivations

2.1 GBM - closed-form solution (Shreve I §15.3; Björk Prop 5.2; Glasserman §3.2)

Exact transition (Glasserman eq 3.20–3.22), correct on every grid point with no discretization error:

The Euler–Maruyama scheme has an easier-to-see but biased form, especially for coarse - the “simulate exact, not Euler, whenever possible” rule.

2.2 Vasicek - Gaussian, closed form (Shreve II Ex 4.4.10; Glasserman §3.3)

As a Gaussian process: mean , variance . Exact transition (Glasserman eq 3.43–3.45):

Long-run mean ; can go negative (unlike CIR).

2.3 CIR - no closed form, nonnegative (Shreve II Ex 4.4.11; Glasserman §3.4)

Expectation identical to Vasicek ; the variance grows to . The diffusion at the origin, so with the drift pushes back up - stays nonnegative. Feller condition ⇒ strictly positive (Glasserman §3.4).

Because there is no closed-form transition, CIR simulation uses exact noncentral- sampling (Glasserman eq 3.105: “degrees of freedom”, , noncentrality ) or a well-behaved Milstein scheme; plain Euler undershoots below zero.


3. Computational Implementation - exact vs Euler, and the Feller cliff

Stdlib block that (a) confirms GBM exact-MC mean converges to ; (b) shows Euler–Maruyama’s coarse- drift vs the exact-transition value; (c) draws the Vasicek exact transition and checks the stationary variance; (d) contrasts the Euler and Milstein CIR steps (with the Feller condition here satisfied, both stay positive - the negative-crossing case needs ).


4. Failure Modes & First-Principles Breakdowns

  1. Euler for everything. Euler has strong- and weak-discretization error ; for GBM/Vasicek it is strictly inferior to the exact transition which costs the same. Coarse Euler systematically misprices moments (see §3: vs on the same-scale draw).
  2. CIR Euler going negative. With the diffusion vanishes at only in the SDE - a discrete Euler passes below zero and silently “helps.” Milstein’s extra term (or exact sampling) respects the boundary. Violating the Feller condition without an exact scheme is a guaranteed bias.
  3. Vasicek for rates you must keep positive. Vasicek is Gaussian and reaches negative values with positive probability. Using it for a process that must stay (e.g. spot rates near zero, or modelling a log-domain variable) is a model error - switch to CIR or a shifted/lognormal model.
  4. Forgetting the when using the exact GBM transition. The transition is not - leaving out inflates to . Root cause: (03 · Itô).

5. References

  • Glasserman, Monte Carlo Methods in Financial Engineering
  • Shreve, Stochastic Calculus for Finance II, Ex 4.4.8 (GBM), Ex 4.4.10 (Vasicek), Ex 4.4.11 (CIR, closed vs open form).
  • Björk, Arbitrage Theory in Continuous Time, Prop 5.2 (GBM), Prop 5.3 (linear SDE)

6. Connected Graph Bridges