erf = x => {
const sign = Math.sign(x);
const ax = Math.abs(x);
const t = 1 / (1 + 0.3275911 * ax);
const y = 1 - (((((1.061405429*t - 1.453152027)*t) + 1.421413741)*t - 0.284496736)*t + 0.254829592)*t*Math.exp(-ax*ax);
return sign * y;
}
N = z => 0.5 * (1 + erf(z / Math.SQRT2));
n = z => (1 / Math.sqrt(2 * Math.PI)) * Math.exp(-0.5 * z * z);
// --- Greeks Calculation ---
calculateGreeks = (S, K, T, r, sigma, q, type) => {
// Prevent division by zero for T=0
const t = Math.max(T, 1e-4);
const d1 = (Math.log(S / K) + (r - q + 0.5 * sigma * sigma) * t) / (sigma * Math.sqrt(t));
const d2 = d1 - sigma * Math.sqrt(t);
const Nd1 = N(d1);
const Nd2 = N(d2);
const Nnegd1 = N(-d1);
const Nnegd2 = N(-d2);
const nd1 = n(d1);
const eqt = Math.exp(-q * t);
const ert = Math.exp(-r * t);
const sqrtT = Math.sqrt(t);
let delta, theta, rho;
// Gamma and Vega are identical for Call and Put
const gamma = (nd1 * eqt) / (S * sigma * sqrtT);
const vega = S * eqt * sqrtT * nd1;
if (type === "Call") {
delta = eqt * Nd1;
theta = (- (S * sigma * eqt * nd1) / (2 * sqrtT))
- (r * K * ert * Nd2)
+ (q * S * eqt * Nd1);
rho = K * t * ert * Nd2;
} else {
delta = -eqt * Nnegd1;
theta = (- (S * sigma * eqt * nd1) / (2 * sqrtT))
+ (r * K * ert * Nnegd2)
- (q * S * eqt * Nnegd1);
rho = -K * t * ert * Nnegd2;
}
return { delta, gamma, theta, vega, rho };
}
// Current Values
currentGreeks = calculateGreeks(S0, K, T, r, sigma, q, optType);The Greeks
This interactive tool allows you to analyze the Greeks—sensitivities of the option price to various parameters—using the Black-Scholes-Merton model.
Parameters
Greek Values
Detailed Analysis
Below you can see how each Greek varies with the Stock Price (\(S_0\)) and Time to Maturity (\(T\)).
Formula:
\[ \Delta = e^{-qT} N(d_1) \quad \text{(call)}, \qquad \Delta = -e^{-qT} N(-d_1) \quad \text{(put)} \]
Delta measures the sensitivity of the option’s price to changes in the underlying asset’s price.
- Call Delta: \(0 \le \Delta \le 1\) (for European calls without dividends).
- Put Delta: \(-1 \le \Delta \le 0\).
- Interpretation: Roughly the probability that the option finishes in-the-money (in a risk-neutral world). Also the hedge ratio (number of shares to hold to hedge a short position).
Formula (per year):
\[ \Theta_c = -\frac{S_0 \sigma e^{-qT} N'(d_1)}{2\sqrt{T}} - r K e^{-rT} N(d_2) + q S_0 e^{-qT} N(d_1) \]
\[ \Theta_p = -\frac{S_0 \sigma e^{-qT} N'(d_1)}{2\sqrt{T}} + r K e^{-rT} N(-d_2) - q S_0 e^{-qT} N(-d_1) \]
Theta measures the rate of time decay of an option’s value.
- Sign: Usually negative for long positions (option loses value as time passes).
- Behavior: Decay accelerates as expiration approaches for at-the-money options.
- Note: The formula gives the time decay for one year. Traders often divide this by 365 (calendar days) or 252 (trading days) to estimate the daily decay.
Formula:
\[ \Gamma = \frac{e^{-qT} N'(d_1)}{S_0 \sigma \sqrt{T}} \]
Gamma measures the rate of change of Delta with respect to the underlying price (curvature).
- Sign: Positive for long positions (both calls and puts).
- Peak: Highest for at-the-money options.
- Risk: High gamma implies that Delta changes rapidly, making hedging difficult (Gamma risk).
Formula:
\[ \nu = S_0 e^{-qT} \sqrt{T} N'(d_1) \]
Vega measures the sensitivity to changes in volatility.
- Sign: Positive for long positions.
- Peak: Highest for at-the-money options.
- Interpretation: The calculated value represents the price change for a 1 unit (100%) change in volatility. Traders typically divide this by 100 to estimate the sensitivity to a 1 percentage point change in volatility.
Formula:
\[ \rho = K T e^{-rT} N(d_2) \quad \text{(call)}, \qquad \rho = -K T e^{-rT} N(-d_2) \quad \text{(put)} \]
Rho measures sensitivity to the risk-free interest rate.
- Call Rho: Positive (higher rates \(\rightarrow\) higher call prices).
- Put Rho: Negative (higher rates \(\rightarrow\) lower put prices).
- Relevance: Usually the least significant Greek for short-dated equity options.
- Note: Like Vega, the formula assumes a 1 unit (100%) change in interest rates. Divide by 100 for the sensitivity to a 1 percentage point change.
N’(d) denotes the standard normal probability density function (PDF):
\[ N'(d) = \frac{1}{\sqrt{2\pi}} e^{-d^2/2} \]