Gamma

Gamma ( IDataHolder Underlying Price , IDataHolder Volatility );

Default values:

Underlying Price: close(getUnderlyingSymbol()) Volatility: imp_volatility(getUnderlyingSymbol())

Description

Calculates the gamma option greek.

Input parameters

Parameter Default value Description
Underlying Price close(getUnderlyingSymbol()) Defines price to be used in calculation of gamma.
Volatility imp_volatility(getUnderlyingSymbol()) Defines volatility to be used in calculation of gamma.

Example

def shift = 0.1*close(GetUnderlyingSymbol());
plot theoreticalprice = OptionPrice(underlyingPrice = close(GetUnderlyingSymbol()) + shift);
plot firstorder = OptionPrice() + shift * Delta();
plot secondorder = firstorder + shift*shift/2 * Gamma();

This example illustrates the use of the Gamma function to calculate changes in the theoretical option price when the underlying symbol price changes significantly. While the expression using delta is only a rough estimate of the resulting price, taking gamma into account results in much better approximation.