Finance
BlackScholesPrice
compute the Black-Scholes price of a European-style option with given payoff
Calling Sequence
Parameters
Description
Examples
References
Compatibility
BlackScholesPrice(S0, K, T, sigma, r, d, optiontype)
BlackScholesPrice(S0, P, T, sigma, r, d)
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
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.
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
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
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⁢σ⁢ⅇr−d−ⅇr−d−erf⁡σ2+2⁢d−2⁢r⁢24⁢σ+1
BlackScholesPrice⁡100,t↦max⁡t−100,0,1,0.3,0.05,0.03
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⁢σ
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
−50⁢ⅇ−d⁢erf⁡−σ2+2⁢ln⁡2+2⁢ln⁡3−2⁢ln⁡5+2⁢d−2⁢r⁢24⁢σ+60⁢ⅇ−r⁢erf⁡σ2+2⁢ln⁡2+2⁢ln⁡3−2⁢ln⁡5+2⁢d−2⁢r⁢24⁢σ+60⁢ⅇ−r−50⁢ⅇ−d
BlackScholesPrice⁡100,120,1,0.3,0.05,0.03,put
22.92329470
BlackScholesPrice⁡100,t↦max⁡120−t,0,1,σ,r,d
−10⁢ⅇ−r⁢5⁢erf⁡−σ2+2⁢ln⁡2+2⁢ln⁡3−2⁢ln⁡5+2⁢d−2⁢r⁢24⁢σ⁢ⅇr−d+5⁢ⅇr−d−6⁢erf⁡σ2+2⁢ln⁡2+2⁢ln⁡3−2⁢ln⁡5+2⁢d−2⁢r⁢24⁢σ−6
BlackScholesPrice⁡100,t↦max⁡120−t,0,1,0.3,0.05,0.03,d
22.92329473
In this example, you will compute the price of a strangle.
S≔BlackScholesPrice⁡100,t↦piecewise⁡t<90,90−t,t<110,0,t−110,1,σ,r,d
S≔5⁢ⅇ−r⁢10⁢erf⁡2⁢σ2+2⁢ln⁡2+2⁢ln⁡5−2⁢ln⁡11−2⁢d+2⁢r4⁢σ⁢ⅇr−d+10⁢erf⁡2⁢σ2+2⁢ln⁡2+2⁢ln⁡5−4⁢ln⁡3−2⁢d+2⁢r4⁢σ⁢ⅇr−d−11⁢erf⁡2⁢−σ2+2⁢ln⁡2+2⁢ln⁡5−2⁢ln⁡11−2⁢d+2⁢r4⁢σ−9⁢erf⁡2⁢−σ2+2⁢ln⁡2+2⁢ln⁡5−4⁢ln⁡3−2⁢d+2⁢r4⁢σ−2
C≔BlackScholesPrice⁡100,110,1,σ,r,d,call
C≔50⁢ⅇ−d⁢erf⁡2⁢σ2+2⁢ln⁡2+2⁢ln⁡5−2⁢ln⁡11−2⁢d+2⁢r4⁢σ−55⁢ⅇ−r⁢erf⁡2⁢−σ2+2⁢ln⁡2+2⁢ln⁡5−2⁢ln⁡11−2⁢d+2⁢r4⁢σ+50⁢ⅇ−d−55⁢ⅇ−r
P≔BlackScholesPrice⁡100,90,1,σ,r,d,put
P≔−45⁢ⅇ−r⁢erf⁡2⁢−σ2+2⁢ln⁡2+2⁢ln⁡5−4⁢ln⁡3−2⁢d+2⁢r4⁢σ+50⁢ⅇ−d⁢erf⁡2⁢σ2+2⁢ln⁡2+2⁢ln⁡5−4⁢ln⁡3−2⁢d+2⁢r4⁢σ+45⁢ⅇ−r−50⁢ⅇ−d
Check:
simplify⁡S−C−P
0
Hull, J., Options, Futures, and Other Derivatives, 5th. edition. Upper Saddle River, New Jersey: Prentice Hall, 2003.
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]
Download Help Document