![]() Volume 9, Issue 2 Articles Tricks of the Trade In and Out Trott's Corner New Products New Publications Calendar News Bulletins New Resources Classifieds Download This Issue Editorial Policy Staff Submissions Subscriptions Advertising Back Issues Contact Information |
Path Integral Methods for Parabolic Partial Differential Equations with Examples from Computational Finance
6. Dynamic Programming with Mathematica: The Case of American and European Stock Options First, we will consider several examples of terminal-value problems of the form:
where
Note that we have replaced Since our goal here is not to improve Mathematica's performance, we will ignore the following error messages.
In our first example, we take
The solution
We can compare the result (the red curve) with the "exact" solution (the blue curve) produced by the Black-Scholes formula; the green curve represents the termination payoff.
One can see that the numerical solution (the red curve) is reasonably close to the exact solution in most of the interpolation region. To develop some sense for the accuracy of the method, we will compare the value of the option when the stock price is $50, produced by the dynamic programming procedure
with the following value produced by the Black-Scholes formula.
Of course, one can also compute this value by using the Feynman-Kac formula, just as we did in Section 4.
As was pointed out earlier, when the coefficients are linear,
The only reason the last two results are different is that Now we will consider an example in which the coefficients
With this choice of the coefficients
Now we can compare the price of this option with the one produced by the Black-Scholes formula (the blue line), which ignores the fact that the volatility decreases when the stock price approaches the strike price. Just as one would expect, when the stock price is away from the region where the volatility decreases, the price of the option looks the same as the price produced under the assumption of constant volatility.
When the stock price is $50, the price of this option is
Notice that we have chosen the interpolation interval Our next example, which is unrelated to finance, will compute the solution
with boundary condition
The interpolation interval is
Now we can compare the solution that we just found, that is, the function
Sometimes one must use the dynamic programming procedure in a nontrivial way and work with some small time step, even if the coefficients
Under the Black-Scholes assumption for the price process, American call options are the same as European call options because early exercise of such options is never optimal. Thus, in our first example we consider an American put option with a strike price of $40.
First, we will compute the price of the option under the assumption that--just as in the Black-Scholes model--the stock price follows a geometric Brownian motion process (of course, the Black-Scholes formula cannot be used in this case as is, for it is only valid for European options).
We will interpolate the solution in the interval
Now we can plot the solution (the red curve below) together with the termination payoff function (the blue curve).
To those familiar with the basics of American options, it should be clear from this graph that the approximation that we just produced is not very accurate in the last 1/4 of the interpolation interval (it is well known that the actual stock price decreases to 0 monotonically). This is caused by the fact that, when the process
Let us remember that here we are also solving an optimal stopping problem, whose solution is given by the point, which separates the "exercise" region, that is, the region where the price of the option coincides with the termination payoff, from the "hold" region, where the price of the option is larger than the termination payoff.
It is interesting that the solution, which was produced earlier and about three times faster by using a three times larger time step, gives the same result.
This illustrates perfectly the point that we made earlier: the result produced with the larger time step was already reasonably accurate in the middle of the interpolation interval. Now we will compute the price of the same put option, but under the assumption that the stock price exhibits stochastic volatility of the type we introduced earlier in conjunction with European-type options.
Now we can compare the last result (the blue curve below) with the one that was produced in the case of constant volatility (the red curve).
We can see that, just as one would expect, the price of this option differs from the one produced under the constant volatility assumption only in the region where the volatility decreases. Also, the decrease of the volatility near the exercise price actually decreases the range of stock prices for which immediate exercise is optimal, as the following computation shows.
|
||||||||
About Mathematica | Download Mathematica Player Copyright © 2004 Wolfram Media, Inc. All rights reserved. |