Ordinary Differential Equations
An equation that describes how something changes, rather than what it equals — from which you recover the entire path by 'un-doing' the rate of change.
Prerequisites: Derivatives and Differentiation Rules, Improper Integrals
Compound interest doesn't tell you a balance directly — it tells you how fast the balance grows, in proportion to how big it already is. From "grows in proportion to its current size" alone, you can recover the entire trajectory of the balance over time. An ordinary differential equation (ODE) is exactly this kind of statement, generalized: an equation relating a quantity to its own rate of change, rather than pinning the quantity down directly. Solving it means reconstructing the full path from a rule about its motion.
The analogy: driving from a speedometer reading
If someone hands you a speedometer reading at every instant of a car trip but not the odometer, you can still reconstruct the entire route: add up the speed over each little sliver of time and the distances accumulate into a position. An ODE is the same idea one level more abstract — instead of "speed depends on time," it says "the rate of change of some quantity depends on the quantity itself (and possibly on time)," and solving the ODE is the process of turning that rate-rule back into the full trajectory, exactly as integrating speed reconstructs position.
The mechanics, one symbol at a time
A first-order ODE has the general form
read as: the rate of change of at time depends on the current value of (and possibly itself). Solving the ODE means finding the function that satisfies this relationship at every instant, usually alongside a starting condition that pins down which specific trajectory among infinitely many possibilities you want.
The single most important case in finance is linear growth/decay, , whose solution is exponential:
In words: if a quantity's growth rate is always proportional to its current size, the quantity itself grows (or shrinks, if ) exponentially — this is continuous compounding, radioactive decay, and discounting, all the same equation with different signs and interpretations of .
Worked example 1: continuous compounding by hand
A deposit of $1,000 grows continuously at rate per year: , . The solution is . After 5 years:
That is, $1,349.90.
The ODE never mentioned "after 5 years" directly — it only described the instantaneous growth rate — yet solving it hands back the balance at any time you ask for, past or future.
Worked example 2: mean reversion — a rate that pulls back to a target
A short-term interest rate that tends to drift back toward a long-run level follows , where controls how fast it pulls back. Suppose , per year, and today . This ODE solves to
At years: . Notice the rate is pulled roughly a third of the way from 1% back toward 4% after two years, and the pull weakens the closer it gets to — exactly the "mean-reverting" behavior at the heart of short-rate models like Vasicek.
Adjust the rate parameter and watch the exponential curve — this is literally the solution curve of the simplest ODE, with the parameter controlling how fast the trajectory bends away from a straight line.
What this means in practice
ODEs underlie every continuous-time model a quant touches: continuous compounding and discounting, mean-reverting short-rate and volatility models (Vasicek, CIR, Ornstein–Uhlenbeck), and the deterministic skeleton that stochastic differential equations add randomness to. Even the Black–Scholes PDE, once you fix the other variable, reduces along certain paths to ODEs solvable in closed form. Any time a quantity's future value depends on a rule about its own rate of change rather than a direct formula, you're solving an ODE, whether the model calls it that or not.
An ODE specifies how a quantity's rate of change depends on itself (and possibly time); solving it reconstructs the full trajectory, and the two workhorse solutions to know cold are pure exponential growth/decay and exponential relaxation toward a mean-reverting target.
A common confusion is assuming every ODE has a closed-form solution like the two above. Most nonlinear ODEs (and almost all systems of several coupled ODEs) don't — they require numerical methods (Euler, Runge–Kutta) to approximate the trajectory step by step. Treating "solve the ODE" as automatically meaning "find a tidy formula" leads to wasted effort chasing an answer that doesn't exist in closed form, when a numerical solver would get a perfectly good answer in seconds.
Related concepts
Practice in interviews
Further reading
- Boyce & DiPrima, Elementary Differential Equations, ch. 1–2
- Braun, Differential Equations and Their Applications, ch. 1