Skip to content
All library documents

Deriving the CIR Conditional Expectation PDE with Feynman–Kac

Article Quant Q&A · Author: Michal

Summary

The document explains how to derive the partial differential equation for the conditional expectation of an exponential function of a future Cox–Ingersoll–Ross short rate. Applying Itô’s lemma to the conditional expectation gives a stochastic differential; because that conditional expectation is a martingale, its drift must vanish. The resulting equation uses the CIR process’s drift and variance terms and has the terminal condition given by the exponential payoff at maturity.

It then describes checking an exponential-affine candidate solution by substituting it into the PDE. Matching terms yields ordinary differential equations for the time-dependent coefficients, so solving those equations verifies the candidate form. The discussion emphasizes the distinction between applying Itô’s lemma to the payoff itself and deriving a PDE for its conditional expectation. It assumes sufficient smoothness for the PDE argument and does not work through the coefficient ODE solutions explicitly.

Key ideas

  • A conditional expectation of a fixed terminal payoff forms a martingale under the stated process assumptions.
  • Applying Itô’s lemma to the conditional expectation produces a drift term that must be zero.
  • The CIR generator contributes a mean-reverting drift term and a state-dependent variance term to the PDE.
  • The terminal condition is the payoff evaluated at maturity.
  • An exponential-affine candidate can be checked by substitution, which reduces the PDE to ODEs for its coefficients.

Tags

Full text
# CIR model problem - deriving PDE, Feynman-Kac


# CIR model problem - deriving PDE, Feynman-Kac












I am reviewing a CIR model problem, where $r_t$ has following dynamics $$dr_t=a(b-r_t)dt+\sigma \sqrt{r_t} dW_t^* \quad \quad (1)$$ for some constants $ab>\frac{\sigma^2}{2} \quad$

Letting T be a fixed date and $f_{\lambda}$ a function defined for some constant $\lambda >0$ $$f_{\lambda}(t,r)=E^*[e^{-\lambda {r_{T}}}|r_t=r] \quad \quad (2)$$

a) derive PDE satisfied by the function $f_{\lambda}$ b) show that the function $f_{\lambda} (t,r)=e^{-A_{\lambda}(T-t)-B_{\lambda}(T-t)r_t}$ satisfies the PDE I guess the subject function can be expressed as $$f(t,r_t)=e^{- \lambda r} \quad \quad (3)$$

My first thought was just to calculate the $df(t,r_t)$ using Ito formula and substituting for the $dr_t$ which would yield $$df(t,r_t)=f_t dt + f_r dr_t+ \frac{1}{2} f_{rr} d<r>_t=$$ $$=(f_t + a(b-r_t) f_r + \frac{1}{2} r f_{rr})dt+ \sigma \sqrt{r_t} dW_t^* \quad \quad (4)$$

Wouldn't it be already answer to a?

However the solution presents a different approach which I don't understand. It gives the Feynman-Kac equation as solution to a),

further the equation $f_{\lambda} (t,r)=e^{-A_{\lambda}(T-t)-B_{\lambda}(T-t)r_t}$ is plugged into the Feynman-Kac equation, and then using a system of 2 ODE's $A(\tau)$ $B(\tau)$ are derived.

Can anybody explain the proceedings please? I am missing "the big picture" here. I don't understand why it starts with Feynman-Kac and why only deriving A and B proves already that they satisfy the PDE.

## Answer by Quantuple (score 3, accepted)

https://quant.stackexchange.com/a/25867

Here's my 2 cents:

a) Conditional expectations can always be seen as martingales (this is a direct consequence of the tower property). Thus, we here have that $$ M_t := E^*[e^{-\lambda {r_{T}}}|r_t] $$ is a martingale.

Applying Itô's lemma to $M_t = f_{\lambda}(t,r_t)$ as you did is a good starting point. But doing this, leaves you with an SDE, not a PDE.

Now, because $M_t$ is a martingale, the martingale representation theorem tells you that its drift should be strictly zero. Working from your application of Ito's lemma, equating the drift to zero gives you the following PDE which needs to be satisfied by $f_{\lambda}(t,r)$: $$ \frac{\partial f_{\lambda}}{\partial t}+ a\left(b-r\right)\frac{\partial f_{\lambda}}{\partial r}+\frac{1}{2}\sigma^{2}r\frac{\partial^{2}f_{\lambda}}{\partial r^{2}} = 0$$

This is precisely Feynman-Kac formula.

Note that your equation (3) is wrong (and useless).Instead what we could write is: $$ M_T = f_{\lambda}(T,r_T) = E^*[e^{-\lambda {r_{T}}}|r_T]=e^{-\lambda {r_{T}}} $$ which could be seen as the PDE's terminal condition.

b) To show that the proposed $$ f_{\lambda} (t,r_t)=e^{-A_{\lambda}(T-t)-B_{\lambda}(T-t)r_t} $$ is effectively a solution of the just-derived PDE, you need to plug this particular expression of $f_{\lambda} (t,r_t)$ in the PDE and verify that the resulting RHS indeed equates to zero. Here, this condition can indeed be verified (for unique values for both $A_{\lambda}$ and $B_{\lambda}$ that one can solve for), hence you have indeed found a solution of the problem.

Hope this helps.

## Answer by parsiad (score 3)

https://quant.stackexchange.com/a/25864

Let $$ f_{\lambda}(t,r)=E^{(t,r)}\left[e^{-\lambda r_{T}}\right] $$ where $E^{(t,r)}$ denotes the expectation conditional on $r_{t}=r$. We assume $f$ is smooth for the remainder. Let $\theta=T\wedge\inf\left\{ s>t\colon\left|r_{s}-r\right|>1\right\} $. By the Markov property of $\{r_{t}\}$, $$ f_{\lambda}(t,r)=E^{(t,r)}\left[f_{\lambda}(\left(t+h\right)\wedge\theta,r_{\left(t+h\right)\wedge\theta})\right]. $$ Moving some terms around, we get $$ 0=E^{(t,r)}\left[f_{\lambda}(\left(t+h\right)\wedge\theta,r_{\left(t+h\right)\wedge\theta})-f_{\lambda}(t,r)\right]. $$ Applying Ito's lemma with $\mathcal{A}$ denoting the infinitesimal generator of the process $\{r_{t}\}$, \begin{align*} 0 & =E^{(t,r)}\left[\int_{t}^{\left(t+h\right)\wedge\theta}\left(\frac{\partial f_{\lambda}}{\partial t}+\mathcal{A}f_{\lambda}\right)(u,r_{u})du+\int_{t}^{\left(t+h\right)\wedge\theta}\frac{\partial f_{\lambda}}{\partial r}(u,r_{u})\sigma\sqrt{r_{u}}dW_{u}\right]\\ & =E^{(t,r)}\left[\int_{t}^{\left(t+h\right)\wedge\theta}\left(\frac{\partial f_{\lambda}}{\partial t}+\mathcal{A}f_{\lambda}\right)(u,r_{u})du\right]. \end{align*} The vanishing Ito integral is due to the boundedness of $r_{u}$ on $[t,(t+h)\wedge\theta]$. Multiplying by $1/h$ yields $$ 0=E^{(t,r)}\left[\frac{1}{h}\int_{t}^{\left(t+h\right)\wedge\theta}\left(\frac{\partial f_{\lambda}}{\partial t}+\mathcal{A}f_{\lambda}\right)(u,r_{u})du\right].\tag{1} $$ Since for each sample $\omega$ in some set of full measure there exists an $h_{0}(\omega)$ for which $\theta(\omega)\geq t+h$ for all $h\leq h_{0}(\omega)$, it follows from the mean value theorem that $\mathbb{P}$-almost surely, \begin{multline*} \lim_{h\searrow0}\frac{1}{h}\int_{t}^{\left(t+h\right)\wedge\theta}\left(\frac{\partial f_{\lambda}}{\partial t}+\mathcal{A}f_{\lambda}\right)(u,r_{u})du\\ =\lim_{h\searrow0}\frac{\left(t+h\right)\wedge\theta}{h}\left(\frac{\partial f_{\lambda}}{\partial t}+\mathcal{A}f_{\lambda}\right)(s(h),r_{s(h)})du=\left(\frac{\partial f_{\lambda}}{\partial t}+\mathcal{A}f_{\lambda}\right)(t,r) \end{multline*} where $s(h)$ is some number in $(t,(t+h)\wedge\theta)$. The remainder of the proof is given by taking $h\searrow0$ and applying the dominated convergence theorem in (1) to yield $$ \frac{\partial f_{\lambda}}{\partial t}+\mathcal{A}f_{\lambda}=0\text{ pointwise}. $$ where $$ \mathcal{A}f_{\lambda}\equiv a\left(b-r\right)\frac{\partial f_{\lambda}}{\partial r}+\frac{1}{2}\sigma^{2}r\frac{\partial^{2}f_{\lambda}}{\partial r^{2}}. $$

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.