BlackScholesPrice - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Finance

  

BlackScholesPrice

  

compute the Black-Scholes price of a European-style option with given payoff

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

BlackScholesPrice(S0, K, T, sigma, r, d, optiontype)

BlackScholesPrice(S0, P, T, sigma, r, d)

Parameters

S0

-

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 S0 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.

Examples

> 

with⁡Finance:

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.

> 

BlackScholesPrice⁡100,100,1,σ,r,d,call

−50⁢ⅇ−d⁢erf⁡−σ2+2⁢d−2⁢r⁢24⁢σ+50⁢ⅇ−r⁢erf⁡σ2+2⁢d−2⁢r⁢24⁢σ+50⁢ⅇ−d−50⁢ⅇ−r

(1)

In this example you will use numeric values for the risk-free rate, the dividend yield, and the volatility.

> 

BlackScholesPrice⁡100,100,1,0.3,0.05,0.03,call

12.44264640

(2)

You can also use the generic method in which the option is defined through its payoff function.

> 

BlackScholesPrice⁡100,t↦max⁡t−100,0,1,σ,r,d

50⁢ⅇ−r⁢erf⁡σ2+2⁢d−2⁢r⁢24⁢σ−1−50⁢ⅇ−d⁢erf⁡−σ2+2⁢d−2⁢r⁢24⁢σ−1

(3)
> 

BlackScholesPrice⁡100,t↦max⁡t−100,0,1,0.3,0.05,0.03

12.44264640

(4)
> 

Price≔BlackScholesPrice⁡100,100,1,σ,r,0.03,call

Price≔48.52227668+48.52227668⁢erf⁡0.7071067810⁢−0.03000000000+r+0.5000000000⁢σ2σ−100.⁢ⅇ−1.⁢r⁢0.5000000000+0.5000000000⁢erf⁡0.7071067810⁢−0.03000000000+r+0.5000000000⁢σ2σ−0.7071067810⁢σ

(5)
> 

plot3d⁡Price,σ=0..1,r=0..1,axes=BOXED

Here are similar examples for the European put option.

> 

BlackScholesPrice⁡100,120,1,σ,r,d,put

60⁢ⅇ−r⁢erf⁡σ2+2⁢ln⁡3−2⁢ln⁡5+2⁢ln⁡2+2⁢d−2⁢r⁢24⁢σ−50⁢ⅇ−d⁢erf⁡−σ2+2⁢ln⁡3−2⁢ln⁡5+2⁢ln⁡2+2⁢d−2⁢r⁢24⁢σ+60⁢ⅇ−r−50⁢ⅇ−d

(6)
> 

BlackScholesPrice⁡100,120,1,0.3,0.05,0.03,put

22.92329470

(7)
> 

BlackScholesPrice⁡100,t↦max⁡120−t,0,1,σ,r,d

−60⁢ⅇ−r⁢−1+erf⁡2⁢−σ2+2⁢ln⁡5−2⁢ln⁡2−2⁢ln⁡3−2⁢d+2⁢r4⁢σ+50⁢ⅇ−d⁢−1+erf⁡2⁢σ2+2⁢ln⁡5−2⁢ln⁡2−2⁢ln⁡3−2⁢d+2⁢r4⁢σ

(8)
> 

BlackScholesPrice⁡100,t↦max⁡120−t,0,1,0.3,0.05,0.03,d

22.92329473

(9)

In this example, you will compute the price of a strangle.

> 

S≔BlackScholesPrice⁡100&comma;t↦piecewise⁡t<90&comma;90−t&comma;t<110&comma;0&comma;t−110&comma;1&comma;σ&comma;r&comma;d

S≔−5⁢&ExponentialE;−r⁢9⁢erf⁡2⁢−σ2+2⁢ln⁡5+2⁢ln⁡2−4⁢ln⁡3−2⁢d+2⁢r4⁢σ+11⁢erf⁡2⁢−σ2+2⁢ln⁡5+2⁢ln⁡2−2⁢ln⁡11−2⁢d+2⁢r4⁢σ+2+50⁢&ExponentialE;−d⁢erf⁡2⁢σ2+2⁢ln⁡5+2⁢ln⁡2−4⁢ln⁡3−2⁢d+2⁢r4⁢σ+erf⁡2⁢σ2+2⁢ln⁡5+2⁢ln⁡2−2⁢ln⁡11−2⁢d+2⁢r4⁢σ

(10)
> 

C≔BlackScholesPrice⁡100&comma;110&comma;1&comma;σ&comma;r&comma;d&comma;call

C≔50⁢&ExponentialE;−d⁢erf⁡2⁢σ2+2⁢ln⁡5+2⁢ln⁡2−2⁢ln⁡11−2⁢d+2⁢r4⁢σ−55⁢&ExponentialE;−r⁢erf⁡2⁢−σ2+2⁢ln⁡5+2⁢ln⁡2−2⁢ln⁡11−2⁢d+2⁢r4⁢σ+50⁢&ExponentialE;−d−55⁢&ExponentialE;−r

(11)
> 

P≔BlackScholesPrice⁡100&comma;90&comma;1&comma;σ&comma;r&comma;d&comma;put

P≔−45⁢&ExponentialE;−r⁢erf⁡2⁢−σ2+2⁢ln⁡5+2⁢ln⁡2−4⁢ln⁡3−2⁢d+2⁢r4⁢σ+50⁢&ExponentialE;−d⁢erf⁡2⁢σ2+2⁢ln⁡5+2⁢ln⁡2−4⁢ln⁡3−2⁢d+2⁢r4⁢σ+45⁢&ExponentialE;−r−50⁢&ExponentialE;−d

(12)

Check:

> 

simplify⁡S−C−P

0

(13)

References

  

Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.

Compatibility

• 

The Finance[BlackScholesPrice] command was introduced in Maple 15.

• 

For more information on Maple 15 changes, see Updates in Maple 15.

See Also

Finance[AmericanOption]

Finance[BermudanOption]

Finance[BlackScholesDelta]

Finance[BlackScholesGamma]

Finance[BlackScholesRho]

Finance[BlackScholesTheta]

Finance[BlackScholesVega]

Finance[EuropeanOption]

Finance[ImpliedVolatility]

Finance[LatticePrice]