BondFutureDiscountingMethod extends BondFutureMethod { public MultipleCurrencyAmount presentValueFromNetBasis(final BondFuture future, final IssuerProviderInterface issuerMulticurves, final double netBasis) { return presentValueFromPrice(future, priceFromNetBasis(future, issuerMulticurves, netBasis)); } private  BondFutureDiscountingMethod(); static BondFutureDiscountingMethod getInstance(); double price(final BondFuture future, final IssuerProviderInterface issuerMulticurves); double priceFromNetBasis(final BondFuture future, final IssuerProviderInterface issuerMulticurves, final double netBasis); MultipleCurrencyAmount presentValue(final BondFuture future, final IssuerProviderInterface issuerMulticurves); MultipleCurrencyAmount presentValueFromNetBasis(final BondFuture future, final IssuerProviderInterface issuerMulticurves, final double netBasis); MulticurveSensitivity priceCurveSensitivity(final BondFuture future, final IssuerProviderInterface issuerMulticurves); MultipleCurrencyMulticurveSensitivity presentValueCurveSensitivity(final BondFuture future, final IssuerProviderInterface issuerMulticurves); double[] grossBasisFromPrices(final BondFuture future, final double[] cleanPrices, final double futurePrice); double[] grossBasisFromCurves(final BondFuture future, final IssuerProviderInterface issuerMulticurves, final double futurePrice); double[] netBasisAllBonds(final BondFuture future, final IssuerProviderInterface issuerMulticurves, final double futurePrice); double netBasisCheapest(final BondFuture future, final IssuerProviderInterface issuerMulticurves, final double futurePrice);  }
@Test public void presentValueFromNetBasis() { final double netBasisInput = 0.0001; final MultipleCurrencyAmount pvComputed = METHOD_FUT_DSC.presentValueFromNetBasis(BOND_FUTURE, ISSUER_MULTICURVES, netBasisInput); final double priceComputed = METHOD_FUT_DSC.priceFromNetBasis(BOND_FUTURE, ISSUER_MULTICURVES, netBasisInput); final MultipleCurrencyAmount pvExpected = METHOD_FUT_DSC.presentValueFromPrice(BOND_FUTURE, priceComputed); assertEquals("Bond future Discounting Method: present value from net basis", pvExpected.getAmount(USD), pvComputed.getAmount(USD), TOLERANCE_PV); }