Package org.apache.commons.math.stat.descriptive.rank

Examples of org.apache.commons.math.stat.descriptive.rank.Min


    for (int loopbasket = 0; loopbasket < NB_BOND; loopbasket++) {
      final double bondPriceForward = METHOD_BOND.dirtyPriceFromCurves(BOND_FUTURE.getDeliveryBasket()[loopbasket], ISSUER_MULTICURVES);
      netBasisExpected[loopbasket] = bondPriceForward - (priceFuture * CONVERSION_FACTOR[loopbasket] + BOND_FUTURE.getDeliveryBasket()[loopbasket].getAccruedInterest());
      assertEquals("Bond future security Discounting Method: netBasis", netBasisExpected[loopbasket], netBasisComputed[loopbasket], 1.0E-10);
    }
    final Min minFunction = new Min();
    final double netBasisMin = minFunction.evaluate(netBasisComputed);
    final double priceFutureFromNetBasis = METHOD_FUT_DSC.priceFromNetBasis(BOND_FUTURE, ISSUER_MULTICURVES, netBasisMin);
    assertEquals("Bond future security Discounting Method: netBasis", priceFuture, priceFutureFromNetBasis, 1.0E-10);
  }
View Full Code Here


    for (int loopbasket = 0; loopbasket < NB_BOND; loopbasket++) {
      final double bondPriceForward = METHOD_BOND.dirtyPriceFromCurves(BOND_FUTURE_DERIV.getDeliveryBasket()[loopbasket], CURVES);
      netBasisExpected[loopbasket] = bondPriceForward - (priceFuture * CONVERSION_FACTOR[loopbasket] + BOND_FUTURE_DERIV.getDeliveryBasket()[loopbasket].getAccruedInterest());
      assertEquals("Bond future security Discounting Method: netBasis", netBasisExpected[loopbasket], netBasisComputed[loopbasket], 1.0E-10);
    }
    final Min minFunction = new Min();
    final double netBasisMin = minFunction.evaluate(netBasisComputed);
    final double priceFutureFromNetBasis = METHOD.priceFromNetBasis(BOND_FUTURE_DERIV, CURVES, netBasisMin);
    assertEquals("Bond future security Discounting Method: netBasis", priceFuture, priceFutureFromNetBasis, 1.0E-10);
  }
View Full Code Here

TOP

Related Classes of org.apache.commons.math.stat.descriptive.rank.Min

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.