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

# Online Help

###### All Products    Maple    MapleSim

Finance

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

 Calling Sequence BlackScholesColor(${S}_{0}$, K, T, sigma, r, d, optiontype) BlackScholesColor(${S}_{0}$, P, T, sigma, r, d)

Parameters

 ${S}_{0}$ - 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.

$\mathrm{Color}=\frac{ⅆ\mathrm{Gamma}}{ⅆT}$

$\mathrm{Color}=\frac{{\partial }^{3}}{\partial T\partial {{S}_{0}}^{2}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}S$

 • The BlackScholesColor command computes the Color of a European-style option with the specified payoff function.
 • The parameter ${S}_{0}$ 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

 > $\mathrm{with}\left(\mathrm{Finance}\right):$

The Gamma of an option measures the sensitivity of the Delta to changes in the value of the underlying asset, ${S}_{0}$. 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 ${S}_{0}$, 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.

 > $\mathrm{Color}≔\mathrm{BlackScholesColor}\left({S}_{0},100,T,0.1,0.05,0,'\mathrm{call}'\right):$
 > $\mathrm{plot3d}\left(\mathrm{Color},T=1.0..0,{S}_{0}=0..200,'\mathrm{labels}'=\left["Time To Maturity","Spot Price","Value"\right],'\mathrm{colorscheme}'=\left["zgradient",\left["Black","White","Red"\right]\right],'\mathrm{thickness}'=0\right)$

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:

 > $\mathrm{BlackScholesColor}\left(100,100,1,\mathrm{σ},r,d,'\mathrm{call}'\right)$
 ${-}\frac{\sqrt{{2}}{}{{ⅇ}}^{{-}\frac{{{\mathrm{\sigma }}}^{{4}}{+}{4}{}{d}{}{{\mathrm{\sigma }}}^{{2}}{+}{4}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{4}{}{{d}}^{{2}}{-}{8}{}{d}{}{r}{+}{4}{}{{r}}^{{2}}}{{8}{}{{\mathrm{\sigma }}}^{{2}}}}{}\left({{\mathrm{\sigma }}}^{{4}}{+}{4}{}{d}{}{{\mathrm{\sigma }}}^{{2}}{+}{4}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{4}{}{{d}}^{{2}}{-}{8}{}{d}{}{r}{+}{4}{}{{r}}^{{2}}{+}{4}{}{{\mathrm{\sigma }}}^{{2}}\right)}{{1600}{}{{\mathrm{\sigma }}}^{{3}}{}\sqrt{{\mathrm{\pi }}}}$ (1)

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

 > $\mathrm{BlackScholesColor}\left(100,100,1,0.3,0.05,0.03,'\mathrm{call}'\right)$
 ${-0.006976891196}$ (2)

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

 > $\mathrm{BlackScholesColor}\left(100,t→\mathrm{max}\left(t-100,0\right),1,\mathrm{σ},r,d\right)$
 ${-}\frac{\sqrt{{2}}{}{{ⅇ}}^{{-}\frac{{{\mathrm{\sigma }}}^{{4}}{+}{4}{}{d}{}{{\mathrm{\sigma }}}^{{2}}{+}{4}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{4}{}{{d}}^{{2}}{-}{8}{}{d}{}{r}{+}{4}{}{{r}}^{{2}}}{{8}{}{{\mathrm{\sigma }}}^{{2}}}}{}\left({{\mathrm{\sigma }}}^{{4}}{+}{4}{}{d}{}{{\mathrm{\sigma }}}^{{2}}{+}{4}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{4}{}{{d}}^{{2}}{-}{8}{}{d}{}{r}{+}{4}{}{{r}}^{{2}}{+}{4}{}{{\mathrm{\sigma }}}^{{2}}\right)}{{1600}{}{{\mathrm{\sigma }}}^{{3}}{}\sqrt{{\mathrm{\pi }}}}$ (3)
 > $\mathrm{BlackScholesColor}\left(100,t→\mathrm{max}\left(t-100,0\right),1,0.3,0.05,0.03\right)$
 ${-0.0069768906}$ (4)
 > $\mathrm{Color}≔\mathrm{BlackScholesColor}\left(100,100,1,\mathrm{σ},r,0.03,'\mathrm{call}'\right)$
 ${\mathrm{Color}}{≔}\frac{{-}{5.226548674}{×}{{10}}^{{-8}}{}{{ⅇ}}^{{-}\frac{{0.00004999999997}{}{\left({50.}{}{{\mathrm{\sigma }}}^{{2}}{+}{100.}{}{r}{-}{3.}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{+}{5.385720779}{×}{{10}}^{{-8}}{}{{ⅇ}}^{{-}\frac{{1.}{}\left({0.5000000002}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.4999999997}{}{{r}}^{{2}}{-}{0.02999999998}{}{r}{+}{0.0004499999998}{+}{0.01499999999}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.1249999999}{}{{\mathrm{\sigma }}}^{{4}}\right)}{{{\mathrm{\sigma }}}^{{2}}}}{-}{0.001496033551}{}{r}{}{{ⅇ}}^{{-}\frac{{1.}{}\left({0.5000000002}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.4999999997}{}{{r}}^{{2}}{-}{0.02999999998}{}{r}{+}{0.0004499999998}{+}{0.01499999999}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.1249999999}{}{{\mathrm{\sigma }}}^{{4}}\right)}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{4}}{-}{0.001934870059}{}{r}{}{{ⅇ}}^{{-}\frac{{1.}{}\left({0.5000000002}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.4999999997}{}{{r}}^{{2}}{-}{0.02999999998}{}{r}{+}{0.0004499999998}{+}{0.01499999999}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.1249999999}{}{{\mathrm{\sigma }}}^{{4}}\right)}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{2}}{-}{0.0002419698462}{}{{ⅇ}}^{{-}\frac{{0.00004999999997}{}{\left({50.}{}{{\mathrm{\sigma }}}^{{2}}{+}{100.}{}{r}{-}{3.}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{6}}{+}{0.001935758768}{}{{ⅇ}}^{{-}\frac{{0.00004999999997}{}{\left({50.}{}{{\mathrm{\sigma }}}^{{2}}{+}{100.}{}{r}{-}{3.}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{r}}^{{3}}{-}{0.0001742182891}{}{{ⅇ}}^{{-}\frac{{0.00004999999997}{}{\left({50.}{}{{\mathrm{\sigma }}}^{{2}}{+}{100.}{}{r}{-}{3.}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{r}}^{{2}}{+}{5.226548674}{×}{{10}}^{{-6}}{}{{ⅇ}}^{{-}\frac{{0.00004999999997}{}{\left({50.}{}{{\mathrm{\sigma }}}^{{2}}{+}{100.}{}{r}{-}{3.}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{r}{-}{0.0002493389254}{}{{ⅇ}}^{{-}\frac{{1.}{}\left({0.5000000002}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.4999999997}{}{{r}}^{{2}}{-}{0.02999999998}{}{r}{+}{0.0004499999998}{+}{0.01499999999}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.1249999999}{}{{\mathrm{\sigma }}}^{{4}}\right)}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{6}}{-}{0.001994711398}{}{{ⅇ}}^{{-}\frac{{1.}{}\left({0.5000000002}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.4999999997}{}{{r}}^{{2}}{-}{0.02999999998}{}{r}{+}{0.0004499999998}{+}{0.01499999999}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.1249999999}{}{{\mathrm{\sigma }}}^{{4}}\right)}{{{\mathrm{\sigma }}}^{{2}}}}{}{{r}}^{{3}}{+}{0.0001795240259}{}{{ⅇ}}^{{-}\frac{{1.}{}\left({0.5000000002}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.4999999997}{}{{r}}^{{2}}{-}{0.02999999998}{}{r}{+}{0.0004499999998}{+}{0.01499999999}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.1249999999}{}{{\mathrm{\sigma }}}^{{4}}\right)}{{{\mathrm{\sigma }}}^{{2}}}}{}{{r}}^{{2}}{+}{0.00006073896209}{}{{ⅇ}}^{{-}\frac{{1.}{}\left({0.5000000002}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.4999999997}{}{{r}}^{{2}}{-}{0.02999999998}{}{r}{+}{0.0004499999998}{+}{0.01499999999}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.1249999999}{}{{\mathrm{\sigma }}}^{{4}}\right)}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{2}}{-}{5.385720778}{×}{{10}}^{{-6}}{}{r}{}{{ⅇ}}^{{-}\frac{{1.}{}\left({0.5000000002}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.4999999997}{}{{r}}^{{2}}{-}{0.02999999998}{}{r}{+}{0.0004499999998}{+}{0.01499999999}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.1249999999}{}{{\mathrm{\sigma }}}^{{4}}\right)}{{{\mathrm{\sigma }}}^{{2}}}}{-}{0.001011433957}{}{{ⅇ}}^{{-}\frac{{0.00004999999997}{}{\left({50.}{}{{\mathrm{\sigma }}}^{{2}}{+}{100.}{}{r}{-}{3.}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{4}}{-}{0.001012316037}{}{{ⅇ}}^{{-}\frac{{1.}{}\left({0.5000000002}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.4999999997}{}{{r}}^{{2}}{-}{0.02999999998}{}{r}{+}{0.0004499999998}{+}{0.01499999999}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.1249999999}{}{{\mathrm{\sigma }}}^{{4}}\right)}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{4}}{-}{0.0000606860374}{}{{ⅇ}}^{{-}\frac{{0.00004999999997}{}{\left({50.}{}{{\mathrm{\sigma }}}^{{2}}{+}{100.}{}{r}{-}{3.}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.001993831532}{}{{ⅇ}}^{{-}\frac{{0.00004999999997}{}{\left({50.}{}{{\mathrm{\sigma }}}^{{2}}{+}{100.}{}{r}{-}{3.}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{2}}{}{r}{+}{0.000967879383}{}{{ⅇ}}^{{-}\frac{{0.00004999999997}{}{\left({50.}{}{{\mathrm{\sigma }}}^{{2}}{+}{100.}{}{r}{-}{3.}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{2}}{}{{r}}^{{2}}{-}{0.000483939693}{}{{ⅇ}}^{{-}\frac{{0.00004999999997}{}{\left({50.}{}{{\mathrm{\sigma }}}^{{2}}{+}{100.}{}{r}{-}{3.}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{4}}{}{r}{-}{0.002992067103}{}{{r}}^{{2}}{}{{ⅇ}}^{{-}\frac{{1.}{}\left({0.5000000002}{}{r}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.4999999997}{}{{r}}^{{2}}{-}{0.02999999998}{}{r}{+}{0.0004499999998}{+}{0.01499999999}{}{{\mathrm{\sigma }}}^{{2}}{+}{0.1249999999}{}{{\mathrm{\sigma }}}^{{4}}\right)}{{{\mathrm{\sigma }}}^{{2}}}}{}{{\mathrm{\sigma }}}^{{2}}}{{{\mathrm{\sigma }}}^{{5}}}$ (5)
 > $\mathrm{plot3d}\left(\mathrm{Color},\mathrm{σ}=0..1,r=0..1\right)$

Here are similar examples for the European put option:

 > $\mathrm{BlackScholesColor}\left(100,120,1,0.3,0.05,0.03,'\mathrm{put}'\right)$
 ${-0.00440899910}$ (6)
 > $\mathrm{BlackScholesColor}\left(100,t→\mathrm{max}\left(120-t,0\right),1,0.3,0.05,0.03,0\right)$
 ${-0.0044089988}$ (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.