class FxForwardSensitivity implements PointSensitivity, PointSensitivityBuilder, ImmutableBean, Serializable {

  public static FxForwardSensitivity of(
      CurrencyPair currencyPair,
      Currency referenceCurrency,
      LocalDate referenceDate,
      double sensitivity) {

    boolean inverse = referenceCurrency.equals(currencyPair.getCounter());
    CurrencyPair pair = inverse ? currencyPair.inverse() : currencyPair;
    Currency sensitivityCurrency = pair.getCounter();
    return new FxForwardSensitivity(currencyPair, referenceCurrency, referenceDate, sensitivityCurrency, sensitivity);
  }

  private  FxForwardSensitivity(
      CurrencyPair currencyPair,
      Currency referenceCurrency,
      LocalDate referenceDate,
      Currency currency,
      double sensitivity);

}