In this example we show a three-dimensional graphic made with one of Derivatives Expert's option pricing functions and one of Mathematica's 3D plot functions. The example is made to show a simple yet powerful graphical plot using functionality of Derivatives Expert for Mathematica.

The specific plot shown is done on the second partial derivative of the given option pricing function. Plots of partial derivatives of option pricing functions give valuable information about the behaviour (movements) of option pricing functions in certain situations.

Options pricing example

This opens the relevant package.

Needs["DerivativesExpert`GarmanKohlhagen`"]

This is a plot of the second partial derivative of the GarmanKohlhagen theoretical price of a European put option with respect to the spot price, as function of exercise and spotprice. The spot price and the exercise price are varied between 80 and 120, the domestic and the foreign spot interest rates are assumed to be constant at 10 percent, and the volatility is 25 percent per year. This shows that gamma is greatest at-the-money.

Plot3D[(∂_(GarmanKohlhagen[x,y,(1/2),10,10,25],{SpotPrice,2}))EuropeanPutOption,{x,80,120},{y,80,120},PlotPoints->20,PlotRange->All,AxesLabel->{"spotprice","exercise","Gamma"},ViewPoint->{-1.3`,-2.4`,2.`}]