class CrossGammaParameterSensitivities implements FxConvertible<CrossGammaParameterSensitivities>, ImmutableBean, Serializable {

  public CurrencyAmount total(Currency resultCurrency, FxRateProvider rateProvider) {
    CrossGammaParameterSensitivities converted = convertedTo(resultCurrency, rateProvider);
    double total = converted.sensitivities.stream()
        .mapToDouble(s -> s.getSensitivity().total())
        .sum();
    return CurrencyAmount.of(resultCurrency, total);
  }

  @ImmutableConstructor private  CrossGammaParameterSensitivities(List<? extends CrossGammaParameterSensitivity> sensitivities);
  private  CrossGammaParameterSensitivities(ImmutableList<CrossGammaParameterSensitivity> sensitivities);

}