fbpx

C++: Black Scholes Put Option Vega

Bjarne-stroustrup
 

// Calculate the Black Scholes European put option Vega
double BS_Put_Option_Vega(double S, double K, double r, double v, double T)
// Parameters: (S = Current Stock Price, K = Strike Price, r = Risk-Free Rate, v = Volatility of Stock Price, T = Time to Maturity)
{ return BS_Call_Option_Vega(S, K, r, v, T); } // Identical to call via put-call parity

// Calculate the Black Scholes European call option Vega
double BS_Call_Option_Vega(double S, double K, double r, double v, double T) 
// Parameters: (S = Current Stock Price, K = Strike Price, r = Risk-Free Rate, v = Volatility of Stock Price, T = Time to Maturity)
{  return S * Normal_PDF(d_j(1, S, K, r, v, T)) * sqrt(T); }

const double Pi = 3.14159265359;

// Standard Normal probability density function
double Normal_PDF(const double & x)
// Normal PDF(x) = exp(-x*x/2)/{sigma * sqrt(2 * Pi) }
{ return (1.0/(double)pow(2 * Pi, 0.5)) * exp(-0.5 * x * x); }

Our team found a curious site for our readers that are fans of online gaming, a rather exciting site that provides the latest gaming technology. Casinodots.com is the site, they compile the best reviews of MGA casino utan svensk licens sites. This site might pique your curiosity and you can win extra money!