Application Center - Maplesoft

App Preview:

Financial: Asian Options

You can switch back to the summary page by clicking here.

Learn about Maple
Download Application


 

Image 

Pricing Asian Options 

? Maplesoft, a division of Waterloo Maple Inc., 2006 

Overview 

This example demonstrates the use of Maple for computing the price of an Asian option, a derivative security that has gained popularity in financial markets in the last fifteen years.   

 

The payoff of an Asian option is based on the difference between an asset's average price over a given time period, and a fixed price called the strike price. Asian options are popular because they tend to have lower volatility than options whose payoffs are based purely on a single price point.  It is also harder for big traders to manipulate an average price over an extended period than a single price, so Asian options offers further protection against risk. 

 

One disadvantage of Asian options is that their prices are very hard to compute using standard techniques.  Unlike European options, which can be priced using the classic Black-Scholes formula, there is no analytical formula for pricing an Asian option when the underlying asset is assumed to have a lognormal distribution, which is par for the course in financial modeling. 

 

In this application, we use two different approaches for computing these prices numerically.  (1) Solving a partial differential equation, and (2) Monte Carlo simulation.  We will see that the two numerical solutions that Maple derives are the same, providing strong validation for both the techniques and Maple's numerics. 

 

Arithmetic average Asian options are securities whose payoff depends on the average of the underlying stock price over a certain period of time. To be more precise, the value of the continuous arithmetic Asian call option at time Typesetting:-mrow(Typesetting:-mi( is given by 

 

Typesetting:-mrow(Typesetting:-mi(  

 

where Typesetting:-mrow(Typesetting:-mi( is the stock price at time Typesetting:-mrow(Typesetting:-mi(, Typesetting:-mrow(Typesetting:-mi( is the expiration date, and Typesetting:-mrow(Typesetting:-mi( is the strike price.  

 

Since no general closed form solution for the price of the arithmetic average Asian option is known, a variety of numerical methods have been developed. These include formulation as a PDE, Monte Carlo simulation, and numeric inversion of the Laplace transform.  

 

In this worksheet we demonstrate how these methods can be easily and quickly implemented in Maple. 

 

Solution using PDE 

> Typesetting:-mrow(Typesetting:-mi(
 

 

It was shown by Vecer ("A new PDE approach for pricing arithmetic average Asian options", Journal of Computational Finance, vol. 4, No. 4, 105-113) that the value of the Asian option at time Typesetting:-mrow(Typesetting:-mn( is given by 

 

Typesetting:-mrow(Typesetting:-mi(  

 

where the function Typesetting:-mrow(Typesetting:-mi( satisfies the following PDE 

 

Typesetting:-mrow(Typesetting:-mi(  

 

with the boundary condition 

Typesetting:-mrow(Typesetting:-mi(  

 

We first set up the equation: 

 

> Typesetting:-mrow(Typesetting:-mi(
 

proc (t) options operator, arrow; `+`(1, `-`(`/`(`*`(t), `*`(T)))) end proc (2.1)
 

> Typesetting:-mrow(Typesetting:-mi(
 

`+`(diff(u(t, z), t), `*`(r, `*`(`+`(1, `-`(`/`(`*`(t), `*`(T))), `-`(z)), `*`(diff(u(t, z), z)))), `*`(`/`(1, 2), `*`(`^`(`+`(1, `-`(`/`(`*`(t), `*`(T))), `-`(z)), 2), `*`(`^`(sigma, 2), `*`(diff(dif... (2.2)
 

 

Boundary conditions. 

 

> Typesetting:-mrow(Typesetting:-mi(
 

u(T, z) = max(0, z) (2.3)
 

> Typesetting:-mrow(Typesetting:-mi(
 

u(t, -1) = 0 (2.4)
 

> Typesetting:-mrow(Typesetting:-mi(
 

(D[2](u))(t, 1) = 1 (2.5)
 

 

Let's assume a fixed time period of 1 year, a starting price of $100, a strike price of $100, and Typesetting:-mrow(Typesetting:-mi( 

 

> Typesetting:-mrow(Typesetting:-mi(
 

1 (2.6)
 

> Typesetting:-mrow(Typesetting:-mi(
 

100. (2.7)
 

> Typesetting:-mrow(Typesetting:-mi(
 

100. (2.8)
 

> Typesetting:-mrow(Typesetting:-mi(
 

.2 (2.9)
 

> Typesetting:-mrow(Typesetting:-mi(
 

.15 (2.10)
 

 

Now we solve the PDE numerically using Maple's built-in solver. 

 

> Typesetting:-mrow(Typesetting:-mi(
 

module () local INFO; export plot, plot3d, animate, value, settings; option `Copyright (c) 2001 by Waterloo Maple Inc. All rights reserved.`; end module (2.11)
 

> Typesetting:-mrow(Typesetting:-mi(
 

> Typesetting:-mrow(Typesetting:-mi(
 

 

Finally, we evaluate Typesetting:-mrow(Typesetting:-mi( at Maple's numerical solution of Typesetting:-mrow(Typesetting:-mi(.   

 

> Typesetting:-mrow(Typesetting:-mi(
 

8.408787967 (2.12)
 

Monte Carlo Simulation 

 

Alternatively, we can use Monte Carlo methods to price the option. 

 

> Typesetting:-mrow(Typesetting:-mi(
 

> Typesetting:-mrow(Typesetting:-mi(
 

 

We will use the same parameters as before. 

 

> Typesetting:-mrow(Typesetting:-mi(
 

1 (3.1)
 

> Typesetting:-mrow(Typesetting:-mi(
 

100. (3.2)
 

> Typesetting:-mrow(Typesetting:-mi(
 

100. (3.3)
 

> Typesetting:-mrow(Typesetting:-mi(
 

.2 (3.4)
 

> Typesetting:-mrow(Typesetting:-mi(
 

.15 (3.5)
 

 

In the classical Black-Scholes setting the underlying process follows a geometric Brownian motion with drift Typesetting:-mrow(Typesetting:-mi( and volatility Typesetting:-mrow(Typesetting:-mi( 

 

> Typesetting:-mrow(Typesetting:-mi(
 

 

Option payoff is given by the following formula: 

 

> Typesetting:-mrow(Typesetting:-mi(
 

proc (t) options operator, arrow; max(`+`(`/`(`*`(Int(X(u), u = 0 .. t)), `*`(t)), `-`(K)), 0) end proc (3.6)
 

 

We can compute the risk-neutral price of the option as expected payoff discounted using the risk-free rate. 

 

> Typesetting:-mrow(Typesetting:-mi(
 

8.342020802 (3.7)
 

 

We can also compute the various statistics related to this simulation. 

 

> Typesetting:-mrow(Typesetting:-mo(
 

              value  =  9.569798629
 

      standarderror  =  .1022532908
  standarddeviation  =  10.22532908
           skewness  =  1.172246041
           kurtosis  =  1.209793258
            minimum  =  0.
            maximum  =  66.07060386
      standarderror  =  .1022532908
 

 

Alternatively, we can generate sample data for the option payoff and perform statistical analysis of this data. 

 

> Typesetting:-mrow(Typesetting:-mi(
 

Typesetting:-mrow(Typesetting:-mverbatim( (3.8)
 

> Typesetting:-mrow(Typesetting:-mi(
 

Typesetting:-mrow(Typesetting:-mverbatim( (3.9)
 

> Typesetting:-mrow(Typesetting:-mi(
 

Plot_2d
 

 

We can consider a more complicated process for modeling the underlying asset. For example, we can incorporate jumps or regime switching into the model. 

 

> Typesetting:-mrow(Typesetting:-mi(
 

_X3 (3.10)
 

> Typesetting:-mrow(Typesetting:-mi(
 

_X4 (3.11)
 

> Typesetting:-mrow(Typesetting:-mi(
 

Typesetting:-mrow(Typesetting:-mverbatim( (3.12)
 

> Typesetting:-mrow(Typesetting:-mi(
 

_X5 (3.13)
 

> Typesetting:-mrow(Typesetting:-mi(
 

proc (X, t) options operator, arrow; max(`+`(`/`(`*`(Int(X(u), u = 0 .. t)), `*`(t)), `-`(K)), 0) end proc (3.14)
 

> Typesetting:-mrow(Typesetting:-mi(
 

8.497423429 (3.15)
 

> Typesetting:-mrow(Typesetting:-mi(
 

12.45400511 (3.16)
 

> Typesetting:-mrow(Typesetting:-mi(
 

10.85502698 (3.17)
 

 

Here is another example. We consider another asset, which also follows a geometric Brownian motion but with different parameters. Consider the following contract: if the average price of Typesetting:-mrow(Typesetting:-mi( is higher than the average price of Typesetting:-mrow(Typesetting:-mi(, we get the difference, otherwise we get nothing. 

 

> Typesetting:-mrow(Typesetting:-mi(
 

> Typesetting:-mrow(Typesetting:-mi(
 

> Typesetting:-mrow(Typesetting:-mi(
 

[value = 14.85155399, standarderror = .1795756877] (3.18)
 

 

Again, in order to get the price of the contract, we have to discount this expected value using the risk-free rate. 

 

> Typesetting:-mrow(Typesetting:-mi(
 

12.83559553 (3.19)
 

 

Legal Notice: The copyright for this application is owned by Maplesoft. The application is intended to demonstrate the use of Maple to solve a particular problem. It has been made available for product evaluation purposes only and may not be used in any other context without the express permission of Maplesoft.  
 

Image