MultiCapFloorPricer { public double[] getIntrinsicCapValues() { int n = _nCaplets; double[] intr = new double[n]; for (int i = 0; i < n; i++) { intr[i] = _capletsArray[i].getIntrinsicValue(); } return aggregateToCaps(intr); } MultiCapFloorPricer(List<CapFloor> caps,  MulticurveProviderInterface curves); double[] getCapletVols(VolatilitySurface volSurface); double[] price(VolatilitySurface volSurface); double[] priceFromCapletVols(double[] capletVols); double[] price(double[] capVolatilities); double[] impliedVols(double[] capPrices); double[] impliedVols(VolatilitySurface volSurface); double[] vega(double[] capVolatilities); DoubleMatrix2D vegaFromCapletVols(double[] capletVols); DoubleMatrix2D capVolVega(double[] capletVols); double[] getCapletExpiries(); double[] getStrikes(); double[] getIntrinsicCapValues(); double[] getCapStartTimes(); double[] getCapEndTimes(); DoublesPair[] getExpiryStrikeArray(); int getNumCaps(); int getNumCaplets(); double[] getCapletForwardRates();  }
@Test public void capIntrTest() { MulticurveProviderDiscount yieldCurve = getYieldCurves(); List<CapFloor> caps = getATMCaps(); MultiCapFloorPricer multiPricer = new MultiCapFloorPricer(caps, yieldCurve); double[] intrVal = multiPricer.getIntrinsicCapValues(); int nCaps = caps.size(); assertEquals(nCaps, intrVal.length); for (int i = 0; i < nCaps; i++) { assertTrue(intrVal[i] > 0.0); } }