Finance - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Finance : Financial Instruments : Greeks : Finance/BlackScholesColor

Finance

  

BlackScholesColor

  

compute the Color of a European-style option with given payoff

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

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

BlackScholesColor(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 Color of an option or a portfolio of options measures Gamma's sensitivity to movement in the time to maturity.

Color=TGamma

Color=3TS02S

• 

The BlackScholesColor command computes the Color 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:

The Gamma of an option measures the sensitivity of the Delta to changes in the value of the underlying asset, S0. The Color of an option measures Gamma's sensitivity to movement in the time of maturity, T. The following example illustrates the characteristics of the Color of an option with respect to these two variables.

In this example, the Color is defined as a function of the underlying asset price S0, and time to maturity, T.  For a European call option, we will assume that the strike price is 100, volatility is 0.10, and the risk-free interest rate of 0.05.  We also assume that this option does not pay any dividends.

ColorBlackScholesColorS0,100,T,0.1,0.05,0,'call':

plot3dColor,T=1.0..0,S0=0..200,'labels'=Time To Maturity,Spot Price,Value,'colorscheme'=zgradient,Black,White,Red,'thickness'=0

We can also see how the Color behaves as a function of the risk-free interest rate, the dividend yield, and volatility.  To compute the Color of a European call option with strike price 100 maturing in 1 year, we take:

BlackScholesColor100,100,1,σ,r,d,'call'

2ⅇσ4+4dσ2+4rσ2+4d28dr+4r28σ2σ4+4dσ2+4rσ2+4d28dr+4r2+4σ21600σ3π

(1)

This can be numerically solved for specific values of the risk-free rate, the dividend yield, and the volatility.

BlackScholesColor100,100,1,0.3,0.05,0.03,'call'

−0.006976891196

(2)

It is also possible to use the generic method in which the option is defined through its payoff function:

BlackScholesColor100,t→maxt100,0,1,σ,r,d

2ⅇσ4+4dσ2+4rσ2+4d28dr+4r28σ2σ4+4dσ2+4rσ2+4d28dr+4r2+4σ21600σ3π

(3)

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

−0.006976892

(4)

ColorBlackScholesColor100,100,1,σ,r,0.03,'call'

Color0.001496033551rⅇ1.0.5000000002rσ2+0.4999999997r20.02999999998r+0.0004499999998+0.01499999999σ2+0.1249999999σ4σ2σ40.001934870059rⅇ1.0.5000000002rσ2+0.4999999997r20.02999999998r+0.0004499999998+0.01499999999σ2+0.1249999999σ4σ2σ20.002992067103r2ⅇ1.0.5000000002rσ2+0.4999999997r20.02999999998r+0.0004499999998+0.01499999999σ2+0.1249999999σ4σ2σ2+0.00006073896209ⅇ1.0.5000000002rσ2+0.4999999997r20.02999999998r+0.0004499999998+0.01499999999σ2+0.1249999999σ4σ2σ25.38572077810−6rⅇ1.0.5000000002rσ2+0.4999999997r20.02999999998r+0.0004499999998+0.01499999999σ2+0.1249999999σ4σ20.001012316037ⅇ1.0.5000000002rσ2+0.4999999997r20.02999999998r+0.0004499999998+0.01499999999σ2+0.1249999999σ4σ2σ40.001011433957ⅇ0.0000499999999750.σ2+100.r3.2σ2σ40.0000606860374ⅇ0.0000499999999750.σ2+100.r3.2σ2σ2+0.001993831532ⅇ0.0000499999999750.σ2+100.r3.2σ2σ2r+0.000967879383ⅇ0.0000499999999750.σ2+100.r3.2σ2σ2r20.000483939693ⅇ0.0000499999999750.σ2+100.r3.2σ2σ4r+5.38572077910−8ⅇ1.0.5000000002rσ2+0.4999999997r20.02999999998r+0.0004499999998+0.01499999999σ2+0.1249999999σ4σ25.22654867410−8ⅇ0.0000499999999750.σ2+100.r3.2σ20.0002493389254ⅇ1.0.5000000002rσ2+0.4999999997r20.02999999998r+0.0004499999998+0.01499999999σ2+0.1249999999σ4σ2σ60.001994711398ⅇ1.0.5000000002rσ2+0.4999999997r20.02999999998r+0.0004499999998+0.01499999999σ2+0.1249999999σ4σ2r3+0.0001795240259ⅇ1.0.5000000002rσ2+0.4999999997r20.02999999998r+0.0004499999998+0.01499999999σ2+0.1249999999σ4σ2r2+0.001935758768ⅇ0.0000499999999750.σ2+100.r3.2σ2r30.0001742182891ⅇ0.0000499999999750.σ2+100.r3.2σ2r2+5.22654867410−6ⅇ0.0000499999999750.σ2+100.r3.2σ2r0.0002419698462ⅇ0.0000499999999750.σ2+100.r3.2σ2σ6σ5

(5)

plot3dColor,σ=0..1,r=0..1

Here are similar examples for the European put option:

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

−0.00440899910

(6)

BlackScholesColor100,t→max120t,0,1,0.3,0.05,0.03,0

−0.004408999

(7)

References

  

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

Compatibility

• 

The Finance[BlackScholesColor] command was introduced in Maple 2015.

• 

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

See Also

Finance[BlackScholesGamma]

Finance[BlackScholesPrice]

Finance[BlackScholesSpeed]

Finance[BlackScholesUltima]

Finance[BlackScholesZomma]

Finance[EuropeanOption]

Finance[ImpliedVolatility]

Finance[LatticePrice]