\documentclass[a4paper,12pt]{article}
\usepackage{epsfig}
\begin{document}

\parindent=0pt

QUESTION

(fiddly!) Using the fundamental solution representation, calculate
the continuous-time pricing formula for an option which has a
payoff at maturity of

$$\mathit{payoff}(S_r)=\left\{\begin{array}{cc}-1,&0<S_r<K-1\\S_r-K,&K-1\leq
S_r<K+1\\+1,&K+1\leq S_r\end{array}\right.$$


ANSWER

Payoff at maturity:

\setlength{\unitlength}{0.5in}

\begin{picture}(8,4)

\put(1,0){\line(0,1){4}}

\put(1,2){\line(1,0){7}}

\put(.5,2){0}

\put(.5,1){$-1$}

\put(.5,3){$+1$}

\put(7,2){$S$}

\put(1,1){\line(1,0){2}}

\put(3,1){\line(1,1){2}}

\put(5,3){\line(1,0){2}}

\put(2.8,2.1){$k-1$}

\put(4,1.7){$k$}

\put(4.8,1.7){$k+1$}

\end{picture}

Feed into solution of Black-Scholes:

$$V(S,t)=\frac{e^{-r(T-t)}}{\sigma\sqrt{2\pi(T-t)}}\int_0^\infty
e^{\frac{\left[\log(\frac{S}{S_1})+(r-\frac{\sigma^2}{2})(T-t)\right]^2}{2\sigma^2(T-t)}}\frac{\textrm{Payoff}(S')}{S'}ds'$$

Transform to variable $x'=\log S'\Rightarrow dx'=\frac{S'}{S'}$
and payoff becomes:

Payoff$e^{x'})=\left\{\begin{array}{cc}-1,&-\infty<x'<\log(k-1)\\
e^{x'}-k,&\log(k-1)<x'<\log(k+1)\\
+1,&\log(k+1)<x'\end{array}\right.$

and $-\infty<x'<\infty$

\begin{eqnarray}
V(S,t)=\frac{e^{-r(T-t)}}{\sigma\sqrt{2\pi(T-t)}}&\left\{\int_{\log(K+1)}^\infty
e^{-\frac{\left[-x'+\log
S+(r+\frac{\sigma^2}{2})(T-t)\right]^2}{2\sigma^2(T-t)}}\,dx'\right.\\
&+\int_{\log(k-1)}^{\log(k+1)}e^{-\frac{\left[-x'+\log
S+(r-\frac{\sigma^2}{2}(T-t)\right]^2}{2\sigma^2(T-t)}}(e^x-k)\,dx'\\
&-\left.\int_{-\infty}^{\log(k-1)}e^{-\frac{\left[-x'+\log
S+(r-\frac{\sigma^2}{2})(T-t)\right]^2}{2\sigma^2(T-t)}}\,dx'\right\}
\end{eqnarray}

Set $X=\log S+\left(r-\frac{\sigma^2}{2}\right)(T-t)$ as
shorthand. Isolate and simplify (1), (2) and (3) individually.

$(1)=\int_{\log(k+1)}^\infty
dx'e^{\frac{(-x'+X)^2}{2\sigma^2(T-t)}}$

Set $y'=\frac{+x'-X}{\sigma\sqrt{(T-t)}}$

$=\int_{\frac{\log(k+1)-X}{\sigma\sqrt{(T-t)}}}^\infty
dy'\sigma\sqrt{(T-t)}e^{-\frac{y'^2}{2}}=\sigma\sqrt{2\pi(T-t)}\left[1-N(-d_1^+)\right]\\
d_1^+=\frac{\log\left(\frac{S}{k+1}\right)+\left(r-\frac{\sigma^2}{2}\right)(T-t)}{\sigma\sqrt{T-t}}$

$(3)=-\int_{-\infty}^{\log(k-1)}e^{-\frac{(-x'+X)^2}{2\sigma^2(T-t)}}$

Set$y'=\frac{x'-X}{\sigma\sqrt{T-t}}$

$=-\int_{-\infty}^{\frac{\log(k-1)-X}{\sigma\sqrt{T-t}}}e^{_\frac{y'^2}{2}}dy'\sigma\sqrt{T-t}=-\sigma\sqrt{2\pi(T-t)}\left[1-N(+d_1^-)\right]\\
d_1^-=\log\left(\frac{S}{k-1}\right)+\left(r-\frac{\sigma^2}{2}\right)(T-t)$

\begin{eqnarray*}
(2)&=&\int_{\log(k-1)}^{\log(k+1)}dx'e^{-\frac{(-x'+x)^2}{2\sigma^2(T-t)}}(e^{x'}-k)\\
&=&\int_{\log(k-1)}^{\log(k+1)}dx'e^{-\frac{(-x'+X)^2}{2\sigma^2(T-t)}+x'}
-k\int_{\log(k-1)}^{\log(k+1)}dx'e^{-\frac{(-x'+X)^2}{2\sigma^2(T-t)}}\\
&=&\int_{\log(k-1)}^{\log(k+1)}dx'e^{-\left(\frac{x'^2}{2\sigma^2(T-t)}
-2\frac{\left[X+\sigma^2(T-t)\right]}{2\sigma^2(T-t)}\right)}
-k\left[\int_{-d_1^-}^\infty+\int_\infty^{-d_1^+}\right]e^{-\frac{y'^2}{2}}dy'\sigma\sqrt{T-t}\\
&=&e^{-\frac{X^2}{2\sigma^2(T-t)}}\int_{\log(k-1)}^{\log(k+1)}dx'
e^{-\frac{\left[x'-(X+\sigma^2(T-t))\right]^2}{2\sigma^2(T-t)}+
\frac{\left[X+\sigma^2(T-t)\right]^2}{2\sigma^2(T-t)}}\\
&-&k\left[\left[1-N(-d_1^-)\right]-\left[N(-d_1^+)\right]\right]\sqrt{2\pi(T-t)}\sigma\\
&=&e^{X+\frac{\sigma^2(T-t)}{2}}\int_{\frac{\left[\log(k-1)-
(X+\sigma^2(T-t))\right]}{\sigma\sqrt{T-t}}}^{\frac{\left[\log(k+1)
-(X+\sigma^2(T-t))\right]}{\sigma\sqrt{T-t}}}dy'e^{-\frac{y'^2}{2}}\sigma\sqrt{T-t}\\
&-&k\left[N(-d_1^-)-N(-d_1^+)\right]\sqrt{2\pi(t-t)}\sigma
\end{eqnarray*}

Now $X+\sigma^2(T-t)=\log
S+\left(r+\frac{\sigma^2}{2}\right)(T-t)$

so call $d_2^+=\log
\left(\frac{S}{k+1}\right)+\left(r+\frac{\sigma^2}{2}\right)(T-t)=d_1^++\sigma^2(T-t)$

and
$d_2+-=\log\left(\frac{S}{k-1}\right)+\left(r+\frac{\sigma^2}{2}\right)(t-t)=d_2^-+\sigma^2(T-t)$

and $X+\frac{\sigma^2(t-t)}{2}=\log S+r(T-t)$

Therefore (2) gives

\begin{eqnarray*}
&=&se^{r(T-t)}\int_{-d_2^-}^{-d_2^+}dy'e^{-\frac{y^2}{2}}-k\left[-N(-d_1^-)
+N(-d_1^+)\right]\sigma\sqrt{2\pi(T-t)}\\
&=&\left\{e^{r(T-t)}S\left[-N(-d_2^+)+N(-d_2^+)\right]-k\left[-N(-d_1^-)
+N(-d_1^+)\right]\right\}\times\sigma\sqrt{2\pi(T-t)}
\end{eqnarray*}

But $N(-x)=1-N(x)$ (think of probabilities).

Therefore collecting together (1), (2) and (3)

\begin{eqnarray*}
V(S,t)&=&\frac{e^{-r(T-t)}}{\sigma\sqrt{2\pi(T-t)}}\left\{\sigma\sqrt{2\pi(T-t)}N(d_1^+)-\sigma\sqrt{2\pi(T-t)}(1-N(d_1^-))
\right.\\&+&\left.\left[se^{r(T-t)}\left[N(d_2^-)-N(d_2^+)\right]-k\left[N(d_1^-)-N(d_1^+)\right]\right]\sigma\sqrt{2\pi(T-t)}\right\}\\
&=&e^{-r(T-t)}\left\{-1-N(d_1^-)(K-1)+N(d_1^+)(K+1)\right\}\\&+&S\left\{N(d_2^-)-N(d_2^+)\right\}
\end{eqnarray*}

\begin{center}
\epsfig{file=3088-6-1.eps, width=70mm}
\end{center}

NB. Could also get from the sum of continuous solutions of a
portfolio of options with same payoff at maturity. Can you work
out which?



\end{document}
