// -------------------------------------------------------------------------
  @Override
  public FunctionRequirements requirements(
      BulletPaymentTrade trade,
      Set<Measure> measures,
      CalculationParameters parameters,
      ReferenceData refData) {

    // extract data from product
    BulletPayment product = trade.getProduct();
    Currency currency = product.getCurrency();

    // use lookup to build requirements
    RatesMarketDataLookup ratesLookup = parameters.getParameter(RatesMarketDataLookup.class);
    return ratesLookup.requirements(currency);
  }
 @Override
 public Currency naturalCurrency(BulletPaymentTrade trade, ReferenceData refData) {
   return trade.getProduct().getCurrency();
 }