GO-Ve01
ServicesDevelopersBooksDictionaryPapersWikidataEncyclopediaSearchBabelCareersDeck

Feynman–Kac formula

The Feynman–Kac formula, named after Richard Feynman and Mark Kac, establishes a link between parabolic partial differential equations and stochastic processes. In 1947, when Kac and Feynman were both faculty members at Cornell University, Kac attended a presentation of Feynman's and remarked that the two of them were working on the same thing from different directions. The Feynman–Kac formula resulted, which proves rigorously a real-valued analogy to Feynman's path integrals. The complex case, needed in quantum mechanics, is still an open question. The formula offers a method of solving certain partial differential equations by simulating random paths of a stochastic process. Conversely... Source: e01 Encyclopedia. Licence: CC BY-SA 4.0.

The Feynman–Kac formula, named after Richard Feynman and Mark Kac, establishes a link between parabolic partial differential equations and stochastic processes. In 1947, when Kac and Feynman were both faculty members at Cornell University, Kac attended a presentation of Feynman's and remarked that the two of them were working on the same thing from different directions. The Feynman–Kac formula resulted, which proves rigorously a real-valued analogy to Feynman's path integrals. The complex case, needed in quantum mechanics, is still an open question. The formula offers a method of solving certain partial differential equations by simulating random paths of a stochastic process. Conversely, it can be used to compute an important class of expectations of random processes by deterministic means. Consider the partial differential equation \frac{\partial}{\partial t}u(x,t) + \mu(x,t) \frac{\partial}{\partial x}u(x,t) + \tfrac{1}{2} \sigma^2(x,t) \frac{\partial^2}{\partial x^2}u(x,t) -V(x,t) u(x,t) + f(x,t) = 0, defined for all x \in \mathbb{R} and t \in [0, T] , subject to the terminal condition u(x,T) = \psi(x), where \mu,\sigma,f:\R\times[0,T]\to\R , \psi:\R\to\R , and V:\R\times[0,T]\to[0,\infty) are known functions, T>0 is a parameter, and u:\mathbb{R} \times [0,T] \to \mathbb{R} is the unknown function. If a solution to the above equation exists, then the Feynman–Kac formula expresses u(x,t) as a conditional expectation of a certain random variable: {{Equation box 1|cellpadding|border|indent=:|equation= u(x,t) = \mathbb{E}\left[e^{-\int_t^T V(X_s,s)\, \mathrm{d}s}\psi(X_T) + \int_t^T e^{-\int_t^\tau V(X_s,s)\, \mathrm{d}s}f(X_\tau,\tau)\,\mathrm{d}\tau \,\,\Bigg|\,\, X_t=x \right] |border colour=#0073CF|background colour=#F5FFFA}} where X_t is an Itô process satisfying the stochastic differential equation dX_t = \mu(X_t,t) \, dt + \sigma(X_t,t) \, dW_t, and W_t is the Wiener process (also called Brownian motion). The result only holds, if the functions \mu,\sigma,f,V,\psi fulfill certain technical requirements. First of all, the functions \mu and \sigma must be such that the above stochastic differential equation has a unique (strong or weak) solution. This is for example the case, when \mu and \sigma are Lipschitz-continuous in space, i.e., there exists a constant L>0 such that \begin{align} &|\mu(t,x)-\mu(t,y)|\leq L|x-y|, \\ &|\sigma(t,x)-\sigma(t,y)|\leq L|x-y|, \end{align} for all t\in[0,T] and x,y\in\R . Moreover, the functions f,V,\psi must be continuous and f,\psi must be additionally either non-negative or of polynomial growth, which means \begin{align} |\psi(x)|&\leq K(1+|x|^p), \\ \max_{t\in[0,T]}|f(t,x)|&\leq K(1+|x|^p), \end{align} for some K>0 , p\geq 2 and for all x\in\R . And finally, the solution u itself must be of polynomial growth as well (however with different constant and exponent). dX_t = \mu(X_t,t) \, dt + \sigma(X_t,t) \, dW_t. Let the particle incur "cost" at a rate of f(X_s, s) at location X_s at time s . Let it incur a final cost at time T of \psi(X_T) . Also, allow the particle to decay. If the particle is at location X_s at time s , then it decays with rate V(X_s, s) . After the particle has decayed away, all future cost is zero. Then u(x, t) is the expected cost-to-go, if the particle starts at (t, X_t = x). \frac{\partial u}{\partial t} + \mu \frac{\partial u}{\partial x} + \frac{1}{2} \sigma^2 \frac{\partial^2 u}{\partial x^2} - V u + f = 0 with terminal condition u(x,T) = \psi(x). Further let X_t be a stochastic process as defined above. Let g(t,s) = e^{-\int_t^s V(X_r, r) dr} . Its differential satisfies: dg(t,s) = -V(X_s, s) g(t,s) \, ds. Define the stochastic process: Y_s = g(t,s) u(X_s, s) + \int_t^s g(t,\tau) f(X_\tau, \tau) \, d\tau for s\in [t,T] . At boundary times: Y_t = u(X_t, t), \quad Y_T = g(t,T) \psi(X_T) + \int_t^T g(t,\tau) f(X_\tau, \tau) \, d\tau. If Y_s is a martingale, then we have u(x,t) = \mathbb{E}[Y_{T} \mid Y_{t}=u(x,t)] = \mathbb{E}[Y_{T} \mid X_{t}=x] which is what we want to show. So we just need to prove Y_s is a martingale. We assume X_s follows the SDE dX_s = \mu(X_s, s) \, ds + \sigma(X_s, s) \, dW_s. By Itô's lemma: du(X_s, s) = \left( \frac{\partial u}{\partial s} + \mu \frac{\partial u}{\partial x} + \frac{1}{2} \sigma^2 \frac{\partial^2 u}{\partial x^2} \right) ds + \sigma \frac{\partial u}{\partial x} dW_s. Differentiate Y_s : dY_s = d\left[g(t,s) u(X_s, s)\right] + g(t,s) f(X_s, s) \, ds. Expand d[g u] : d[g u] = g \, du + u \, dg + \underbrace{d[g, u]}_{=0}. Substitute dg = -V g \, ds and du : d[g u] = g \left( \frac{\partial u}{\partial s} + \mu \frac{\partial u}{\partial x} + \frac{1}{2} \sigma^2 \frac{\partial^2 u}{\partial x^2} \right) ds \qquad\quad +\; g \sigma \frac{\partial u}{\partial x} \, dW_s \;-\; V g u \, ds. Add the integral term: dY_s = \left[ g \left( \frac{\partial u}{\partial s} + \mu \frac{\partial u}{\partial x} + \frac{1}{2} \sigma^2 \frac{\partial^2 u}{\partial x^2} \right) - V g u + g f \right] ds + g \sigma \frac{\partial u}{\partial x} dW_s. For Y_s to be a martingale, the drift term must vanish: \frac{\partial u}{\partial s} + \mu \frac{\partial u}{\partial x} + \frac{1}{2} \sigma^2 \frac{\partial^2 u}{\partial x^2} - V u + f = 0. The expectation formula above is also valid for N-dimensional Itô diffusions. The corresponding partial differential equation for u:\mathbb{R}^N\times [0,T] \to\mathbb{R} becomes: \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), where, \gamma_{ij}(x,t) = \sum_{k=1}^N \sigma_{ik}(x,t)\sigma_{jk}(x,t), i.e. \gamma = \sigma \sigma^{\mathrm{T}} , where \sigma^{\mathrm{T}} denotes the transpose of \sigma . More succinctly, letting A be the infinitesimal generator of the diffusion process, \frac{\partial u}{\partial t} + A u -r(x,t)\,u = f(x,t). This expectation can then be approximated using Monte Carlo or quasi-Monte Carlo methods. \exp\left(-\int_0^t V(x(\tau))\, d\tau\right) in the case where x(t) is some realization of a diffusion process starting at . The Feynman–Kac formula says that this expectation is equivalent to the integral of a solution to a corresponding diffusion equation. Specifically, under the conditions that V(x) \geq 0 , \mathbb{E}\left[\exp\left(- \int_0^t V(x(\tau))\, d\tau\right) \right] = \int_{-\infty}^{\infty} w(x,t)\, dx where is the solution to the parabolic partial differential equation \frac{\partial w}{\partial t} = \frac{1}{2} \frac{\partial^2 w}{\partial x^2} - V(x) w with initial condition . The Feynman–Kac formula can also be used to evaluate functional integrals of a certain form. If, for example, I = \int f(x(0)) \exp\left(-\int_0^t V(x(\tau))\, d\tau\right) g(x(t))\, Dx where the notation Dx refers to integration taken over all random walks x : [0,t]\to\R , then I = \int_{-\infty}^{\infty} w(x,t) g(x)\, dx where is the solution to \frac{\partial w}{\partial t} = \frac{1}{2} \frac{\partial^2 w}{\partial x^2} - V(x) w with initial condition . \frac{\partial}{\partial t} u(x, t) + b \frac{\partial}{\partial x} u(x, t) = -\sigma^2 \frac{\partial^2}{\partial x^2} u(x, t) Consider the convection–diffusion PDE with parameters b = 1 , \sigma = 1 and terminal condition u(x,T) = e^{-x^2} with T = 1 . Then the PDE can be solved analytically: u(x, t) = \frac{1}{\sqrt{5 - 4t}} \exp \left(-\frac{(1 - t + x)^2}{5 - 4t} \right) Applying the Feynman-Kac formula, the solution can also be written as the conditional expectation: u(x, t) = \mathbb{E}\left[e^{-X_{T}^2}\, \bigl| \, X_t = x\right] where X is an Itô process governed by the SDE dX_t = dt + \sqrt{2} dW_t and W_t is a Wiener process. Then using the Euler-Maruyama method, the SDE can be numerically integrated forwards in time from the initial condition (x_0, t_0) till the terminal time T, yielding simulated values of X_T . To approximate the expectation in the Feynman-Kac method, the simulation is repeated N times. These are often called realizations. The solution is then estimated by the Monte Carlo average u(x_0, t_0) \approx \frac{1}{N} \sum_{i=1}^{N} \exp\left( - \left( X_T^{(i)} \right)^2 \right) The figure below compares the analytical solution with the numerical approximation obtained using the Euler–Maruyama method with N = 1000 . The left-hand plots show vertical slices of the gradient plot on the right, with each vertical line on the surface corresponding to a colored curve on the left. While the numerical solution exhibits some noise, it closely follows the shape of the exact solution. Increasing the number of simulations N or decreasing the Euler–Maruyama time step improves the accuracy and reduces the variance of the approximation. This example illustrates how stochastic simulation, enabled by the Feynman–Kac formula and numerical methods like Euler–Maruyama, can approximate PDE solutions. In practice, such stochastic approaches are especially valuable when dealing with high-dimensional systems or complex geometries where traditional PDE solvers become computationally prohibitive. One key advantage of the SDE-based method is its natural parallelism—each simulation, or realization, can be computed independently—making it well-suited for high-performance computing environments. While stochastic simulations introduce variance, this can be mitigated by increasing the number of realizations or refining the time discretization. Thus, stochastic differential equations provide a flexible and scalable alternative to deterministic PDE solvers, particularly in contexts where uncertainty is intrinsic or dimensionality poses a computational barrier. In contrast to traditional PDE solvers, which typically require solving for the entire solution over a grid, this method enables direct computation at specific points in space and time. This targeted approach allows computational resources to be focused on regions of interest, potentially resulting in substantial efficiency gains. \frac{\partial}{\partial t}u(x,t) + \mu(x,t)\cdot\nabla u(x,t) + \tfrac{1}{2} \sum_{i,j=1}^d (\sigma\sigma^T)_{ij}(x,t) \frac{\partial^2}{\partial x_ix_j}u(x,t) -V(x,t) u(x,t) + f(x,t) = 0, defined for all x \in \mathbb{R}^d and t \in [0, T] , subject to the terminal condition u(x,T) = \psi(x), \qquad x\in\R^d. Then, under the same technical assumptions as in the one-dimensional case, the Feynman–Kac formula for u reads as u(x,t) = \mathbb{E}\left[e^{-\int_t^T V(X_s,s)\, \mathrm{d}s}\psi(X_T) + \int_t^T e^{-\int_t^\tau V(X_s,s)\, \mathrm{d}s}f(X_\tau,\tau)\,\mathrm{d}\tau \,\,\Bigg|\,\, X_t=x \right], where X=(X^1,\dots,X^d) is the solution to the stochastic differential equation \mathrm dX_t^i = \mu_i(X_t,t)\mathrm dt + \sum_{j=1}^m\sigma_{ij}(X_t,t)\mathrm dW_t^j, \qquad i\in\{1,\dots,d\}, and W^1,\dots,W^m are m independent Wiener processes. \sum_{i,j=1}^d(\sigma\sigma^T)_{ij}(x)\xi_i\xi_j \geq c\lVert\xi\rVert^2, \qquad \forall\xi\in\R^d,\,x\in D, for some bounded domain D\subset\R^d . The stochastic process X needed for the formula is now the solution to the time-homogeneous equation \mathrm dX_t^i = \mu_i(X_t)\mathrm dt + \sum_{j=1}^m\sigma_{ij}(X_t)\mathrm dW_t^j, \qquad i\in\{1,\dots,d\}, with Lipschitz continuous functions \mu:D\to\R^d and \sigma:D\to\R^{d\times m} . Now, given continuous functions f:\bar D\to\R , \psi:\partial D\to\R , V:\bar D\to[0,\infty) , if there exists a solution u to the equation (sometimes called the Dirichlet problem ) \begin{cases} & \mu\cdot\nabla u + \tfrac{1}{2} \sum_{i,j=1}^d (\sigma\sigma^T)_{ij} \frac{\partial^2}{\partial x_ix_j}u -V u + f = 0, && \text{in } D \\ &u = \psi, && \text{on } \partial D \end{cases} and if the first exit time of X from D is bounded in expectation, \begin{align} &\tau_D :=\inf\{t\geq 0: X_t\notin D\}, \\[0.3cm] &\mathbb E[\tau_D\mid X_0=x] then u admits the representation u(x) = \mathbb E\Big[e^{-\int_0^{\tau}V(X_r)\mathrm dr}\psi(X_\tau) + \int_0^{\tau}e^{-\int_0^s V(X_r)\mathrm dr} f(X_s)\mathrm ds \mid X_0=x \Big],\qquad \forall x\in \bar D. Under additional assumptions on the smoothness of the domain D and of the coefficient functions \mu,\sigma,f,\psi,V , one can show that the Dirichlet problem has indeed a unique solution, which is then given by the Feynman–Kac formula. Let D\subset \R^d\times(0,T] be a bounded space-time domain and D_t=\{x\in\R^d:(x,t)\in D\} a time section of D . Define as X the solution of the stochastic differential equation \mathrm dX_t^i = \mu_i(X_t,t)\mathrm ds + \sum_{j=1}^m\sigma_{ij}(X_t,t)\mathrm dW_t^j, \qquad i\in\{1,\dots,d\}, with Lipschitz continuous functions \mu:D\to\R^d and \sigma:D\to\R^{d\times m} , and the first exit time of X from D as \tau=\inf\{s>0: X_s\in D_s\}. Given functions f:D\to\R , \psi:\partial D\setminus (\{0\}\times D_0)\to\R , V:D\to[0,\infty) , and if certain technical assumptions are fulfilled, then the equation \begin{cases} &\frac{\partial}{\partial t}u + \mu\cdot\nabla u + \tfrac{1}{2} \sum_{i,j=1}^d (\sigma\sigma^T)_{ij} \frac{\partial^2}{\partial x_ix_j}u -V u + f = 0, && \text{in } D \\ &u = \psi, && \text{on } \partial D\setminus(\{0\}\times D_0) & \end{cases} has a unique solution u , which is given by u(x,t) = \mathbb E\Big[e^{-\int_t^{\tau}V(X_r,r)\mathrm dr}\psi(X_{\tau},\tau) + \int_t^{\tau}e^{-\int_t^s V(X_r,r)\mathrm dr} f(X_s,s)\mathrm ds \mid X_t=x \Big]. dS_t = \left(r_t dt + \sigma_t dW_t\right) S_t where r_t is the risk-free interest rate and \sigma_t is the volatility. Equivalently, by Itô's lemma, d\ln S_t = \left(r_t - \tfrac 1 2 \sigma_t^2\right)dt + \sigma_t \, dW_t. Now consider a European call option on an S_t expiring at time T with strike K . At expiry, it is worth (X_T - K)^+. Then, the risk-neutral price of the option, at time t and stock price x , is u(x, t) = \operatorname{E}\left[e^{-\int_t^T r_s ds} (S_T - K)^+ | \ln S_t = \ln x \right]. Plugging into the Feynman–Kac formula, we obtain the Black–Scholes equation: \begin{cases} \partial_t u + Au - r_t u = 0 \\ u(x, T) = (x-K)^+ \end{cases} where 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. More generally, consider an option expiring at time T with payoff g(S_T) . The same calculation shows that its price u(x,t) satisfies \begin{cases} \partial_t u + Au - r_t u = 0 \\ u(x, T) = g(x). \end{cases} Some other options like the American option do not have a fixed expiry. Some options have value at expiry determined by the past stock prices. For example, an average option has a payoff that is not determined by the underlying price at expiry but by the average underlying price over some predetermined period of time. For these, the Feynman–Kac formula does not directly apply.

source: e01 Encyclopedia · licence: CC BY-SA 4.0 · page · source revision

Cite this

"Feynman–Kac formula". 1789886029. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1375825664

JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy

Save to pass ·