greeks.js
function _callTheta(s, k, t, v, r)
{
  var w = bs.getW(s, k, t, v, r);
  if(isFinite(w))
  {
    return -1 * v * s * _stdNormDensity(w) / (2 * Math.sqrt(t)) - k * r * Math.pow(Math.E, -1 * r * t) * bs.stdNormCDF(w - v * Math.sqrt(t));
  }
  else
  {
    return 0;
  }
}
function _callTheta(s, k, t, v, r)
{
  var w = bs.getW(s, k, t, v, r);
  if(isFinite(w))
  {
    return -1 * v * s * _stdNormDensity(w) / (2 * Math.sqrt(t)) - k * r * Math.pow(Math.E, -1 * r * t) * bs.stdNormCDF(w - v * Math.sqrt(t));
  }
  else
  {
    return 0;
  }
}
function _callTheta ( s , k , t , v , r ) { var w = bs . getW ( s , k , t , v , r ) ; if ( isFinite ( w ) ) { return - 1 * v * s * _stdNormDensity ( w ) / ( 2 * Math . sqrt ( t ) ) - k * r * Math . pow ( Math . E , - 1 * r * t ) * bs . stdNormCDF ( w - v * Math . sqrt ( t ) ) ; } else { return 0 ; } }
Calculates the theta of a call option.

@private
@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 theta of the call option
Calculates the theta of a call option .