Tutorials › Stochastic Calculus › Affine Vasicek Bond Pricing by PDE

Interest-Rate Models and Other Applications · Tutorial 500 of 600

Affine Vasicek Bond Pricing by PDE

Use the Vasicek pricing PDE to derive the bond-price coefficients and verify the resulting formula in key limiting and boundary cases.

Advanced 11 min read

What You'll Learn

  • Set up the Vasicek zero-coupon bond pricing PDE under the risk-neutral measure
  • Derive the coefficient ODEs from an exponential-affine price ansatz
  • Solve the coefficient ODEs and obtain the closed-form bond price
  • Verify the candidate price through the discounted-process martingale argument
  • Check the maturity condition, a deterministic-rate case, and the constant-rate limit
  • Recognize and correct the common sign error in the maturity-time ODE

From the Short-Rate PDE to an Affine Bond Price

A zero-coupon bond pays one unit at its maturity \(T\) and nothing before then. In a short-rate model, its price depends on the current time and short rate: write \(P(t,r)\) for the price at time \(t\) when the short rate is \(r\). The Vasicek model is especially tractable because its drift is affine in \(r\), its diffusion coefficient is constant, and the bond’s payoff is constant. These features suggest an exponential-affine price of the form \(P(t,r)=\exp(A(t,T)-B(t,T)r)\).

Work on a filtered probability space \((\Omega,\mathcal{F},(\mathcal{F}_t)_{t\ge0},\mathbb{Q})\) carrying a standard Brownian motion \(B_t\). The measure \(\mathbb{Q}\) is the risk-neutral measure used for pricing; it need not be the physical probability measure \(\mathbb{P}\). Under \(\mathbb{Q}\), suppose the short rate satisfies

$$ dr_t=\kappa(\theta-r_t)\,dt+\sigma\,dB_t,\qquad \kappa>0,\quad \sigma\ge 0, $$

where \(\kappa\) is the mean-reversion speed, \(\theta\) is the long-run level, and \(\sigma\) is the diffusion coefficient. The drift is \(\kappa(\theta-r)\); the diffusion coefficient is \(\sigma\). We take a deterministic initial rate when verifying the pricing representation below. For the coefficient derivation, \(r\) can be any real state.

The short-rate bond pricing PDE is \(P_t+\kappa(\theta-r)P_r+\tfrac12\sigma^2P_{rr}-rP=0\), with terminal condition \(P(T,r)=1\). Set time to maturity to be \(\tau=T-t\), and write \(p(\tau,r)=P(T-\tau,r)\). Then the PDE becomes \(p_\tau=\kappa(\theta-r)p_r+\tfrac12\sigma^2p_{rr}-rp\), with \(p(0,r)=1\).

Deriving the Coefficient Equations

Use the exponential-affine ansatz \(p(\tau,r)=\exp(a(\tau)-b(\tau)r)\), where \(a(0)=b(0)=0\) is required by the terminal payoff. Its derivatives are

$$ p_\tau=(a'-b'r)p,\qquad p_r=-bp,\qquad p_{rr}=b^2p. $$

Substituting these derivatives into the PDE and dividing by the positive quantity \(p\) gives

$$ a'-b'r=-\kappa\theta b+\kappa br+\tfrac12\sigma^2b^2-r. $$

Since this identity must hold for every real \(r\), match the coefficient of \(r\) and the constant term separately. The resulting ODEs are \(b'=1-\kappa b\) and \(a'=-\kappa\theta b+\tfrac12\sigma^2b^2\), with \(a(0)=b(0)=0\).

Theorem: For \(\kappa>0\), the unique differentiable coefficient functions satisfying these ODEs and initial conditions are $$ b(\tau)=\frac{1-e^{-\kappa\tau}}{\kappa},\qquad a(\tau)=\left(\theta-\frac{\sigma^2}{2\kappa^2}\right)\bigl(b(\tau)-\tau\bigr)-\frac{\sigma^2b(\tau)^2}{4\kappa}. $$ Consequently, the PDE solution within the exponential-affine ansatz is \(p(\tau,r)=\exp(a(\tau)-b(\tau)r)\).

Proof. For the first ODE, multiply \(b'+\kappa b=1\) by \(e^{\kappa\tau}\). The product rule gives \((e^{\kappa\tau}b(\tau))'=e^{\kappa\tau}\). Integrating from \(0\) to \(\tau\) and using \(b(0)=0\) yields \(e^{\kappa\tau}b(\tau)=(e^{\kappa\tau}-1)/\kappa\), hence \(b(\tau)=(1-e^{-\kappa\tau})/\kappa\). This solution is unique: the difference \(h\) of any two solutions satisfies \(h'=-\kappa h\), \(h(0)=0\), so \((e^{\kappa\tau}h)'=0\) and \(h=0\).

Now define \(a\) by the displayed formula. Since \(b'=1-\kappa b\), differentiation gives

$$ a'=\left(\theta-\frac{\sigma^2}{2\kappa^2}\right)(b'-1)-\frac{\sigma^2}{2\kappa}bb' =-\kappa\theta b+\frac{\sigma^2}{2}b^2. $$

In the last equality, substitute \(b'-1=-\kappa b\) and \(b'=1-\kappa b\); the terms linear in \(\sigma^2b\) cancel. Also \(b(0)=0\) implies \(a(0)=0\). If two functions satisfy the ODE for \(a\) with this same \(b\), their difference has derivative zero and initial value zero, so they agree. Thus both coefficient equations and their initial conditions hold uniquely. \(\square\)

The Bond Formula and Its Pricing Interpretation

For \(0\le t\le T\), put \(\tau=T-t\). The derived formula is

$$ P(t,r)=\exp\left[ \left(\theta-\frac{\sigma^2}{2\kappa^2}\right)\bigl(B(\tau)-\tau\bigr) -\frac{\sigma^2B(\tau)^2}{4\kappa} -B(\tau)r \right], \qquad B(\tau)=\frac{1-e^{-\kappa\tau}}{\kappa}. $$

The coefficient \(B(\tau)\) is positive for \(\tau>0\), so the price decreases with the current rate: \(P_r=-B(\tau)P<0\). This is a feature of the formula, not an assumption that rates themselves must be positive. The Vasicek model permits negative short rates.

Proposition: If \(r_0\) is deterministic and finite, the displayed function gives the risk-neutral discounted bond price: $$ P(t,r_t)=\mathbb{E}^{\mathbb{Q}}\left[\left.\exp\left(-\int_t^T r_s\,ds\right)\right|\mathcal{F}_t\right]. $$

Proof. The coefficient derivation shows that \(P\) satisfies the pricing PDE and \(P(T,r)=1\). Define \(D_s=\exp(-\int_0^s r_u\,du)\) and \(F_s=D_sP(s,r_s)\) for \(0\le s\le T\). Applying Ito's formula to \(P(s,r_s)\), the time derivative is \(P_t\), the first spatial derivative is \(P_r\), the second spatial derivative contributes the correction \(\tfrac12\sigma^2P_{rr}\,ds\), and the stochastic term is \(\sigma P_r\,dB_s\). The product rule with \(dD_s=-r_sD_s\,ds\) therefore gives

$$ dF_s=D_s\bigl(P_t+\kappa(\theta-r_s)P_r+\tfrac12\sigma^2P_{rr}-r_sP\bigr)\,ds +D_s\sigma P_r\,dB_s =D_s\sigma P_r\,dB_s. $$

Here the drift vanishes by the PDE. To justify the martingale conclusion, the stochastic integral is an Ito integral with progressively measurable integrand \(H_s=D_s\sigma P_r(s,r_s)\). On the finite interval \([0,T]\), the pair \((r_s,\int_0^s r_u\,du)\) is jointly Gaussian with deterministic initial rate and bounded means and variances. The coefficient \(P_r=-B(T-s)P\) is exponential-affine in \(r_s\), and \(D_s\) is an exponential of the integrated rate. Exponential moments of every linear combination of a Gaussian vector are finite; the bounded coefficients and means and variances on this interval consequently give \(\mathbb{E}^{\mathbb{Q}}\int_0^T H_s^2\,ds<\infty\). Thus \(H\) belongs to \(\mathcal{L}^2\), the class of progressively measurable integrands satisfying this square-integrability condition. By the Ito isometry the integral is square-integrable, and its conditional expectation over any time interval given the filtration at the left endpoint is zero. Hence \(F\) is a martingale, not merely a local martingale.

At maturity \(F_T=D_TP(T,r_T)=D_T\). The martingale property gives \(D_tP(t,r_t)=\mathbb{E}^{\mathbb{Q}}[D_T\mid\mathcal{F}_t]\). Since \(D_t>0\) and \(D_T/D_t=\exp(-\int_t^T r_s\,ds)\), division by \(D_t\) proves the asserted conditional pricing formula. \(\square\)

Worked Checks of the Formula

Worked Example: A Bond with Exact Coefficients

Take \(\kappa=2\), \(\theta=\tfrac14\), \(\sigma=1\), and \(\tau=\ln 2\). Compute the bond price at \(r=1\).

First \(e^{-\kappa\tau}=e^{-2\ln2}=\tfrac14\), so

$$ b(\tau)=\frac{1-\frac14}{2}=\frac38. $$

The prefactor in \(a\) is \(\theta-\sigma^2/(2\kappa^2)=\tfrac14-\tfrac18=\tfrac18\), and \(\sigma^2b^2/(4\kappa)=(\tfrac38)^2/8=\tfrac9{512}\). Therefore

$$ a(\tau)=\frac18\left(\frac38-\ln2\right)-\frac9{512} =\frac{15}{512}-\frac{\ln2}{8}. $$

At \(r=1\), the price is \(P=\exp(\tfrac{15}{512}-\tfrac{\ln2}{8}-\tfrac38)\). Check the coefficients directly: \(b'=e^{-2\tau}=\tfrac14\) and \(1-\kappa b=1-2(\tfrac38)=\tfrac14\). Also \(a'=-\kappa\theta b+\tfrac12\sigma^2b^2=-2(\tfrac14)(\tfrac38)+\tfrac12(\tfrac9{64})=-\tfrac{15}{128}\). Differentiating the closed formula for \(a\) gives \((\tfrac18)(\tfrac14-1)-(\tfrac{3}{16})(\tfrac14)=-\tfrac{15}{128}\), as required.

Worked Example: Deterministic Mean-Reverting Rate

Set \(\kappa=1\), \(\theta=1\), \(\sigma=0\), and \(\tau=\ln2\). Then \(b=1-e^{-\ln2}=\tfrac12\) and \(a=b-\tau=\tfrac12-\ln2\). At \(r=0\), the formula gives \(P=\exp(\tfrac12-\ln2)\).

Check this by solving the rate equation directly. With zero diffusion, \(dr_s=(1-r_s)ds\) and \(r_0=0\), so \(r_s=1-e^{-s}\). The accumulated rate to maturity is \(\int_0^{\ln2}(1-e^{-s})\,ds=\ln2-(1-e^{-\ln2})=\ln2-\tfrac12\). The direct discounted value is therefore \(\exp(-\ln2+\tfrac12)\), exactly the PDE formula. At \(\tau=0\), both \(a\) and \(b\) vanish, so the price is one.

Worked Example: The Constant-Rate Limit

Take \(\sigma=0\) and let \(\kappa\) tend to zero with \(\theta\), \(r\), and \(\tau\) fixed. The integral identity \(b(\tau)=\int_0^\tau e^{-\kappa u}\,du\) gives \(b(\tau)\to\tau\). Since \(\sigma=0\), \(a(\tau)=\theta(b(\tau)-\tau)\), which tends to zero. Thus \(P(t,r)\to e^{-r\tau}\).

This agrees with the limiting short-rate dynamics: when \(\kappa=0\) and \(\sigma=0\), the rate is constant, \(r_s=r\), and discounting one unit for \(\tau\) time units gives \(\exp(-\int_t^T r\,ds)=e^{-r\tau}\). This check uses both limits; setting \(\sigma=0\) alone with positive \(\kappa\) leaves a deterministic, generally time-varying rate.

A Sign Pitfall and Why the Ansatz Is Useful

Common mistake: reversing the sign in the maturity-time ODE. Matching the \(r\)-terms gives \(-b'=\kappa b-1\), hence \(b'=1-\kappa b\), not \(b'=\kappa b-1\). The incorrect equation would give \(b(\tau)=(1-e^{\kappa\tau})/\kappa\), whose derivative at \(\tau=0\) is \(-1\). The correct equation requires \(b'(0)=1\), and its solution is \(b(\tau)=(1-e^{-\kappa\tau})/\kappa\). The sign can also be checked in the PDE: the term \(-rP\) forces the initial slope \(b'(0)\) to be positive.

The affine reduction turns a second-order PDE into two scalar ODEs because the exponential ansatz makes every spatial derivative a multiple of \(P\), while the Vasicek drift is affine in \(r\). The terminal condition is built into \(a(0)=b(0)=0\), and the final PDE substitution verifies the solution rather than merely suggesting a plausible form. The formula is useful because it gives prices directly from the current rate and model parameters; its coefficient functions can then be used in further analysis of rate-dependent bond quantities.

Check Your Understanding

Use the coefficient ODEs and formula above to answer these questions.

  1. Starting from the PDE in \(\tau\), show how matching the coefficient of \(r\) gives \(b'=1-\kappa b\).
  2. For \(\kappa=1\) and \(\tau=\ln 2\), calculate \(b(\tau)\) and verify its ODE using \(b'=e^{-\tau}\).
  3. For \(\sigma=0\), derive the direct discounted price from the deterministic solution of \(dr_s=\kappa(\theta-r_s)ds\), and compare it with the affine expression.
  4. Explain why the discounted process argument uses an Ito integral rather than an ordinary chain rule, and identify its integrand.
  5. What limit is needed, in addition to \(\sigma\to0\), to obtain a constant rate equal to the current rate \(r\)?