greeks.js
function getVega(s, k, t, v, r)
{
  var w = bs.getW(s, k, t, v, r);
  return (isFinite(w)) ? (s * Math.sqrt(t) * _stdNormDensity(w) / 100) : 0;
}
function getVega(s, k, t, v, r)
{
  var w = bs.getW(s, k, t, v, r);
  return (isFinite(w)) ? (s * Math.sqrt(t) * _stdNormDensity(w) / 100) : 0;
}
function getVega ( s , k , t , v , r ) { var w = bs . getW ( s , k , t , v , r ) ; return ( isFinite ( w ) ) ? ( s * Math . sqrt ( t ) * _stdNormDensity ( w ) / 100 ) : 0 ; }
Calculates the vega of a call and put option.

@param {Number} s Current price of the underlying
@param {Number} k Strike price
@param {Number} t Time to experiation in years
@param {Number} v Volatility as a decimal
@param {Number} r Anual risk-free interest rate as a decimal
@returns {Number} The vega of the option
Calculates the vega of a call and put option .