class SpotRateShift implements StructureManipulator<Double>, ImmutableBean {

  @Override
  public Double execute(Double spotRate,
                        ValueSpecification valueSpecification,
                        FunctionExecutionContext executionContext) {
    CurrencyPair currencyPair = SimulationUtils.getCurrencyPair(valueSpecification);
    if (_currencyPairs.contains(currencyPair)) {
      return applyShift(spotRate);
    } else if (_currencyPairs.contains(currencyPair.inverse())) {
      double inverseRate = 1 / spotRate;
      double shiftedRate = applyShift(inverseRate);
      return 1 / shiftedRate;
    } else {
      throw new IllegalArgumentException("Currency pair " + currencyPair + " shouldn't match " + _currencyPairs);
    }
  }

    SpotRateShift(ScenarioShiftType shiftType, Number shiftAmount, Set<CurrencyPair> currencyPairs);
    SpotRateShift(ScenarioShiftType shiftType,
                              Number shiftAmount,
                              Number minRate,
                              Number maxRate,
                              CurrencyPair currencyPair);
  private  SpotRateShift(
      ScenarioShiftType shiftType,
      double shiftAmount,
      double minRate,
      double maxRate,
      Set<CurrencyPair> currencyPairs);

}