Start with a stochastic
short rate model r(t) with dynamics: : dr(t)=\mu(t,r(t)) \, dt + \sigma(t,r(t)) \, dW(t) and a risk-free zero-coupon bond maturing at time T with price P(t,T) at time t. The price of a zero-coupon bond is given by:P(t,T) = \mathbb{E}^{\mathbb{Q}}\left\{ \exp\left[ -\int_{t}^{T}r(t')dt' \right] \right\}where T=t+\tau, with \tau being is the bond's maturity. The expectation is taken with respect to the
risk-neutral probability measure \mathbb{Q}. If the bond's price has the form: :P(t,T)=e^{A(t,T)-rB(t,T)} where A and B are deterministic functions, then the short rate model is said to have an
affine term structure. The yield of a bond with maturity \tau, denoted by y(t,\tau), is given by:y(t,\tau) = -{1\over{\tau}}\log P(t,\tau)
Feynman-Kac formula For the moment, we have not yet figured out how to explicitly compute the bond's price; however, the bond price's definition implies a link to the
Feynman-Kac formula, which suggests that the bond's price may be explicitly modeled by a
partial differential equation. Assuming that the bond price is a function of x\in\mathbb{R}^{n}
latent factors leads to the PDE:-{\partial P\over{\partial \tau}} + \sum_{i=1}^{n}\mu_{i}{\partial P\over{\partial x_{i}}} + {1\over{2}}\sum_{i,j=1}^{n} \Omega_{ij}{\partial^{2} P\over{\partial x_{i}\partial x_{j}}} - rP = 0, \quad P(0,x) = 1where \Omega is the
covariance matrix of the latent factors where the latent factors are driven by an Ito
stochastic differential equation in the risk-neutral measure:dx = \mu^{\mathbb{Q}}dt + \Sigma dW^{\mathbb{Q}}, \quad \Omega = \Sigma\Sigma^{T}Assume a solution for the bond price of the form:P(\tau,x) = \exp\left[A(\tau) + x^{T}B(\tau) \right], \quad A(0) = B_{i}(0) = 0The derivatives of the bond price with respect to maturity and each latent factor are:\begin{aligned} {\partial P\over{\partial \tau}} &= \left[ A'(\tau) + x^{T}B'(\tau)\right]P \\ {\partial P\over{\partial x_{i}}} &= B_{i}(\tau)P \\ {\partial^{2} P\over{\partial x_{i}\partial x_{j}}} &= B_{i}(\tau)B_{j}(\tau)P\\ \end{aligned}With these derivatives, the PDE may be reduced to a series of ordinary differential equations:-\left[A'(\tau) + x^{T}B'(\tau) \right] + \sum_{i=1}^{n}\mu_{i}B_{i}(\tau) + {1\over{2}}\sum_{i,j=1}^{n} \Omega_{ij}B_{i}(\tau)B_{j}(\tau) - r = 0, \quad A(0) = B_{i}(0) = 0To compute a closed-form solution requires additional specifications. == Existence ==