Quant analytics: Options Pricing Greeks delta, gamme, vega, rho, theta, C++ programming

Join my FREE newsletter if you like these sort of articles

algo

Shows sensitivity to an options price

Example:

Contractual time life of 1 year T = 1.00

S(stock price)=100

K=100

v=30 percent

r=4 percent

Div yield=0% (no dividend)

OPTION price also known as Black Scholes (BS)=13.75

Delta = change in OPTIOn price with respect to change in Stock price.

if stock price changes, how sensitive will BS be. All Greeks are first derivatives. If

detlta is .6, if stock price changes so will the option price but by 60% of the stock price

change. Delta is a sensitivity for the stock price. Delta is a percentage between 0 – 1.0.

As it converges to 1, the stock price increases faster. As stock prices lower, option

prices converges out of the money.

Gamma=Change ins DELTA with respect to change in stock price. Gamma is second derivative of

stock price but first derivative of delta. Longer term of gamma of call option vs time to

expire also indicates lower delta. Delta peaks at the money when the option is at the

money. This is where the delta is changing the most rapidly. After the peak, the delta

converges to 1 but becoming more stable. Delta converges more stable as it converges from 0

and the rate of change is slower.

Vega=Change in OPTION price with respect to CHANGE in volatility. This is significant since

the sensitivity is high. The higher vega means the option price is change (or more

sensitive) to changes in volatility. The longer the term, the more sensitive as vega grows

as the option life grows. Gamma peaks at the in the money.

Rho=Change in OPTION price with respect to change in interest rate. It is less sensitive as

compare to other inputs of volality. Option price is more sensitive to changes in

volatitlity versus interest rate.

Theta=Change in OPTION price with respect to change in Term (T). This is known as time

decay. This is always negative. As time passes, the option and gets closer to expiration,

it becomes less valueable. Time erodes the value of the option.

C++ Programmatic calculations include:

Options Pricing Greeks (check Option type is Call or Put as well)

// Black-Scholes Delta

double BSDelta(double S, double K, double T, double r, double v, char OpType)

{

double d = (log(S/K) + T*(r + 0.5*v*v)) / (v*sqrt(T));

if (OpType==’C’)

return N(d);

else

return N(d) – 1;

}

// Black-Scholes Gamma

double BSGamma(double S, double K, double T, double r, double v)

{

double d = (log(S/K) + T*(r + 0.5*v*v)) / (v*sqrt(T));

return f(d) / S / v / sqrt(T);

}

// Black-Scholes Vega

double BSVega(double S, double K, double T, double r, double v)

{

double d = (log(S/K) + T*(r + 0.5*v*v)) / (v*sqrt(T));

return S*f(d)*sqrt(T);

}

// Black-Scholes Rho

double BSRho(double S, double K, double T, double r, double v, char OpType)

{

double d = (log(S/K) + T*(r + 0.5*v*v)) / (v*sqrt(T));

if (OpType==’C’)

return T*K*exp(-r*T)*N(d – v*sqrt(T));

else

return -T*K*exp(-r*T)*N(v*sqrt(T) – d);

}

// Black-Scholes Theta

double BSTheta(double S, double K, double T, double r, double v, char OpType)

{

double d = (log(S/K) + T*(r + 0.5*v*v)) / (v*sqrt(T));

if (OpType==’C’)

return -S*f(d)*v/2/sqrt(T) – r*K*exp(-r*T)*N(d – v*sqrt(T));

else

return -S*f(d)*v/2/sqrt(T) + r*K*exp(-r*T)*N(v*sqrt(T) – d);

}

Note:

// N(0,1) density

double f(double x) {

double pi = 4.0*atan(1.0);

return exp(-x*x*0.5)/sqrt(2*pi);

}

// Boole’s Rule

double Boole(double StartPoint, double EndPoint, int n) {

vector<double> X(n+1, 0.0);

vector<double> Y(n+1, 0.0);

double delta_x = (EndPoint – StartPoint)/double(n);

for (int i=0; i<=n; i++) {

X[i] = StartPoint + i*delta_x;

Y[i] = f(X[i]);

}

double sum = 0;

for (int t=0; t<=(n-1)/4; t++) {

int ind = 4*t;

sum += (1/45.0)*(14*Y[ind] + 64*Y[ind+1] + 24*Y[ind+2] + 64*Y[ind+3] + 14*Y[ind+4])*delta_x;

}

return sum;

}

// N(0,1) cdf by Boole’s Rule

double N(double x) {

return Boole(-10.0, x, 240);

}

**HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>**

**NOTE** I now post my

** ***TRADING ALERTS* into my personal

FACEBOOK ACCOUNT and

TWITTER. Don't worry as I don't post stupid cat videos or what I eat!