Hi there,
I would like to manipulate cross-currency trades (FxVanillaOption, for example). I have 2 different currencies, which implies 2 different curveGroupDefinitions and so 2 different RatesMarketDataLookUp:
CalculationParameters calculationParameters = CalculationParameters.of(RatesMarketDataLookup.of(curveGroupDefinition1), RatesMarketDataLookup.of(curveGroupDefinition2));
CalculationRules rules = CalculationRules.of(functions, calculationParameters);
When I try to build CalculationRules from these 2 CalculationParameters, an IllegaleArgumentException is thrown:
Multiple entries with same key: interface com.opengamma.strata.measure.rate.RatesMarketDataLookup=DefaultRatesMarketDataLookup{discountCurves={GBP=CurveId{curveGroupName=GBP-DSCONOIS-L6MIRS, curveName=GBP-DSCON-OIS, observableSource=None}}, forwardCurves={GBP-LIBOR-6M=CurveId{curveGroupName=GBP-DSCONOIS-L6MIRS, curveName=GBP-LIBOR6M-IRS, observableSource=None}, GBP-SONIA=CurveId{curveGroupName=GBP-DSCONOIS-L6MIRS, curveName=GBP-DSCON-OIS, observableSource=None}}, observableSource=None, fxLookup=DefaultFxRateLookup{currency=null, observableSource=None}} and interface com.opengamma.strata.measure.rate.RatesMarketDataLookup=DefaultRatesMarketDataLookup{discountCurves={USD=CurveId{curveGroupName=USD-DSCON-LIBOR3M, curveName=USD-Disc, observableSource=None}}, forwardCurves={USD-FED-FUND=CurveId{curveGroupName=USD-DSCON-LIBOR3M, curveName=USD-Disc, observableSource=None}, USD-LIBOR-3M=CurveId{curveGroupName=USD-DSCON-LIBOR3M, curveName=USD-3ML, observableSource=None}}, observableSource=None, fxLookup=DefaultFxRateLookup{currency=null, observableSource=None}}