Finance[BlackScholesPrice] - compute the Black-Scholes price of a European-style option with given payoff
|
Calling Sequence
|
|
BlackScholesPrice( , K, T, sigma, r, d, optiontype)
BlackScholesPrice( , P, T, sigma, r, d)
|
|
Parameters
|
|
|
-
|
algebraic expression; initial (current) value of the underlying asset
|
K
|
-
|
algebraic expression; strike price
|
T
|
-
|
algebraic expression; time to maturity
|
sigma
|
-
|
algebraic expression; volatility
|
r
|
-
|
algebraic expression; continuously compounded risk-free rate
|
d
|
-
|
algebraic expression; continuously compounded dividend yield
|
P
|
-
|
operator or procedure; payoff function
|
optiontype
|
-
|
call or put; option type
|
|
|
|
|
Description
|
|
•
|
The BlackScholesPrice command computes the price of a European-style option with the specified payoff function.
|
•
|
The parameter is the initial (current) value of the underlying asset. The parameter T is the time to maturity in years.
|
•
|
The parameter K specifies the strike price if this is a vanilla put or call option. Any payoff function can be specified using the second calling sequence. In this case the parameter P must be given in the form of an operator, which accepts one parameter (spot price at maturity) and returns the corresponding payoff.
|
•
|
The sigma, r, and d parameters are the volatility, the risk-free rate, and the dividend yield of the underlying asset. These parameters can be given in either the algebraic form or the operator form. The parameter d is optional. By default, the dividend yield is taken to be 0.
|
|
|
Compatibility
|
|
•
|
The Finance[BlackScholesPrice] command was introduced in Maple 15.
|
|
|
Examples
|
|
>
|
|
First you compute the price of a European call option with strike price 100, which matures in 1 year. This will define the price as a function of the risk-free rate, the dividend yield, and the volatility.
>
|
|
| (1) |
In this example you will use numeric values for the risk-free rate, the dividend yield, and the volatility.
>
|
|
| (2) |
You can also use the generic method in which the option is defined through its payoff function.
>
|
|
| (3) |
>
|
|
| (4) |
>
|
|
![Price := 48.52227668+48.52227668*erf(.7071067810*(-0.3000000000e-1+r+.5000000000*sigma^2)/sigma)-100.*exp(-1.*r)*(.5000000000+.5000000000*erf(.7071067810*(-0.3000000000e-1+r+.5000000000*sigma^2)/sigma-.7071067810*sigma))](/support/helpjp/helpview.aspx?si=8855/file01584/math225.png)
| (5) |
>
|
|
Here are similar examples for the European put option.
>
|
|
![60*exp(-r)-60*exp(-r)*erf((1/4)*(2*ln(5)-2*ln(2)-2*ln(3)+2*r-2*d-sigma^2)*2^(1/2)/sigma)-50*exp(-d)+50*exp(-d)*erf((1/4)*(2*ln(5)-2*ln(2)-2*ln(3)+2*r-2*d+sigma^2)*2^(1/2)/sigma)](/support/helpjp/helpview.aspx?si=8855/file01584/math243.png)
| (6) |
>
|
|
| (7) |
>
|
|
![10*exp(-r-d)*(-6*erf((1/4)*(2*ln(5)-2*ln(2)-2*ln(3)+2*r-2*d-sigma^2)*2^(1/2)/sigma)*exp(d)+5*exp(r)*erf((1/4)*(2*ln(5)-2*ln(2)-2*ln(3)+2*r-2*d+sigma^2)*2^(1/2)/sigma)+6*exp(d)-5*exp(r))](/support/helpjp/helpview.aspx?si=8855/file01584/math257.png)
| (8) |
>
|
|
| (9) |
In this example, you will compute the price of a strangle.
>
|
|
![S := -5*exp(-r-d)*(9*erf((1/4)*2^(1/2)*(-sigma^2-4*ln(3)+2*ln(2)+2*ln(5)+2*r-2*d)/sigma)*exp(d)-10*exp(r)*erf((1/4)*2^(1/2)*(-2*d-4*ln(3)+2*ln(2)+2*ln(5)+sigma^2+2*r)/sigma)+2*exp(d)-10*exp(r)*erf((1/4)*2^(1/2)*(-2*d-2*ln(11)+2*ln(2)+2*ln(5)+sigma^2+2*r)/sigma)+11*erf((1/4)*2^(1/2)*(-2*ln(11)+2*ln(2)+2*ln(5)+2*r-2*d-sigma^2)/sigma)*exp(d))](/support/helpjp/helpview.aspx?si=8855/file01584/math273.png)
| (10) |
>
|
|
![C := 50*exp(-d)+50*exp(-d)*erf((1/4)*2^(1/2)*(-2*d-2*ln(11)+2*ln(2)+2*ln(5)+sigma^2+2*r)/sigma)-55*exp(-r)-55*exp(-r)*erf((1/4)*2^(1/2)*(-2*ln(11)+2*ln(2)+2*ln(5)+2*r-2*d-sigma^2)/sigma)](/support/helpjp/helpview.aspx?si=8855/file01584/math280.png)
| (11) |
>
|
|
![P := 45*exp(-r)-45*exp(-r)*erf((1/4)*2^(1/2)*(-sigma^2-4*ln(3)+2*ln(2)+2*ln(5)+2*r-2*d)/sigma)-50*exp(-d)+50*exp(-d)*erf((1/4)*2^(1/2)*(-2*d-4*ln(3)+2*ln(2)+2*ln(5)+sigma^2+2*r)/sigma)](/support/helpjp/helpview.aspx?si=8855/file01584/math287.png)
| (12) |
Check:
>
|
|
| (13) |
|
|
References
|
|
|
Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.
|
|
|