class BlackBondFutureOptionMarginedTradePricer {

  public CurrencyAmount presentValue(
      ResolvedBondFutureOptionTrade trade,
      LocalDate valuationDate,
      double currentOptionPrice,
      double lastOptionSettlementPrice) {

    ResolvedBondFutureOption option = trade.getProduct();
    double referencePrice = referencePrice(trade, valuationDate, lastOptionSettlementPrice);
    double priceIndex = productPricer.marginIndex(option, currentOptionPrice);
    double referenceIndex = productPricer.marginIndex(option, referencePrice);
    double pv = (priceIndex - referenceIndex) * trade.getQuantity();
    return CurrencyAmount.of(option.getUnderlyingFuture().getCurrency(), pv);
  }

  public  BlackBondFutureOptionMarginedTradePricer(
      BlackBondFutureOptionMarginedProductPricer productPricer);

}