code: public static double blackScholesATMOptionValue(
  			double volatility,
  			double optionMaturity,
  			double forward,
  			double payoffUnit)
  	{
  		if(optionMaturity < 0) {
  			return 0.0;
  		}
  
  		// Calculate analytic value
  		double dPlus = 0.5 * volatility * Math.sqrt(optionMaturity);
  		double dMinus = -dPlus;
  
  		double valueAnalytic = (NormalDistribution.cumulativeDistribution(dPlus) - NormalDistribution.cumulativeDistribution(dMinus)) * forward * payoffUnit;
  
  		return valueAnalytic;
  	}
docs: Calculates the Black-Scholes option value of an atm call option.
  
  @param volatility The Black-Scholes volatility.
  @param optionMaturity The option maturity T.
  @param forward The forward, i.e., the expectation of the index under the measure associated with payoff unit.
  @param payoffUnit The payoff unit, i.e., the discount factor or the anuity associated with the payoff.
  @return Returns the value of a European at-the-money call option under the Black-Scholes model