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

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

withFinance:

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.

BlackScholesPrice100,100,1,σ,r,d,call

50ⅇderfσ2+2d2r24σ+50ⅇrerfσ2+2d2r24σ+50ⅇd50ⅇr

(1)

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

BlackScholesPrice100,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.

BlackScholesPrice100,tmaxt100,0,1,σ,r,d

50ⅇrerfσ2+2d2r24σⅇrdⅇrderfσ2+2d2r24σ+1

(3)

BlackScholesPrice100,tmaxt100,0,1,0.3,0.05,0.03

12.44264640

(4)

PriceBlackScholesPrice100,100,1,σ,r,0.03,call

Price48.52227668+48.52227668erf0.70710678100.03000000000+r+0.5000000000σ2σ100.ⅇ1.r0.5000000000+0.5000000000erf0.70710678100.03000000000+r+0.5000000000σ2σ0.7071067810σ

(5)

plot3dPrice,σ=0..1,r=0..1,axes=BOXED

Here are similar examples for the European put option.

BlackScholesPrice100,120,1,σ,r,d,put

50ⅇderfσ2+2ln2+2ln32ln5+2d2r24σ+60ⅇrerfσ2+2ln2+2ln32ln5+2d2r24σ+60ⅇr50ⅇd

(6)

BlackScholesPrice100,120,1,0.3,0.05,0.03,put

22.92329470

(7)

BlackScholesPrice100,tmax120t,0,1,σ,r,d

10ⅇr5erfσ2+2ln2+2ln32ln5+2d2r24σⅇrd+5ⅇrd6erfσ2+2ln2+2ln32ln5+2d2r24σ6

(8)

BlackScholesPrice100,tmax120t,0,1,0.3,0.05,0.03,d

22.92329473

(9)

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

SBlackScholesPrice100&comma;tpiecewiset<90&comma;90t&comma;t<110&comma;0&comma;t110&comma;1&comma;σ&comma;r&comma;d

S5&ExponentialE;r10erf2σ2+2ln2+2ln52ln112d+2r4σ&ExponentialE;rd+10erf2σ2+2ln2+2ln54ln32d+2r4σ&ExponentialE;rd11erf2σ2+2ln2+2ln52ln112d+2r4σ9erf2σ2+2ln2+2ln54ln32d+2r4σ2

(10)

CBlackScholesPrice100&comma;110&comma;1&comma;σ&comma;r&comma;d&comma;call

C50&ExponentialE;derf2σ2+2ln2+2ln52ln112d+2r4σ55&ExponentialE;rerf2σ2+2ln2+2ln52ln112d+2r4σ+50&ExponentialE;d55&ExponentialE;r

(11)

PBlackScholesPrice100&comma;90&comma;1&comma;σ&comma;r&comma;d&comma;put

P45&ExponentialE;rerf2σ2+2ln2+2ln54ln32d+2r4σ+50&ExponentialE;derf2σ2+2ln2+2ln54ln32d+2r4σ+45&ExponentialE;r50&ExponentialE;d

(12)

Check:

simplifySCP

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]