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.
Contents
Theorem
Consider the partial differential equation
∂
∂
t
u
(
x
,
t
)
+
μ
(
x
,
t
)
∂
∂
x
u
(
x
,
t
)
+
1
2
σ
2
(
x
,
t
)
∂
2
Intuitive interpretation
Suppose that
X
t
{\displaystyle X_{t}}
describes the position at time
t
{\displaystyle t}
of a particle that evolves according to the diffusion process
A proof that the above expected-value 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:
When originally published by Kac in 1949, the formula was presented as a means for determining the distribution of certain Wiener functionals. Suppose we wish to find the expected value of the function
in the case where x(t) 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 corresponding diffusion equation. Specifically, under the conditions that
V
(
x
)
≥
0
{\displaystyle V(x)\geq 0}
Example
In practical applications, the Feynman–Kac formula can be used with numerical methods like Euler-Maruyama to numerically approximate solutions to partial differential equations. For instance, it can be applied to the convection–diffusion partial differential equation (PDE):
∂
∂
t
u
(
x
,
t
)
+
b
∂
∂
x
u
(
x
,
t
)
=
−
σ
2
∂
2
∂
x
2
u
(
x
,
t
Generalizations
Higher dimensions
The Feynman–Kac formula extends straighforwardly to the
in the classical setting from above is a parabolic equation, since it involves a first order derivative in time. The Feynman–Kac can also be extended to elliptic equations, where there is no time derivative and there exists a constant
c
>
0
{\displaystyle c>0}
such that
∑
i
,
j
=
1
d
(
σ
σ
T
)
i
j
(
x
)
ξ
i
ξ
j
≥
c
‖
ξ
Space-time domains
The Feynman–Kac formula can also be generalized to a setting, where the spacial domain of the above partial differential equation is bounded (in contrast to
R
d
{\displaystyle \mathbb {R} ^{d}}
) and where the space- and time domains are not independent (not a cartesian product).
In quantitative finance, the Feynman–Kac formula is used to efficiently calculate solutions to the Black–Scholes equation to price options on stocks and zero-coupon bond prices in affine term structure models.
The figure below compares the analytical solution with the numerical approximation obtained using the Euler–Maruyama method with
N
=
1000
{\displaystyle 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
{\displaystyle 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.
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.
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.