Chinaunix首页 | 论坛 | 博客
  • 博客访问: 772762
  • 博文数量: 217
  • 博客积分: 2401
  • 博客等级: 大尉
  • 技术积分: 2030
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-16 06:58
个人简介

怎么介绍?

文章分类

全部博文(217)

文章存档

2023年(2)

2022年(3)

2021年(29)

2020年(12)

2019年(5)

2018年(5)

2017年(5)

2016年(3)

2015年(6)

2014年(12)

2013年(16)

2012年(9)

2011年(6)

2010年(15)

2009年(30)

2008年(59)

我的朋友

分类:

2011-02-08 22:50:41

~bernt/gcc_prog/algoritms_v1/algoritms/node24.html

We now discuss an approximation to the option price of an American option on a commodity having a continuous payout, described in (BAW). Their solution technique finds an approximate solution to the differential equation

\begin{displaymath}
\frac{1}{2}\sigma^2 S^2 V_SS + bSV_S -rV +V_t = 0
\end{displaymath} (7.1)

The case we look at here is an option written on a commodity paying $b$ as a continuous payout. Here $V$ is the (unknown) formula that determines the price of the contingent claim. For an European option this can be explicitly solved, with the adjusted Black Scholes formula as the solution, but for American options, which may be exercised early, there is no known analytical solution.

To do their approximation, BAW decomposes the American price into the European price and the early exercise premium

\begin{displaymath}C(S,T) = c(S,T) + \varepsilon_C(S,T) \end{displaymath}

Here $\varepsilon_C$ is the early exercise premium. This will also have to satisfy the partial differential equation. To come up with an approximation BAW transformed equation () into one where the terms involving $V_t$ are neglible, removed these, and ended up with a standard linear homeogenous second order equation, which has a known solution.

The functional form of the approximation is

\begin{displaymath}C(S,T) = \left\{
\begin{array}{lcc}
c(S,T)+A_2\left(\frac{S}{...
...f} & S<S^* \\
S-X & \textrm{if} & S\ge S^*
\end{array}\right.\end{displaymath}

where
\begin{displaymath}M = \frac{2r}{\sigma^2} \end{displaymath}


\begin{displaymath}N = \frac{2b}{\sigma^2} \end{displaymath}


\begin{displaymath}K(T) = 1-e^{-r(T-t)} \end{displaymath}


\begin{displaymath}q_2 = \frac{1}{2}[-(N-1)+\sqrt{(N-1)^2 +\frac{4M}{K}}\end{displaymath}


\begin{displaymath}A_2 = \frac{S^*}{q_2}\left(1-e^{(b-r)(T-t)}N(d_1(S^*))\right)\end{displaymath}

and $S^*$ solves
\begin{displaymath}S^* -X = c(S^*,T)+\frac{S^*}{q_2}\left(1-e^{(b-r)(T-t)}N(d_1(S^*))\right)\end{displaymath}

In implementing this, the only problem is finding the critical value $S^*$.

This is the classical problem of finding a root of the equation

\begin{displaymath}g(S^*)=
S^*-X-c(S^*)-\frac{S^*}{q_2}\left(1-e^{(b-r)(T-t)}N(d_1(S^*))\right)=0
\end{displaymath}

This is solved using Newton's algorithm for finding the root.

We start by finding a first ``seed'' value $S_0$. The next estimate of $S_i$ is found

\begin{displaymath}S_{i+1}= S_i-\frac{g()}{g^\prime} \end{displaymath}

At each step we need to evaluate $g()$ and its derivative $g^\prime()$.

Call option

\begin{displaymath}g(S) = S-X-c(S)-\frac{1}{q_2}S(1-e^{(b-r)(T-t)}N(d_1)\end{displaymath}


\begin{displaymath}g^\prime(S) = (1-\frac{1}{q_2})(1-e^{(b-r)(T-t)}N(d_1))+
\frac{1}{q_2}(e^{(b-r)(T-t)}n(d_1))\frac{1}{\sigma\sqrt{T-t}} \end{displaymath}

where $c(S)$ is the Black Scholes value for commodities.

Similarly, for a put option the approximation is

\begin{displaymath}P(S) =
\begin{array}{lcc}
p(S,T)+A_1\left(\frac{S}{S^{**}}\r...
...xtrm{if} & S>S^* \\
X-S & \textrm{if} & S\le S^*
\end{array} \end{displaymath}


\begin{displaymath}A_1 = -\frac{S^{**}}{q1}(1-e^{(b-r)(T-t)}N(-d_1(S^**)) \end{displaymath}

and we solve for $S^{**}$ again by Newton's procedure, where now

\begin{displaymath}g(S) = X-S-p(S)+\frac{S}{q_1}(1-e^{(b-r)(T-t)}) \end{displaymath}


\begin{displaymath}g^\prime(S) = (\frac{1}{q_1}-1)(1-e^{(b-r)(T-t)}N(-d_1)) +
\frac{1}{q_1}e^{(b-r)(T-t)} \frac{1}{\sigma\sqrt{T-t}}n(-d_1) \end{displaymath}



// file approx_am_call.cc
// author: Bernt Arne Oedegaard
// implements the quadratic approximation of Barone-Adesi and Whaley
// described in Journal of Finance, june 87.

#include
#include
#include "normdist.h" // normal distribution
#include "fin_algoritms.h" // define other option pricing formulas

const double ACCURACY=1.0e-6;

double option_price_american_call_approximated_baw( double S,
double X,
double r,
double b,
double sigma,
double time)
{
double sigma_sqr = sigma*sigma;
double time_sqrt = sqrt(time);
double nn = 2.0*b/sigma_sqr;
double m = 2.0*r/sigma_sqr;
double K = 1.0-exp(-r*time);
double q2 = (-(nn-1)+sqrt(pow((nn-1),2.0)+(4*m/K)))*0.5;

// seed value from paper
double q2_inf = 0.5 * ( (-nn-1.0) + sqrt(pow((nn-1),2.0)+4.0*m));
double S_star_inf = X / (1.0 - 1.0/q2_inf);
double h2 = -(b*time+2.0*sigma*time_sqrt)*(X/(S_star_inf-X));
double S_seed = X + (S_star_inf-X)*(1.0-exp(h2));

int no_iterations=0; // iterate on S to find S_star, using Newton steps
double Si=S_seed;
double g=1;
double gprime=1.0;
while ((fabs(g) > ACCURACY)
&& (fabs(gprime)>ACCURACY) // to avoid exploding Newton's
&& ( no_iterations++<500)
&& (Si>0.0)) {
double c = option_price_european_call_payout(Si,X,r,b,sigma,time);
double d1 = (log(Si/X)+(b+0.5*sigma_sqr)*time)/(sigma*time_sqrt);
g=(1.0-1.0/q2)*Si-X-c+(1.0/q2)*Si*exp((b-r)*time)*N(d1);
gprime=( 1.0-1.0/q2)*(1.0-exp((b-r)*time)*N(d1))
+(1.0/q2)*exp((b-r)*time)*n(d1)*(1.0/(sigma*time_sqrt));
Si=Si-(g/gprime);
};
double S_star = 0;
if (fabs(g)>ACCURACY) { S_star = S_seed; } // did not converge
else { S_star = Si; };
double C=0;
double c = option_price_european_call_payout(S,X,r,b,sigma,time);
if (S>=S_star) {
C=S-X;
}
else {
double d1 = (log(S_star/X)+(b+0.5*sigma_sqr)*time)/(sigma*time_sqrt);
double A2 = (1.0-exp((b-r)*time)*N(d1))* (S_star/q2);
C=c+A2*pow((S/S_star),q2);
};
return max(C,c); // know value will never be less than BS value
}
阅读(1407) | 评论(0) | 转发(0) |
0

上一篇:g++ options

下一篇:Financial Numerical Recipes

给主人留下些什么吧!~~