Skip to content
Stochastic Calculus / Diffusions, SDEs, and the Feynman-Kac Formula

Derivation — Closed-Form Solutions of Linear SDEs

This derivation note carries out the algebra omitted from Mean-Reverting Diffusions. Three results are derived in full:
  1. Integrating-factor method for general linear SDEs — the universal technique for any SDE of the form dXt=(a(t)+b(t)Xt) dt+c(t) dWtdX_t = (a(t) + b(t)X_t) \, dt + c(t) \, dW_t.
  2. Vasicek affine bond price — substituting P=A(t,T)e−B(t,T)rP = A(t,T)e^{-B(t,T)r} into the Feynman-Kac PDE and solving the resulting ODE system.
  3. CIR affine bond price — the same ansatz for the CIR PDE, leading to a Riccati ODE for BB and an exact solution via γ=κ2+2σ2\gamma = \sqrt{\kappa^2 + 2\sigma^2}.

In this lesson

  1. Part 1: Integrating Factor for General Linear SDEs
  2. Part 2: Vasicek Affine Bond Price ODE
  3. Part 3: CIR Affine Bond Price — Riccati ODE
  4. Comparison: Vasicek vs. CIR

Before you start

The full lesson, with worked examples and exercise solutions, is for members.

Read the full lesson

New to SelfMadeQuant.com? See membership options or explore the curriculum.