class BlackFxSingleBarrierOptionProductPricer {

  public PointSensitivityBuilder presentValueSensitivityRatesStickyStrike(
      ResolvedFxSingleBarrierOption option,
      RatesProvider ratesProvider,
      BlackFxOptionVolatilities volatilities) {

    ResolvedFxVanillaOption underlyingOption = option.getUnderlyingOption();
    if (volatilities.relativeTime(underlyingOption.getExpiry()) <= 0d) {
      return PointSensitivityBuilder.none();
    }
    ValueDerivatives priceDerivatives = priceDerivatives(option, ratesProvider, volatilities);
    ResolvedFxSingle underlyingFx = underlyingOption.getUnderlying();
    CurrencyPair currencyPair = underlyingFx.getCurrencyPair();
    double signedNotional = signedNotional(underlyingOption);
    double counterYearFraction =
        ratesProvider.discountFactors(currencyPair.getCounter()).relativeYearFraction(underlyingFx.getPaymentDate());
    ZeroRateSensitivity counterSensi = ZeroRateSensitivity.of(
        currencyPair.getCounter(),
        counterYearFraction,
        signedNotional * (priceDerivatives.getDerivative(2) + priceDerivatives.getDerivative(3)));
    double baseYearFraction =
        ratesProvider.discountFactors(currencyPair.getBase()).relativeYearFraction(underlyingFx.getPaymentDate());
    ZeroRateSensitivity baseSensi = ZeroRateSensitivity.of(
        currencyPair.getBase(),
        baseYearFraction,
        currencyPair.getCounter(),
        -priceDerivatives.getDerivative(3) * signedNotional);
    return counterSensi.combinedWith(baseSensi);
  }

  public  BlackFxSingleBarrierOptionProductPricer();

}