The Feynman–Kac formula named after Richard Feynman and Mark Kac , establishes a link between parabolic partial differential equations (PDEs) and stochastic processes . It offers a method of solving certain PDEs by simulating random paths of a stochastic process. Conversely, an important class of expectations of random processes can be computed by deterministic methods. Consider the PDE
∂
u
∂
t
(
x
,
t
)
+
μ
(
x
,
t
)
∂
u
∂
x
(
x
,
t
)
+
1
2
σ
2
(
x
,
t
)
∂
2
u
∂
x
2
(
x
,
t
)
−
V
(
x
,
t
)
u
(
x
,
t
)
+
f
(
x
,
t
)
=
0
,
{\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,}
defined for all x in R and t in [0, T ], subject to the terminal condition
u
(
x
,
T
)
=
ψ
(
x
)
,
{\displaystyle u(x,T)=\psi (x),}
where μ, σ, ψ, V , f are known functions, T is a parameter and
u
:
R
×
[
0
,
T
]
→
R
{\displaystyle u:\mathbb {R} \times [0,T]\to \mathbb {R} }
is the unknown. Then the Feynman–Kac formula tells us that the solution can be written as a conditional expectation
u
(
x
,
t
)
=
E
Q
[
∫
t
T
e
−
∫
t
r
V
(
X
τ
,
τ
)
d
τ
f
(
X
r
,
r
)
d
r
+
e
−
∫
t
T
V
(
X
τ
,
τ
)
d
τ
ψ
(
X
T
)
|
X
t
=
x
]
{\displaystyle u(x,t)=E^{Q}\left[\int _{t}^{T}e^{-\int _{t}^{r}V(X_{\tau },\tau )\,d\tau }f(X_{r},r)dr+e^{-\int _{t}^{T}V(X_{\tau },\tau )\,d\tau }\psi (X_{T}){\Bigg |}X_{t}=x\right]}
under the probability measure Q such that X is an Itō process driven by the equation
d
X
=
μ
(
X
,
t
)
d
t
+
σ
(
X
,
t
)
d
W
Q
,
{\displaystyle dX=\mu (X,t)\,dt+\sigma (X,t)\,dW^{Q},}
with WQ (t ) is a Wiener process (also called Brownian motion ) under Q , and the initial condition for X (t ) is X (t) = x .
Proof
Let u (x , t ) be the solution to above PDE. Applying Itō's lemma to the process
Y
(
s
)
=
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
u
(
X
s
,
s
)
+
∫
t
s
e
−
∫
t
r
V
(
X
τ
,
τ
)
d
τ
f
(
X
r
,
r
)
d
r
{\displaystyle Y(s)=e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }u(X_{s},s)+\int _{t}^{s}e^{-\int _{t}^{r}V(X_{\tau },\tau )\,d\tau }f(X_{r},r)\,dr}
one gets
d
Y
=
d
(
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
)
u
(
X
s
,
s
)
+
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
d
u
(
X
s
,
s
)
+
d
(
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
)
d
u
(
X
s
,
s
)
+
d
(
∫
t
s
e
−
∫
t
r
V
(
X
τ
,
τ
)
d
τ
f
(
X
r
,
r
)
d
r
)
{\displaystyle {\begin{aligned}dY={}&d\left(e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }\right)u(X_{s},s)+e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }\,du(X_{s},s)\\[6pt]&{}+d\left(e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }\right)du(X_{s},s)+d\left(\int _{t}^{s}e^{-\int _{t}^{r}V(X_{\tau },\tau )\,d\tau }f(X_{r},r)\,dr\right)\end{aligned}}}
Since
d
(
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
)
=
−
V
(
X
s
,
s
)
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
d
s
,
{\displaystyle d\left(e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }\right)=-V(X_{s},s)e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }\,ds,}
the third term is
O
(
d
t
d
u
)
{\displaystyle O(dt\,du)}
and can be dropped. We also have that
d
(
∫
t
s
e
−
∫
t
r
V
(
X
τ
,
τ
)
d
τ
f
(
X
r
,
r
)
d
r
)
=
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
f
(
X
s
,
s
)
d
s
.
{\displaystyle d\left(\int _{t}^{s}e^{-\int _{t}^{r}V(X_{\tau },\tau )\,d\tau }f(X_{r},r)dr\right)=e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }f(X_{s},s)ds.}
Applying Itō's lemma once again to
d
u
(
X
s
,
s
)
{\displaystyle du(X_{s},s)}
, it follows that
d
Y
=
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
(
−
V
(
X
s
,
s
)
u
(
X
s
,
s
)
+
f
(
X
s
,
s
)
+
μ
(
X
s
,
s
)
∂
u
∂
X
+
∂
u
∂
s
+
1
2
σ
2
(
X
s
,
s
)
∂
2
u
∂
X
2
)
d
s
+
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
σ
(
X
,
s
)
∂
u
∂
X
d
W
.
{\displaystyle {\begin{aligned}dY={}&e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }\,\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]&{}+e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }\sigma (X,s){\frac {\partial u}{\partial X}}\,dW.\end{aligned}}}
The first term contains, in parentheses, the above PDE and is therefore zero. What remains is
d
Y
=
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
σ
(
X
,
s
)
∂
u
∂
X
d
W
.
{\displaystyle dY=e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }\sigma (X,s){\frac {\partial u}{\partial X}}\,dW.}
Integrating this equation from t to T , one concludes that
Y
(
T
)
−
Y
(
t
)
=
∫
t
T
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
σ
(
X
,
s
)
∂
u
∂
X
d
W
.
{\displaystyle Y(T)-Y(t)=\int _{t}^{T}e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }\sigma (X,s){\frac {\partial u}{\partial X}}\,dW.}
Upon taking expectations, conditioned on Xt = x , and observing that the right side is an Itō integral , which has expectation zero, it follows that
E
[
Y
(
T
)
∣
X
t
=
x
]
=
E
[
Y
(
t
)
∣
X
t
=
x
]
=
u
(
x
,
t
)
.
{\displaystyle E[Y(T)\mid X_{t}=x]=E[Y(t)\mid X_{t}=x]=u(x,t).}
The desired result is obtained by observing that
E
[
Y
(
T
)
∣
X
t
=
x
]
=
E
[
e
−
∫
t
T
V
(
X
τ
,
τ
)
d
τ
u
(
X
T
,
T
)
+
∫
t
T
e
−
∫
t
r
V
(
X
τ
,
τ
)
d
τ
f
(
X
r
,
r
)
d
r
|
X
t
=
x
]
{\displaystyle E[Y(T)\mid X_{t}=x]=E\left[e^{-\int _{t}^{T}V(X_{\tau },\tau )\,d\tau }u(X_{T},T)+\int _{t}^{T}e^{-\int _{t}^{r}V(X_{\tau },\tau )\,d\tau }f(X_{r},r)\,dr\,{\Bigg |}\,X_{t}=x\right]}
and finally
u
(
x
,
t
)
=
E
[
e
−
∫
t
T
V
(
X
τ
,
τ
)
d
τ
ψ
(
X
T
)
+
∫
t
T
e
−
∫
t
s
V
(
X
τ
,
τ
)
d
τ
f
(
X
s
,
s
)
d
s
|
X
t
=
x
]
{\displaystyle u(x,t)=E\left[e^{-\int _{t}^{T}V(X_{\tau },\tau )\,d\tau }\psi (X_{T})+\int _{t}^{T}e^{-\int _{t}^{s}V(X_{\tau },\tau )\,d\tau }f(X_{s},s)\,ds\,{\Bigg |}\,X_{t}=x\right]}
The proof above is essentially that of [ 1] with modifications to account for
f
(
x
,
t
)
{\displaystyle f(x,t)}
.
The expectation formula above is also valid for N -dimensional Itô diffusions. The corresponding PDE for
u
:
R
N
×
[
0
,
T
]
→
R
{\displaystyle u:\mathbb {R} ^{N}\times [0,T]\to \mathbb {R} }
becomes (see H. Pham book below):
∂
u
∂
t
+
∑
i
=
1
N
μ
i
(
x
,
t
)
∂
u
∂
x
i
+
1
2
∑
i
=
1
N
∑
j
=
1
N
γ
i
j
(
x
,
t
)
∂
2
u
∂
x
i
x
j
−
r
(
x
,
t
)
u
=
f
(
x
,
t
)
,
{\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}x_{j}}}-r(x,t)u=f(x,t),}
where,
γ
i
j
(
x
,
t
)
=
∑
k
=
1
N
σ
i
k
(
x
,
t
)
σ
j
k
(
x
,
t
)
,
{\displaystyle \gamma _{ij}(x,t)=\sum _{k=1}^{N}\sigma _{ik}(x,t)\sigma _{jk}(x,t),}
i.e. γ = σσ′, where σ′ denotes the transpose matrix of σ).
This expectation can then be approximated using Monte Carlo or quasi-Monte Carlo methods .
When originally published by Kac in 1949,[ 2] 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
e
−
∫
0
t
V
(
x
(
τ
)
)
d
τ
{\displaystyle e^{-\int _{0}^{t}V(x(\tau ))\,d\tau }}
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
u
V
(
x
)
≥
0
{\displaystyle uV(x)\geq 0}
,
E
[
e
−
u
∫
0
t
V
(
x
(
τ
)
)
d
τ
]
=
∫
−
∞
∞
w
(
x
,
t
)
d
x
{\displaystyle E\left[e^{-u\int _{0}^{t}V(x(\tau ))\,d\tau }\right]=\int _{-\infty }^{\infty }w(x,t)\,dx}
where w (x , 0) = δ(x ) and
∂
w
∂
t
=
1
2
∂
2
w
∂
x
2
−
u
V
(
x
)
w
.
{\displaystyle {\frac {\partial w}{\partial t}}={\frac {1}{2}}{\frac {\partial ^{2}w}{\partial x^{2}}}-uV(x)w.}
The Feynman–Kac formula can also be interpreted as a method for evaluating functional integrals of a certain form. If
I
=
∫
f
(
x
(
0
)
)
e
−
u
∫
0
t
V
(
x
(
t
)
)
d
t
g
(
x
(
t
)
)
D
x
{\displaystyle I=\int f(x(0))e^{-u\int _{0}^{t}V(x(t))\,dt}g(x(t))\,Dx}
where the integral is taken over all random walks , then
I
=
∫
w
(
x
,
t
)
g
(
x
)
d
x
{\displaystyle I=\int w(x,t)g(x)\,dx}
where w (x , t ) is a solution to the parabolic partial differential equation
∂
w
∂
t
=
1
2
∂
2
w
∂
x
2
−
u
V
(
x
)
w
{\displaystyle {\frac {\partial w}{\partial t}}={\frac {1}{2}}{\frac {\partial ^{2}w}{\partial x^{2}}}-uV(x)w}
with initial condition w (x , 0) = f (x ).
See also
References
Simon, Barry (1979). Functional Integration and Quantum Physics . Academic Press.
Hall, B. C. (2013). Quantum Theory for Mathematicians . Springer.
Pham, Huyên (2009). Continuous-time stochastic control and optimisation with financial applications . Springer-Verlag.
^ http://www.math.nyu.edu/faculty/kohn/pde_finance.html
^ Kac, Mark (1949). "On Distributions of Certain Wiener Functionals". Transactions of the American Mathematical Society . 65 (1): 1–13. doi :10.2307/1990512 . JSTOR 1990512 . This paper is reprinted in Mark Kac: Probability, Number Theory, and Statistical Physics, Selected Papers , edited by K. Baclawski and M.D. Donsker, The MIT Press, Cambridge, Massachusetts, 1979, pp.268-280