BlackScholesVega - Maple Help

Finance

 BlackScholesVega
 compute the Vega of a European-style option with given payoff

 Calling Sequence BlackScholesVega(${S}_{0}$, K, T, sigma, r, d, optiontype) BlackScholesVega(${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 Vega of an option or a portfolio of options is the sensitivity of the option or portfolio to changes in the volatility of the underlying asset.

$\mathrm{Vega}=\frac{ⅆS}{ⅆ\mathrm{\sigma }}$

 • The BlackScholesVega command computes the Vega 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):$
 > $r≔0.05$
 ${r}{≔}{0.05}$ (1)
 > $d≔0.03$
 ${d}{≔}{0.03}$ (2)

First you compute the Vega of a European call option with strike price 100, which matures in 1 year. This will define the Vega as a function of the risk-free rate, the dividend yield, and the volatility.

 > $\mathrm{expand}\left(\mathrm{BlackScholesVega}\left(100,100,1,\mathrm{\sigma },r,d,'\mathrm{call}'\right)\right)$
 ${38.32995297}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{}{{ⅇ}}^{{-}\frac{{0.0001999999998}}{{{\mathrm{\sigma }}}^{{2}}}}{-}\frac{{1.}{×}{{10}}^{{-10}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{}{{ⅇ}}^{{-}\frac{{0.0001999999998}}{{{\mathrm{\sigma }}}^{{2}}}}}{{{\mathrm{\sigma }}}^{{2}}}$ (3)

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

 > $\mathrm{BlackScholesVega}\left(100,100,1,0.3,0.05,0.03,'\mathrm{call}'\right)$
 ${37.81702623}$ (4)

You can also use the generic method in which the option is defined through its payoff function.

 > $\mathrm{expand}\left(\mathrm{BlackScholesVega}\left(100,t↦\mathrm{max}\left(t-100,0\right),1,\mathrm{\sigma },r,d\right)\right)$
 ${38.32995296}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{}{{ⅇ}}^{{-}\frac{{0.0001999999998}}{{{\mathrm{\sigma }}}^{{2}}}}$ (5)
 > $\mathrm{BlackScholesVega}\left(100,t↦\mathrm{max}\left(t-100,0\right),1,0.3,0.05,0.03\right)$
 ${37.81702620}$ (6)
 > $\mathrm{Vega}≔\mathrm{expand}\left(\mathrm{BlackScholesVega}\left(100,K,1,\mathrm{\sigma },0.05,0.03,'\mathrm{call}'\right)\right)$
 ${\mathrm{Vega}}{≔}{-}\frac{{17.72825559}{}{{ⅇ}}^{{-}\frac{{10.69609962}}{{{\mathrm{\sigma }}}^{{2}}}}{}{\left(\frac{{1}}{{K}}\right)}^{{-}\frac{{4.625170183}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}\frac{{0.4999999997}{}{{\mathrm{ln}}{}\left(\frac{{1}}{{K}}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}}{{{\mathrm{\sigma }}}^{{2}}{}{\left(\frac{{1}}{{K}}\right)}^{{0.4999999997}}}{-}\frac{{3.832995301}{}{\mathrm{ln}}{}\left(\frac{{1}}{{K}}\right){}{{ⅇ}}^{{-}\frac{{10.69609962}}{{{\mathrm{\sigma }}}^{{2}}}}{}{\left(\frac{{1}}{{K}}\right)}^{{-}\frac{{4.625170183}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}\frac{{0.4999999997}{}{{\mathrm{ln}}{}\left(\frac{{1}}{{K}}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}}{{{\mathrm{\sigma }}}^{{2}}{}{\left(\frac{{1}}{{K}}\right)}^{{0.4999999997}}}{+}\frac{{1.916497650}{}{{ⅇ}}^{{-}\frac{{10.69609962}}{{{\mathrm{\sigma }}}^{{2}}}}{}{\left(\frac{{1}}{{K}}\right)}^{{-}\frac{{4.625170183}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}\frac{{0.4999999997}{}{{\mathrm{ln}}{}\left(\frac{{1}}{{K}}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}}{{\left(\frac{{1}}{{K}}\right)}^{{0.4999999997}}}{+}\frac{{17.72825555}{}{K}{}{{ⅇ}}^{{-}\frac{{10.69609962}}{{{\mathrm{\sigma }}}^{{2}}}}{}{\left(\frac{{1}}{{K}}\right)}^{{-}\frac{{4.625170184}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}\frac{{0.4999999997}{}{{\mathrm{ln}}{}\left(\frac{{1}}{{K}}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{\left(\frac{{1}}{{K}}\right)}^{{0.4999999998}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}}{{{\mathrm{\sigma }}}^{{2}}}{+}\frac{{3.832995293}{}{\mathrm{ln}}{}\left(\frac{{1}}{{K}}\right){}{K}{}{{ⅇ}}^{{-}\frac{{10.69609962}}{{{\mathrm{\sigma }}}^{{2}}}}{}{\left(\frac{{1}}{{K}}\right)}^{{-}\frac{{4.625170184}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}\frac{{0.4999999997}{}{{\mathrm{ln}}{}\left(\frac{{1}}{{K}}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{\left(\frac{{1}}{{K}}\right)}^{{0.4999999998}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}}{{{\mathrm{\sigma }}}^{{2}}}{+}{1.916497646}{}{K}{}{{ⅇ}}^{{-}\frac{{10.69609962}}{{{\mathrm{\sigma }}}^{{2}}}}{}{\left(\frac{{1}}{{K}}\right)}^{{-}\frac{{4.625170184}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}\frac{{0.4999999997}{}{{\mathrm{ln}}{}\left(\frac{{1}}{{K}}\right)}^{{2}}}{{{\mathrm{\sigma }}}^{{2}}}}{}{\left(\frac{{1}}{{K}}\right)}^{{0.4999999998}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}$ (7)
 > $\mathrm{plot3d}\left(\mathrm{Vega},\mathrm{\sigma }=0..1,K=70..120,\mathrm{axes}=\mathrm{BOXED}\right)$

Here are similar examples for the European put option.

 > $\mathrm{expand}\left(\mathrm{BlackScholesVega}\left(100,120,1,\mathrm{\sigma },r,d,'\mathrm{put}'\right)\right)$
 ${41.98835974}{}{{ⅇ}}^{{-}\frac{{0.01317414389}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}$ (8)
 > $\mathrm{BlackScholesVega}\left(100,120,1,0.3,0.05,0.03,'\mathrm{put}'\right)$
 ${35.86504172}$ (9)
 > $\mathrm{expand}\left(\mathrm{BlackScholesVega}\left(100,t↦\mathrm{max}\left(120-t,0\right),1,\mathrm{\sigma },r,d\right)\right)$
 ${41.98835973}{}{{ⅇ}}^{{-}\frac{{0.01317414389}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}$ (10)
 > $\mathrm{BlackScholesVega}\left(100,t↦\mathrm{max}\left(120-t,0\right),1,0.3,0.05,0.03,d\right)$
 ${35.86504186}$ (11)

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

 > $S≔\mathrm{expand}\left(\mathrm{BlackScholesVega}\left(100,t↦\mathrm{piecewise}\left(t<90,90-t,t<110,0,t-110\right),1,\mathrm{\sigma },r,d\right)\right)$
 ${S}{≔}{36.36298620}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{}{{ⅇ}}^{{-}\frac{{0.007857629439}}{{{\mathrm{\sigma }}}^{{2}}}}{+}\frac{{5.}{×}{{10}}^{{-9}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{}{{ⅇ}}^{{-}\frac{{0.007857629439}}{{{\mathrm{\sigma }}}^{{2}}}}}{{{\mathrm{\sigma }}}^{{2}}}{+}{40.20079382}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{}{{ⅇ}}^{{-}\frac{{0.002835811589}}{{{\mathrm{\sigma }}}^{{2}}}}{-}\frac{{1.}{×}{{10}}^{{-9}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{}{{ⅇ}}^{{-}\frac{{0.002835811589}}{{{\mathrm{\sigma }}}^{{2}}}}}{{{\mathrm{\sigma }}}^{{2}}}$ (12)
 > $C≔\mathrm{expand}\left(\mathrm{BlackScholesVega}\left(100,110,1,\mathrm{\sigma },r,d,'\mathrm{call}'\right)\right)$
 ${C}{≔}{20.10039692}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{}{{ⅇ}}^{{-}\frac{{0.002835811588}}{{{\mathrm{\sigma }}}^{{2}}}}{+}\frac{{3.027529011}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{}{{ⅇ}}^{{-}\frac{{0.002835811588}}{{{\mathrm{\sigma }}}^{{2}}}}}{{{\mathrm{\sigma }}}^{{2}}}{-}\frac{{3.027529011}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{}{{ⅇ}}^{{-}\frac{{0.002835811589}}{{{\mathrm{\sigma }}}^{{2}}}}}{{{\mathrm{\sigma }}}^{{2}}}{+}{20.10039691}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{}{{ⅇ}}^{{-}\frac{{0.002835811589}}{{{\mathrm{\sigma }}}^{{2}}}}$ (13)
 > $P≔\mathrm{expand}\left(\mathrm{BlackScholesVega}\left(100,90,1,\mathrm{\sigma },r,d,'\mathrm{put}'\right)\right)$
 ${P}{≔}\frac{{4.558482700}{}{{ⅇ}}^{{-}\frac{{0.007857629432}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}}{{{\mathrm{\sigma }}}^{{2}}}{+}{18.18149310}{}{{ⅇ}}^{{-}\frac{{0.007857629432}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}{-}\frac{{4.558482699}{}{{ⅇ}}^{{-}\frac{{0.007857629430}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}}{{{\mathrm{\sigma }}}^{{2}}}{+}{18.18149310}{}{{ⅇ}}^{{-}\frac{{0.007857629430}}{{{\mathrm{\sigma }}}^{{2}}}}{}{{ⅇ}}^{{-}{0.1249999999}{}{{\mathrm{\sigma }}}^{{2}}}$ (14)

Check that $S$ is sufficiently close to $C+P$.

 > $\mathrm{plot}\left(\left[S,C+P\right],\mathrm{\sigma }=0..1,\mathrm{color}=\left[\mathrm{red},\mathrm{blue}\right],\mathrm{thickness}=3,\mathrm{axes}=\mathrm{BOXED},\mathrm{gridlines}\right)$

References

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

Compatibility

 • The Finance[BlackScholesVega] command was introduced in Maple 15.