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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Finance : Financial Instruments : Finance/BlackScholesPrice

Finance[BlackScholesPrice] - compute the Black-Scholes price of a European-style option with given payoff

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ⅇderf14σ2+2d2r2σ+50ⅇrerf14σ2+2d2r2σ+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,t→maxt100,0,1,σ,r,d

50ⅇrdⅇderf14σ2+2d2r2σⅇrerf14σ2+2d2r2σⅇd+ⅇr

(3)

BlackScholesPrice100,t→maxt100,0,1,0.3,0.05,0.03

12.44264640

(4)

Price:=BlackScholesPrice100,100,1,σ,r,0.03,'call'

Price:=48.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

60ⅇrerf14σ2+2ln52ln22ln32d+2r2σ+50ⅇderf14σ2+2ln52ln22ln32d+2r2σ+60ⅇr50ⅇd

(6)

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

22.92329470

(7)

BlackScholesPrice100,t→max120t,0,1,σ,r,d

10ⅇrd6erf14σ2+2ln52ln22ln32d+2r2σⅇd5ⅇrerf14σ2+2ln52ln22ln32d+2r2σ6ⅇd+5ⅇr

(8)

BlackScholesPrice100,t→max120t,0,1,0.3,0.05,0.03,d

22.92329473

(9)

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

S:=BlackScholesPrice100&comma;t&rarr;piecewiset<90&comma;90t&comma;t<110&comma;0&comma;t110&comma;1&comma;&sigma;&comma;r&comma;d

S:=5&ExponentialE;rd9erf142&sigma;2&plus;2ln2&plus;2ln54ln32d&plus;2r&sigma;&ExponentialE;d10&ExponentialE;rerf142&sigma;2&plus;2ln2&plus;2ln54ln32d&plus;2r&sigma;11&ExponentialE;derf142&sigma;2&plus;2ln112ln22ln5&plus;2d2r&sigma;&plus;10&ExponentialE;rerf142&sigma;2&plus;2ln112ln22ln5&plus;2d2r&sigma;&plus;2&ExponentialE;d

(10)

C:=BlackScholesPrice100&comma;110&comma;1&comma;&sigma;&comma;r&comma;d&comma;&apos;call&apos;

C:=50&ExponentialE;derf142&sigma;2&plus;2ln112ln22ln5&plus;2d2r&sigma;&plus;55&ExponentialE;rerf142&sigma;2&plus;2ln112ln22ln5&plus;2d2r&sigma;&plus;50&ExponentialE;d55&ExponentialE;r

(11)

P:=BlackScholesPrice100&comma;90&comma;1&comma;&sigma;&comma;r&comma;d&comma;&apos;put&apos;

P:=45&ExponentialE;rerf142&sigma;2&plus;2ln2&plus;2ln54ln32d&plus;2r&sigma;&plus;50&ExponentialE;derf142&sigma;2&plus;2ln2&plus;2ln54ln32d&plus;2r&sigma;&plus;45&ExponentialE;r50&ExponentialE;d

(12)

Check:

simplifySCP

0

(13)

See Also

Finance[AmericanOption], Finance[BermudanOption], Finance[BlackScholesDelta], Finance[BlackScholesGamma], Finance[BlackScholesRho], Finance[BlackScholesTheta], Finance[BlackScholesVega], Finance[EuropeanOption], Finance[ImpliedVolatility], Finance[LatticePrice]

References

  

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


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam