# 如何使用Feymann-Kac公式求解Black-Scholes方程

$$\begin{cases}\frac{\partial u}{\partial t} = ru - \frac{1}{2} \sigma^2 x^2 \frac{\partial^2 u}{\partial x^2}-r x \frac{\partial u}{ \partial x}\,\,, \quad x \in \mathbb{R} \quad, \quad t>0\\ u(T,x) = \max \{x-K,0\} \quad\quad, \quad x \in \mathbb{R}. \end{cases}$$

$$u（t，x）= xN（d_1） - Ke ^ { - r（T-t）} N（d_2）。$$

$$d_1 = \ frac {\ ln（\ frac {x} {K}）+（r + \ frac {\ sigma ^ 2} {2}）（T-t）} {\ sigma \ sqrt {T-t}}$$ $$d_2 = d_1- \ sigma \ sqrt {T-t}，$$

$N（x）$是標準正態分布函數的分布。

## 最佳答案

By application of Feynman-Kac theorem $U$ has the representation $$U(t,X_t)=e^{-r(T-t)}\mathbb{E}_{t}\left[\,\max\{X_T-K,0\}\,\right]$$ where $X_t$ satisfy the SDE $$dX_t=\mu X_tdt+\sigma X_t dW_{t}^{\mathbb{P}}\tag 1$$ Now, we define a new measure $\mathbb{Q}$ by $$d\mathbb{Q}=L_T\,d\mathbb{P}\quad$$ on $\mathcal{F}_T$ where $$dL_t=\left(\frac{\mu-r}{\sigma}\right)L_t dW^{\mathbb{P}}_t.$$ By application of Girsanov theorem, we have $$dW^{\mathbb{P}}_t=-\left(\frac{\mu-r}{\sigma} \right)dt+dW^{\mathbb{Q}}_t\tag 2$$ $(1)$ and $(2)$ $$dX_t=r X_tdt+\sigma X_t dW_{t}^{\mathbb{Q}}.\tag 3$$ By application of Ito's lemma $$\ln X_T=\ln X_t+\left( r-\frac{1}{2}\sigma ^{2} \right)(T-t)+\sigma (W_T-W_t)$$ Indeed we showed $$\ln X_T\sim N\left(\ln X_t+\left( r-\frac{1}{2}\sigma ^{2} \right)(T-t)\,,\, \sigma^2(T-t)\right)\tag 4$$ therefore $$Q(X_T<\ln K)=N\left(\frac{\ln K-\ln X_t-\left( r-\frac{1}{2}\sigma ^{2} \right)(T-t)}{\sigma^2\sqrt{T-t}}\right)$$ we now $N(-x)=1-N(x)$, thus $$Q({{X}_{T}}>K)=N\left(\frac{\ln \left(\frac{X_t}{K}\right)+\left( r-\frac{1}{2}\sigma ^{2} \right)(T-t)}{\sigma^2\sqrt{T-t}}\right)=N(d_2)\tag 5$$ Now we should change the measure $\mathbb{Q}$ to another measure $\mathbb{Q}^X$. Consider the Radon-Nikodym derivative $$\frac{d\mathbb{Q}^X}{d\mathbb{Q}}=\frac{B_T/B_t}{X_T/X_t}$$ where $$B_t=\exp\left(\int_{0}^{t}r\,du\right)=e^{rt}$$ as a result $${{\mathbb{Q}}^{X}}({{X}_{T}}>K)=\int\limits_{K}^{+\infty }{d{{\mathbb{Q}}^{X}}}=\frac{{{e}^{-r(T-t)}}}{{{X}_{t}}}\int\limits_{K}^{+\infty }{{{X}_{T}}\,d\mathbb{Q}}=\frac{{{e}^{-r(T-t)}}}{{{X}_{t}}}\int\limits_{K}^{+\infty }{{{X}_{T}}{{f}_{{{X}_{T}}}}(x)dx}$$ we have $$\mathbb{Q}^X(X_T>K)=\frac{e^{-r(T-t)}}{X_t}E^\mathbb{Q}[X_T|X_T>K]=N\left(\frac{\ln \left(\frac{X_t}{K}\right)+\left( r+\frac{1}{2}\sigma ^{2} \right)(T-t)}{\sigma^2\sqrt{T-t}}\right)$$ Indeed $$\mathbb{Q}^X(X_T>K)=N(d_1)\tag 6$$ on the other hand $$U(t,x)=e^{-r(T-t)}\mathbb{E}_{t}^{\mathbb{Q}}\left[\,\max\{X_T-K\},0\,\right]\tag 7$$ it is obvious $$\max\{X_T-K,0\}=(X_T-K)\mathbb{1}_{\{X_T>K\}}$$ then $$U(t,X_t)=e^{-r(T-t)}\mathbb{E}_{t}^{\mathbb{Q}}\left[X_T\mathbb{1}_{\{X_T>K\}}\right]-e^{-r(T-t)}\mathbb{E}_{t}^{\mathbb{Q}}\left[K\mathbb{1}_{\{X_T>K\}}\right]$$ as a result $$U(t,X_t)=X_t\,\mathbb{E}_{t}^{\mathbb{Q}}\left[\frac{X_T/X_t}{B_T/B_t}\mathbb{1}_{\{X_T>K\}}\right]-Ke^{-r(T-t)}\mathbb{E}_{t}^{\mathbb{Q}}\left[\mathbb{1}_{\{X_T>K\}}\right]$$ in other words $$U(t,X_t)=X_t\mathbb{E}_{t}^{\mathbb{Q}^X}\left[\mathbb{1}_{\{X_T>K\}}\right]-Ke^{-r(T-t)}\mathbb{E}_{t}^{\mathbb{Q}}\left[\mathbb{1}_{\{X_T>K\}}\right]$$ so $$U(t,X_t)=X_t\mathbb{Q}^X(X_T>K)-Ke^{-r(T-t)}\mathbb{Q}(X_T>K)\tag 8$$ $(5)$ ,$(6)$ and $(8)$ $$U(t,X_t)=X_tN(d_1)-Ke^{-r(T-t)}N(d_2)$$