Vasicek and CIR: Affine Term Structure Models
A full derivation of the two one-factor short-rate models: why bond prices come out exponential-affine, what the Feller condition actually enforces, and the two calibration traps that fail silently.
Once you accept that rates are stochastic, the question is not “what SDE should they follow” but “what SDE can they follow such that bond prices are still computable.” Those are different questions. You can write arbitrarily rich dynamics for the short rate; the price is that discount factors then only exist as Monte Carlo estimates. Vasicek (1977) and Cox-Ingersoll-Ross (1985) are still in Chapter 3 of every textbook forty-odd years later because they win on both fronts: dynamics that look enough like rates, prices that stay in closed form.
This article derives both models, gives the bond pricing formulas, and explains when to reach for which. The thread running through it is one structural fact: bond prices are exponential-affine in the short rate. The conspicuous difference between the two models is that Vasicek allows negative rates and CIR does not. The inconspicuous property is the one that makes either of them work.
Setting Up What We Actually Have to Compute
A zero-coupon bond with maturity pays 1 at time . Its price at time is
This is the discount factor, the present value of $1 received at . The map is the term structure of interest rates at time , and the yield curve is .
Notice what sits inside the expectation: , not . Pricing a bond does not require the distribution of the short rate at a point in time, it requires the distribution of its integral over an interval. That distinction is what decides which models are workable. A pretty marginal distribution for is not enough; you need one that stays pretty after integration. Vasicek and CIR are the two cases where it does.
Vasicek: The Short Rate Is an OU Process
Vasicek assumes the short rate follows an Ornstein-Uhlenbeck process:
with . As derived in the previous article, is Gaussian with explicit mean and variance:
The step that matters is the integral. is a linear functional of a Gaussian process, so it is itself Gaussian:
where and are explicit functions of , , , , and . What remains is the lognormal expectation: for , . Substituting ,
No finance entered that derivation. The only input was that a linear functional of a Gaussian process is Gaussian, which is why the Vasicek bond price is the easiest one in the entire short-rate literature to obtain.
The Vasicek Bond Price Formula
Carrying out the integrals, define
and the price is
with
is the duration-like sensitivity of the bond to the short rate. It grows with but is capped at , because mean reversion drags far-dated rates back to , so a long bond’s sensitivity to today’s short rate does not grow without bound. adjusts for the integrated drift, and the term inside it is the Jensen effect: volatility alone lowers the expected discount factor, which raises the bond price.
While we are here, note the following expression, which looks a great deal like the above but does not belong to Vasicek:
It feeds today’s discount curve and today’s instantaneous forward rate directly into , forcing the model through the current market curve. That is the Hull-White construction, covered in the next article. Vasicek cannot do it: its is determined entirely by the three constants , and whether it happens to fit today’s curve is luck.
Two properties of Vasicek deserve to be pulled out. First, is affine in , linear plus constant. That is the defining property of the whole affine class, and it is the subject of the next section. Second, negative rates: is Gaussian, the OU stationary distribution is Gaussian, and so has positive probability of going below zero. In 1977 this was read as a defect. After 2014 it is the reason the model is still usable on EUR and JPY curves.
Affine Term Structure: The General Picture
Vasicek belongs to a larger class of affine term structure models, in which the drift and the squared diffusion of the state vector are both affine in the state:
For this entire class,
holds for some explicit and (here is already in log form, differing by a logarithm from the of the previous section). The bond price is an exponential-affine function of the state.
This is a deep structural result because it collapses a problem over a function space into a system of ordinary differential equations. If the SDE coefficients are affine in the state, the bond pricing PDE degenerates into Riccati ODEs for and , solvable in closed form for one factor and with a few dozen lines of numerical integration for many. You never have to redo the expectation at each .
The class includes Vasicek, CIR, Hull-White, and Gaussian HJM as special cases. The multi-factor extensions (Cox-Ingersoll-Ross 1985b, Chen and Scott 1993, Dai and Singleton 2000) are more or less the entire map of the modern term structure literature.
CIR: Buying Positivity with a Square Root
Cox, Ingersoll, and Ross (1985) changed exactly one thing, making the volatility proportional to :
That single change has three consequences. The first was the motivation; the other two came along for the ride.
Rates stop going negative: the square-root diffusion switches itself off as approaches zero, and provided the Feller condition holds, stays strictly positive. The model also acquires heteroskedasticity for free, with volatility rising alongside the level of rates, which matches what the data shows. Vasicek’s is a constant and gives the same volatility whether rates are at 1% or 5%. The cost lands on the transition density: is no longer Gaussian but a scaled non-central chi-squared, with Bessel functions in its density. The bond price is still closed-form and still exponential-affine, only with messier expressions for and .
Because of that bundle of properties, CIR ended up more central to credit modeling than to rates modeling. Default intensities are naturally non-negative and naturally heteroskedastic, and the CIR process fits them almost by construction.
What the Feller Condition Enforces
For the CIR process to stay strictly positive, we need . The intuition is a race. Near zero, the drift toward is roughly , while the diffusion is and dies off with . The drift pushes up at a fixed rate while the diffusion decays. When the condition holds, the drift wins, and zero becomes an inaccessible boundary: the process gets arbitrarily close but cannot cross.
If the Feller condition fails, the process can hit zero. Once there the diffusion vanishes () while the drift is still a positive , so the process is pushed back into positive territory. The boundary is entrance-not-exit: you can enter it, and there is only one direction out. In practice you see brief excursions to near-zero rates followed by bounces, rather than a process that parks at zero.
Plugging in numbers shows how far from the edge you usually are. For typical calibrations of US dollar rates, , , , so against , two orders of magnitude of headroom. Feller holds comfortably. For some emerging-market calibrations, where volatility is much higher and mean reversion slower, it can fail, and rates touch zero.
The CIR Transition Density and Bond Price
The conditional distribution of given under CIR is
where and is the non-central chi-squared with degrees of freedom and non-centrality parameter . The mean and variance are
The mean is identical to Vasicek’s, which it has to be, since the drift was never touched. The variance is where the difference shows up: one term proportional to (the heteroskedastic part, so a higher current rate means more near-term uncertainty) plus one proportional to (the asymptotic part, all that survives at long horizons). Vasicek has no analogue of the first term.
The bond price is again exponential-affine:
with
and an that runs half a page in , , , , and ; see the original CIR paper or Brigo and Mercurio, Chapter 3. The structure matches Vasicek exactly, affine in , with a more involved dependence on .
is the key to reading the formula: it is the effective mean-reversion rate once both drift and volatility are accounted for. At we get and collapses to the Vasicek form; as grows, and the effective reversion is faster. The denominator of is always positive, so and the duration-like sensitivity never flips sign.
A Worked Example, Both Models Side by Side
Price a 5-year zero-coupon bond under Vasicek with , , , and current short rate .
First :
Then , dividing the into the bracket of the formula above:
So , and the bond price is
The yield is , or 4.42%. It sits between the current short rate (4%) and the long-run mean (5%), exactly where an upward-sloping curve with mean reversion should put it: five years is not long enough for the rate to revert all the way to , so the yield lands in between and closer to the near end.
Now the same parameters under CIR. First , then
comes out nearly identical across the two models, which is not a coincidence: at , is negligible against , so exceeds by 0.4%. All the difference lives in , which depends on and differently. For a small enough the two models give similar prices, meaning that in this parameter region positivity is close to free. As grows, CIR produces a steeper term structure and the square-root volatility term starts to speak.
Calibration
In practice you calibrate Vasicek or CIR to the current term structure. The inputs are today’s discount curve over a set of maturities , today’s instantaneous short rate (usually backed out of the shortest-maturity rate), and optionally the swaption volatility surface. Vasicek has three parameters and can be fit with three or more bond prices; CIR has the same three with a different functional form.
The procedure itself is plain. Compute from the analytic bond price formula, then minimize over . It is a nonlinear least-squares problem and off-the-shelf solver routines handle it.
import numpy as np
from scipy.optimize import minimize
def vasicek_bond_price(r0, kappa, theta, sigma, T):
B = (1 - np.exp(-kappa * T)) / kappa
A = np.exp((B - T) * (kappa**2 * theta - 0.5 * sigma**2) / kappa**2
- sigma**2 * B**2 / (4 * kappa))
return A * np.exp(-B * r0)
def calibrate_vasicek(maturities, market_prices, r0):
def objective(params):
kappa, theta, sigma = params
if kappa <= 0 or sigma <= 0:
return 1e10
model_prices = np.array([vasicek_bond_price(r0, kappa, theta, sigma, T) for T in maturities])
return np.sum((model_prices - market_prices)**2)
x0 = [0.5, 0.05, 0.02]
bounds = [(1e-4, 5), (1e-4, 0.5), (1e-4, 0.5)]
result = minimize(objective, x0, bounds=bounds, method='L-BFGS-B')
return result.x
That runs. The objective is the sum of squared bond price errors and the bounds enforce positivity. Real-world calibrations weight by duration or price sensitivity to stabilize the fit, since long-dated bonds carry larger absolute price errors by construction.
Two traps live here, and neither raises an error. Both hand you a plausible-looking set of parameters.
The first is degrees of freedom. Three parameters fitting three points is a perfect fit by identity, not by merit, and it gives you no overfitting check whatsoever. Use more maturities and add a regularization term penalizing extreme parameter values.
The second is subtler: the calibrated often comes out negative under Vasicek or pinned near zero under CIR. The cause is that you are forcing a model whose whole premise is “rates revert to ” to fit a curve that sits far from any plausible long-run mean. If the current short rate is 5% and the optimizer drives to 1% in order to match an inverted curve, the model is internally inconsistent: it now says rates will revert to 1%, which is not what the market is pricing. The optimizer merely found numbers that reproduce today’s prices. There are two fixes. Use the physical long-run mean for under and adjust the risk-neutral drift separately, or switch to a time-dependent parameterization (Hull-White) that lets the curve be anything at any time. The next article takes the second route.
While We Are Here: Which Measure Are You Calibrating?
Every SDE above is written under the risk-neutral measure . Under the physical measure , the drift of carries a risk premium :
measures the extra drift investors demand for bearing interest-rate risk. Empirical estimates are generally positive, since holding duration is risky, but they are noisy. Under the premium is absorbed into : the risk-neutral is the long-run mean under , differing from the physical long-run mean by a term proportional to .
Pricing derivatives needs only the risk-neutral dynamics. The physical dynamics are what you need for forecasting rates, asset-liability modeling, and risk management. So when you read “the long-run mean of rates is 4%”, ask under which measure. The negative- trap from the previous section is that question going unasked: a fitted parameter under being read as an economic forecast under .
Which One to Use, and When Neither Is Enough
Vasicek’s advantage is simplicity. Its transition density is Gaussian, simulation is one line, and the bond price is one exponential, which makes it the right tool for fast estimates and approximations. When you need discount factors across tens of thousands of paths, that gap is real. Whether its negative rates are a problem depends on the market: for JPY, EUR, and CHF curves, which have actually printed negative rates, the property is a requirement rather than a defect; for anything with a hard zero floor, it will hand you paths you do not want.
CIR buys positivity and heteroskedasticity at the cost of complexity. Use it when you need non-negative rates, when volatility empirically rises with the level, and above all when you are modeling credit spreads or default intensities, where the square-root process is simply the standard. But the positivity it buys comes with the Feller condition attached. If your calibration pushes toward , what you actually have is a process that hugs zero, not a positive-rate model.
The more important point is the ceiling both share: a single factor, meaning a single source of randomness. That fails visibly in three places.
Yield curves twist. In a curve driven by one short rate, every maturity moves in the same direction, which cannot produce the real pattern of a front end rising while the long end falls. Empirically you need two or three factors to capture the joint distribution of bond prices across maturities, usually read as level, slope, and curvature.
Correlations across maturities come out too high. Same cause: a one-factor model predicts bond return correlations near 1, and the data is much lower.
Implied volatility comes out flat. Cap and floor prices imply a volatility smile or skew across strikes that a one-factor model cannot generate. Pricing rate options requires stochastic volatility of rates, which requires multiple factors.
The multi-factor extensions exist for exactly these gaps. Cox-Ingersoll-Ross 1985b uses several correlated square-root processes; Chen and Scott (1993) and Longstaff and Schwartz (1992) introduce two-factor models; Dai and Singleton (2000) provide the canonical classification of affine term structure models. The most widely used extension is also the simplest: Hull-White keeps the Vasicek structure intact and only lets the parameters vary with time, which solves the initial-curve fitting problem. That is the next article.
As a rough selection rule: Vasicek for a quick bond price estimate, CIR for an accurate fit that must not go negative, Hull-White or a multi-factor affine model for rate derivatives with a smile, simulation of either with calibrated parameters for exotic or path-dependent claims. For deep out-of-the-money options and stress scenarios, acknowledge the one-factor limits and add extensions, rather than torturing the parameters until they fit.
What the Affine Property Actually Buys
“Exponential-affine” has come up repeatedly. It is worth spending one section on what it delivers, because the property matters more than the details of either model.
The immediate payoff is closed-form bond prices: an analytic formula for one factor, Riccati ODEs solvable analytically or numerically for several. One level up are closed-form option prices. Caps, floors, and swaptions have payoffs depending on integrals of the short rate, and under an affine model the distribution of those integrals is known in closed form, which yields Black-like formulas for cap and floor prices.
Another level up is estimation. Affine models can be cast in linear state-space form, which wires them directly into the Kalman filter and Gaussian-linear state-space estimation, and that underpins a good share of empirical term structure work. No-arbitrage restrictions also become easy to check in this frame: the drift and diffusion coefficients must satisfy conditions for the model to be arbitrage-free, and for affine models those conditions reduce to linear-algebraic constraints on the coefficients rather than functional conditions to be verified case by case.
Last is the interface with macroeconomics. The state variables can be interpreted as output, inflation, or other macro factors, and the affine structure is exactly what falls out of log-linearized macro models. That is not a coincidental resemblance of form, it is the reason the macro-finance literature (Ang and Piazzesi 2003, for instance) works at all.
Taken together, the affine framework is probably the single most important structural result in term structure modeling. Closed-form or near-closed-form bond prices, option prices, and risk measures all exist because of it.
Same SDE, Different State Variable
The CIR process has a life outside rates. The Heston (1993) stochastic-volatility model for equity options uses
where is the instantaneous variance of the stock. That is CIR with in place of : the same Feller condition keeping positive, the same non-central chi-squared transition density.
Heston’s contribution was recognizing that with this SDE for , the equity option price is closed-form via a Fourier transform. The characteristic function of the log-price is known, and the option price is its inverse Fourier transform evaluated at . The formula carries two complex characteristic functions for the upside and downside integration contours, and the integrals are computed numerically. The result is one of the most widely used equity option pricing formulas in practice.
So the square-root diffusion, proposed originally for rates, turned out to be a natural model for stochastic volatility. Same SDE, different state variable. The general principle worth extracting: an SDE toolkit built for one asset class is reusable across others, and a non-central chi-squared simulator written for rates runs unmodified on equity variance.
A Historical Note
The Vasicek model was published in 1977 and was the first continuous-time stochastic model of the term structure. It was the dividing line because it produced a closed-form bond price in a stochastic-rates setting. Before it, term structure modeling was mostly curve fitting (splines and the like) or ad-hoc expectations-hypothesis formulations, with no internally consistent stochastic dynamics underneath.
CIR arrived in 1985 and added the no-negative-rates property, which mattered empirically at the time. The literature expanded quickly afterwards: Cox-Ingersoll-Ross 1985b introduced multi-factor extensions, Chen and Scott (1993) and Longstaff and Schwartz (1992) introduced two-factor models, and Dai and Singleton (2000) provided the canonical classification. Hull and White (1990, 1993) extended Vasicek to time-dependent parameters, which is what let the model fit an observed term structure exactly at a point in time, and is the provenance of that “not actually Vasicek” formula from the middle of this article.
If only one sentence survives: bond prices are exponential-affine in the short rate. Option pricing, calibration, and simulation all follow from that.
References
- Vasicek, O. (1977). Journal of Financial Economics.
- Cox, J., Ingersoll, J., Ross, S. (1985). Econometrica. One of the most cited papers in finance, and it earned it.
- Brigo, D. and Mercurio, F. (2006). Interest Rate Models: Theory and Practice. Chapters 1-3; the full CIR is in Chapter 3.
- Hull, J. Options, Futures, and Other Derivatives. The interest-rate derivatives chapters cover equilibrium short-rate models, CIR included.
- Luenberger, D. (1998). Investment Science, Ch. 11. ISBN: 978-0-19-510809-5.
- Ang, A. and Piazzesi, M. (2003). The macro-finance direction for affine models.
- Dai, Q. and Singleton, K. (2000). The canonical classification of affine term structure models.