Interactive model — experiment with these parameters in sItô

A zero-coupon bond paying $1$ at maturity $T$ equals the expected pathwise discount factor:

$$P(0, T) = \mathbb{E}\Bigl[e^{-\int_0^T r_t\,dt}\Bigr]$$

Accumulating exp(-Integral(r)) along simulated paths reproduces the exact affine formulas directly from the short-rate dynamics.

From pricing PDE to affine closed form

By the Feynman–Kac theorem [1, 2], the bond price $P(t, r)$ satisfies the backward pricing PDE with terminal payoff $P(T, r) = 1$:

$$\partial_t P + a(b - r)\partial_r P + \frac{1}{2}\sigma^2\partial_r^2 P = rP$$

Both the Vasicek and Cox–Ingersoll–Ross (CIR) models belong to the affine class $P(0, T) = A(T)e^{-B(T)r_0}$:

  • Vasicek: $B(T) = \frac{1 - e^{-aT}}{a}$ and $\ln A(T) = \bigl(b - \frac{\sigma^2}{2a^2}\bigr)(B(T) - T) - \frac{\sigma^2 B(T)^2}{4a}$ (with $a = 0.8$, $B(1) = 0.688$).
  • CIR: with $\gamma = \sqrt{a^2 + 2\sigma^2}$, $B(T) = \frac{2(e^{\gamma T} - 1)}{(\gamma + a)(e^{\gamma T} - 1) + 2\gamma}$ and $A(T)$ given by the matching power-law ratio.

With $b = 4\%$, $r_0 = 3\%$, $T = 1$, and $100$ time steps, simulated path averages sit well within sampling error ($\text{SE} = 10^{-4}$) of the closed forms:

ModelParametersClosed-form price (yield)Simulated price
Vasicek$a = 0.8,\ \sigma = 2\%$$0.96746$ ($3.31\%$)$0.9673$
CIR$a = 1.5,\ \sigma = 0.1$$0.96580$ ($3.48\%$)$0.9656$

Discretizing $\int_0^T r_t\,dt$ on the grid adds an $\mathcal{O}(\Delta)$ quadrature bias that remains smaller than the Monte Carlo error here.

Vasicek pathwise discount factor B_t = exp(-∫r_s ds) fanning downward from 1.0 to mean 0.9673 at t = 1 Vasicek pathwise discount factor B_t = exp(-∫r_s ds) fanning downward from 1.0 to mean 0.9673 at t = 1
Simulated Vasicek discount factor paths $B_t = e^{-\int_0^t r_s\,ds}$ from $B_0 = 1$: the Feynman–Kac bond price $P(0, T) = \mathbb{E}[B_T] = 0.9673$ emerges as the cross-sectional mean of the declining fan. Open Vasicek bond in sItô ↗
2D joint density contours and 1500 sample scatter pairs of terminal CIR short rate r_1 against bond discount factor B_1 showing negative slope 2D joint density contours and 1500 sample scatter pairs of terminal CIR short rate r_1 against bond discount factor B_1 showing negative slope
Joint terminal distribution $(r_1, B_1)$ under the CIR bond model (50%, 80%, and 95% probability contours around 1,500 scatter pairs and the sample mean cross): higher realized short-rate paths systematically depress the accumulated discount factor $B_1$. Open CIR bond joint law in sItô ↗

Run this in sItô

Open sItô with this model pre-loaded to inspect the path distribution, summary statistics, and parameter sensitivities—or change any setting and rerun:

For how the underlying Vasicek and CIR rate distributions compare, see the short-rate comparison. Pathwise integral transforms are described in Compiling parametric SDEs into fast Monte Carlo simulations.

Related notes: Expected short rate versus yield · Yield-curve shapes from a two-factor Vasicek model