Feynman–Kac formula

From HandWiki
Short description: Formula relating stochastic processes to partial differential equations

The Feynman–Kac formula, named after Richard Feynman and Mark Kac, establishes a link between parabolic partial differential equations (PDEs) and stochastic processes. In 1947, when Kac and Feynman were both Cornell faculty, Kac attended a presentation of Feynman's and remarked that the two of them were working on the same thing from different directions.[1] The Feynman–Kac formula resulted, which proves rigorously the real-valued case of Feynman's path integrals. The complex case, which occurs when a particle's spin is included, is still an open question.[2]

It offers a method of solving certain partial differential equations by simulating random paths of a stochastic process. Conversely, an important class of expectations of random processes can be computed by deterministic methods.

Theorem

Consider the partial differential equation [math]\displaystyle{ \frac{\partial u}{\partial t}(x,t) + \mu(x,t) \frac{\partial u}{\partial x}(x,t) + \tfrac{1}{2} \sigma^2(x,t) \frac{\partial^2 u}{\partial x^2}(x,t) -V(x,t) u(x,t) + f(x,t) = 0, }[/math] defined for all [math]\displaystyle{ x \in \mathbb{R} }[/math] and [math]\displaystyle{ t \in [0, T] }[/math], subject to the terminal condition [math]\displaystyle{ u(x,T)=\psi(x), }[/math] where [math]\displaystyle{ \mu,\sigma,\psi,V,f }[/math] are known functions, [math]\displaystyle{ T }[/math] is a parameter, and [math]\displaystyle{ u:\mathbb{R} \times [0,T] \to \mathbb{R} }[/math] is the unknown. Then the Feynman–Kac formula tells us that the solution can be written as a conditional expectation

[math]\displaystyle{ u(x,t) = E^Q\left[ \int_t^T e^{- \int_t^\tau V(X_s,s)\, ds}f(X_\tau,\tau)d\tau + e^{-\int_t^T V(X_\tau,\tau)\, d\tau}\psi(X_T) \,\Bigg|\, X_t=x \right] }[/math]

under the probability measure [math]\displaystyle{ Q }[/math] such that [math]\displaystyle{ X }[/math] is an Itô process driven by the equation [math]\displaystyle{ dX_t = \mu(X,t)\,dt + \sigma(X,t)\,dW^Q_t, }[/math] with [math]\displaystyle{ W^{Q}(t) }[/math] is a Wiener process (also called Brownian motion) under [math]\displaystyle{ Q }[/math], and the initial condition for [math]\displaystyle{ X(t) }[/math] is [math]\displaystyle{ X(t) = x }[/math].

Intuitive interpretation

Suppose we have a particle moving according to the diffusion process [math]\displaystyle{ dX_t = \mu(X,t)\,dt + \sigma(X,t)\,dW^Q_t, }[/math] Let the particle incur "cost" at a rate of [math]\displaystyle{ f(X_s, s) }[/math] at location [math]\displaystyle{ X_s }[/math] at time [math]\displaystyle{ s }[/math]. Let it incur a final cost at [math]\displaystyle{ \psi(X_T) }[/math].

Also, allow the particle to decay. If the particle is at location [math]\displaystyle{ X_s }[/math] at time [math]\displaystyle{ s }[/math], then it decays with rate [math]\displaystyle{ V(X_s, s) }[/math]. After the particle has decayed, all future cost is zero.

Then, [math]\displaystyle{ u(x, t) }[/math] is the expected cost-to-go, if the particle starts at [math]\displaystyle{ (t, X_t = x) }[/math].

Partial proof

A proof that the above formula is a solution of the differential equation is long, difficult and not presented here. It is however reasonably straightforward to show that, if a solution exists, it must have the above form. The proof of that lesser result is as follows:

Let [math]\displaystyle{ u(x,t) }[/math] be the solution to the above partial differential equation. Applying the product rule for Itô processes to the process [math]\displaystyle{ Y(s) = \exp\left(-\int_t^s V(X_\tau,\tau)\, d\tau\right)u(X_s,s) + \int_t^s \exp\left(-\int_t^r V(X_\tau,\tau)\, d\tau\right) f(X_r,r) \, dr }[/math] one gets: [math]\displaystyle{ \begin{align} dY_s = {} & d\left(\exp\left(-\int_t^s V(X_\tau,\tau)\, d\tau\right)\right) u(X_s,s) + \exp\left(-\int_t^s V(X_\tau,\tau)\, d\tau\right)\,du(X_s,s) \\[6pt] & {} + d\left(\exp\left(-\int_t^s V(X_\tau,\tau)\, d\tau\right)\right)du(X_s,s) + d\left(\int_t^s \exp\left(-\int_t^r V(X_\tau,\tau)\, d\tau\right) f(X_r,r) \, dr\right) \end{align} }[/math]

Since [math]\displaystyle{ d\left(\exp\left(- \int_t^s V(X_\tau,\tau)\, d\tau\right)\right) = -V(X_s,s) \exp\left(-\int_t^s V(X_\tau,\tau)\, d\tau\right) \,ds, }[/math] the third term is [math]\displaystyle{ O(dt \, du) }[/math] and can be dropped. We also have that [math]\displaystyle{ d\left(\int_t^s \exp\left(- \int_t^r V(X_\tau,\tau)\, d\tau\right)f(X_r,r)dr\right) = \exp\left(-\int_t^s V(X_\tau,\tau)\, d\tau\right) f(X_s,s) ds. }[/math]

Applying Itô's lemma to [math]\displaystyle{ du(X_s,s) }[/math], it follows that [math]\displaystyle{ \begin{align} dY_s = {} & \exp\left(-\int_t^s V(X_\tau,\tau)\, d\tau\right)\,\left(-V(X_s,s) u(X_s,s) +f(X_s,s)+\mu(X_s,s)\frac{\partial u}{\partial X}+\frac{\partial u}{\partial s}+\tfrac{1}{2}\sigma^2(X_s,s)\frac{\partial^2 u}{\partial X^2}\right)\,ds \\[6pt] & {} + \exp\left(- \int_t^s V(X_\tau,\tau)\, d\tau\right)\sigma(X,s)\frac{\partial u}{\partial X}\,dW. \end{align} }[/math]

The first term contains, in parentheses, the above partial differential equation and is therefore zero. What remains is: [math]\displaystyle{ dY_s=\exp\left(-\int_t^s V(X_\tau,\tau)\, d\tau\right)\sigma(X,s)\frac{\partial u}{\partial X}\,dW. }[/math]

Integrating this equation from [math]\displaystyle{ t }[/math] to [math]\displaystyle{ T }[/math], one concludes that: [math]\displaystyle{ Y(T) - Y(t) = \int_t^T \exp\left(-\int_t^s V(X_\tau,\tau)\, d\tau\right) \sigma(X,s)\frac{\partial u}{\partial X}\,dW. }[/math]

Upon taking expectations, conditioned on [math]\displaystyle{ X_{t} = x }[/math], and observing that the right side is an Itô integral, which has expectation zero,[3] it follows that: [math]\displaystyle{ E[Y(T)\mid X_t=x] = E[Y(t)\mid X_t=x] = u(x,t). }[/math]

The desired result is obtained by observing that: [math]\displaystyle{ E[Y(T)\mid X_t=x] = E \left [\exp\left(-\int_t^T V(X_\tau,\tau)\, d\tau\right) u(X_T,T) + \int_t^T \exp\left(-\int_t^r V(X_\tau,\tau)\, d\tau\right)f(X_r,r)\,dr \,\Bigg|\, X_t=x \right ] }[/math] and finally [math]\displaystyle{ u(x,t) = E \left [\exp\left(-\int_t^T V(X_\tau,\tau)\, d\tau\right) \psi(X_T) + \int_t^T \exp\left(-\int_t^s V(X_\tau,\tau)\,d\tau\right) f(X_s,s)\,ds \,\Bigg|\, X_t=x \right ] }[/math]

Remarks

  • The proof above that a solution must have the given form is essentially that of [4] with modifications to account for [math]\displaystyle{ f(x,t) }[/math].
  • The expectation formula above is also valid for N-dimensional Itô diffusions. The corresponding partial differential equation for [math]\displaystyle{ u:\mathbb{R}^N\times [0,T] \to\mathbb{R} }[/math] becomes:[5] [math]\displaystyle{ \frac{\partial u}{\partial t} + \sum_{i=1}^N \mu_i(x,t)\frac{\partial u}{\partial x_i} + \frac{1}{2} \sum_{i=1}^N \sum_{j=1}^N\gamma_{ij}(x,t) \frac{\partial^2 u}{\partial x_i \partial x_j} -r(x,t)\,u = f(x,t), }[/math] where, [math]\displaystyle{ \gamma_{ij}(x,t) = \sum_{k=1}^N \sigma_{ik}(x,t)\sigma_{jk}(x,t), }[/math] i.e. [math]\displaystyle{ \gamma = \sigma \sigma^{\mathrm{T}} }[/math], where [math]\displaystyle{ \sigma^{\mathrm{T}} }[/math] denotes the transpose of [math]\displaystyle{ \sigma }[/math].
  • More succinctly, letting [math]\displaystyle{ A }[/math] be the infinitesimal generator of the diffusion process,[math]\displaystyle{ \frac{\partial u}{\partial t} + A u -r(x,t)\,u = f(x,t), }[/math]
  • This expectation can then be approximated using Monte Carlo or quasi-Monte Carlo methods.
  • When originally published by Kac in 1949,[6] the Feynman–Kac formula was presented as a formula for determining the distribution of certain Wiener functionals. Suppose we wish to find the expected value of the function [math]\displaystyle{ \exp\left(-\int_0^t V(x(\tau))\, d\tau\right) }[/math] in the case where x(τ) is some realization of a diffusion process starting at x(0) = 0. The Feynman–Kac formula says that this expectation is equivalent to the integral of a solution to a diffusion equation. Specifically, under the conditions that [math]\displaystyle{ u V(x) \geq 0 }[/math], [math]\displaystyle{ E\left[\exp\left(- u \int_0^t V(x(\tau))\, d\tau\right) \right] = \int_{-\infty}^{\infty} w(x,t)\, dx }[/math] where w(x, 0) = δ(x) and [math]\displaystyle{ \frac{\partial w}{\partial t} = \frac{1}{2} \frac{\partial^2 w}{\partial x^2} - u V(x) w. }[/math]

The Feynman–Kac formula can also be interpreted as a method for evaluating functional integrals of a certain form. If [math]\displaystyle{ I = \int f(x(0)) \exp\left(-u\int_0^t V(x(t))\, dt\right) g(x(t))\, Dx }[/math] where the integral is taken over all random walks, then [math]\displaystyle{ I = \int w(x,t) g(x)\, dx }[/math] where w(x, t) is a solution to the parabolic partial differential equation [math]\displaystyle{ \frac{\partial w}{\partial t} = \frac{1}{2} \frac{\partial^2 w}{\partial x^2} - u V(x) w }[/math] with initial condition w(x, 0) = f(x).

Applications

Finance

In quantitative finance, the Feynman–Kac formula is used to efficiently calculate solutions to the Black–Scholes equation to price options on stocks[7] and zero-coupon bond prices in affine term structure models.

For example, consider a stock price [math]\displaystyle{ S_t }[/math] that follows a geometric Brownian walk:[math]\displaystyle{ dS_t = (r_t dt + \sigma_t dW_t) S_t }[/math]where [math]\displaystyle{ r_t }[/math] is the risk-free interest rate, and [math]\displaystyle{ \sigma_t }[/math] is the volatility. Equivalently by Ito's lemma,[math]\displaystyle{ d\ln S_t = \left(r_t - \tfrac 1 2 \sigma_t^2\right)dt + \sigma_t \, dW_t }[/math]Now consider a European option on an underlying stock that matures at time [math]\displaystyle{ T }[/math] with price [math]\displaystyle{ C }[/math]. At maturation, it is worth [math]\displaystyle{ (X_T - C)_+ }[/math].

Then, the risk-neutral price of the option, at time [math]\displaystyle{ t }[/math] and stock price [math]\displaystyle{ x }[/math], is [math]\displaystyle{ u(x, t) = E\left[e^{-\int_t^T r_s ds} (S_T - C)_+ | \ln S_t = \ln x \right] }[/math]Plugging in the Feynman–Kac formula, we get the Black–Scholes equation: [math]\displaystyle{ \begin{cases} \partial_t u + Au - r_t u = 0 \\ u(x, T) = (x-C)_+ \end{cases} }[/math] where [math]\displaystyle{ A = (r_t -\sigma_t^2/2)\partial_{\ln x} + \frac 12 \sigma_t^2 \partial_{\ln x}^2 = r_t x\partial_x + \frac 1 2 \sigma_t^2 x^2 \partial_{x}^2 }[/math].

More generally, consider any option with fixed maturation time [math]\displaystyle{ T }[/math], and whose payoff at maturation is determined fully by the stock price at maturation: [math]\displaystyle{ K(S_T) }[/math], then the same calculation shows that its price function satisfies [math]\displaystyle{ \begin{cases} \partial_t u + Au - r_t u = 0 \\ u(x, T) = K(x) \end{cases} }[/math]

Some other options like the American option do not have a fixed maturation time. Some options have value at maturation determined by the past stock prices. For example, the average option is an option where the payoff is not determined by the underlying price at maturity but by the average underlying price over some pre-set period of time. For those, the Feynman–Kac formula does not directly apply.

Quantum mechanics

In quantum chemistry, it is used to solve the Schrödinger equation with the Pure Diffusion Monte Carlo method.[8]

See also

References

  1. Kac, Mark (1987). Enigmas of Chance: An Autobiography. University of California Press. pp. 115–16. ISBN 0-520-05986-7. https://books.google.com/books?id=1ZWl39UJWycC&pg=PA115. 
  2. Glimm, James; Jaffe, Arthur (1987). Quantum Physics: A Functional Integral Point of View (2 ed.). New York, NY: Springer. pp. 43–44. doi:10.1007/978-1-4612-4728-9. ISBN 978-0-387-96476-8. https://doi.org/10.1007/978-1-4612-4728-9. Retrieved 13 April 2021. 
  3. Øksendal, Bernt (2003). "Theorem 3.2.1.(iii)" (in en). Stochastic Differential Equations. An Introduction with Applications (6th ed.). Springer-Verlag. p. 30. ISBN 3540047581. 
  4. "PDE for Finance". http://www.math.nyu.edu/faculty/kohn/pde_finance.html. 
  5. See Pham, Huyên (2009). Continuous-time stochastic control and optimisation with financial applications. Springer-Verlag. ISBN 978-3-642-10044-4. 
  6. Kac, Mark (1949). "On Distributions of Certain Wiener Functionals". Transactions of the American Mathematical Society 65 (1): 1–13. doi:10.2307/1990512.  This paper is reprinted in Baclawski, K.; Donsker, M. D., eds (1979). Mark Kac: Probability, Number Theory, and Statistical Physics, Selected Papers. Cambridge, Massachusetts: The MIT Press. pp. 268–280. ISBN 0-262-11067-9. 
  7. Paolo Brandimarte (6 June 2013). "Chapter 1. Motivation". Numerical Methods in Finance and Economics: A MATLAB-Based Introduction. John Wiley & Sons. ISBN 978-1-118-62557-6. https://books.google.com/books?id=iH9ltZtOsM4C. 
  8. Caffarel, Michel; Claverie, Pierre (15 January 1988). "Development of a pure diffusion quantum Monte Carlo method using a full generalized Feynman–Kac formula. I. Formalism". The Journal of Chemical Physics 88 (2): 1088–1099. doi:10.1063/1.454227. Bibcode1988JChPh..88.1088C. https://aip.scitation.org/doi/10.1063/1.454227. 

Further reading

  • Simon, Barry (1979). Functional Integration and Quantum Physics. Academic Press. 
  • Hall, B. C. (2013). Quantum Theory for Mathematicians. Springer.