# Internal Design of MCEuropeanHestonGreeksEngine¶

## Overview¶

Greeks is often used to measure the sensitivity of the derivative values to changes in the behavior of the underlying instruments from which they are derived as well as changes in the broader market, such as shifts in interest rates (from STAC-A2).

The derivative value \(X(t)\) often is affected by the initial stock price, volatility, risk-free rate and mature date. For different sensitivity, there are different Greek alphabet. The following are some common sensitivities for option.

Both \(\delta\) and \(\gamma\) measures the impact of price changes on option price.

\(\theta\) measures the change of option price over mature time.

\(\rho\) measure the impact of risk-free interest rate on option price.

\(vega\) measure the impact of volatility on option price. Actually, the volatility changes over time. So, that means the option price will change over mature time.

There are also some model specific sensitivities. For Heston model, the model parameter \(\kappa\) (mean reversion), \(\theta\) (long term variance) and \(\xi\) (volatility of volatility). These model parameter will affect the volatility of underlying price, and then indirectly affect the option price. To measure the sensitivity of option price to model parameter, the following model vega are defined:

## Implementation¶

The numerical method for Greeks calculation includes finite difference, pathwise and likelihood ratio.

In our implementation, we use the finite difference method to calculate Greeks. Finite difference methods use the following differential expression to approximate partition derivative.

When any of the parameter changes, MCEuropeanHestonEngine will be called once to calculate the option price.