question: public double atmRate ( final Leg leg , final Handle < YieldTermStructure > discountCurve , final Date settlementDate , final Date npvDate , final int exDividendDays , double npv ) { final double bps = bps ( leg , discountCurve , settlementDate , npvDate , exDividendDays ) ; if ( npv == 0 ) { npv = npv ( leg , discountCurve , settlementDate , npvDate , exDividendDays ) ; } return basisPoint_ * npv / bps ; }
target:  At-the-money rate of the cash flows. <p> The result is the fixed rate for which a fixed rate cash flow vector, equivalent to the input vector, has the required NPV according to the given term structure. If the required NPV is not given, the input cash flow vector's NPV is used instead.