So far I’d just worked on examples with single currency swaps, but I’m starting to look at fx, and so need to expand slightly. My market data had been built up along the lines of group such as
CurveGroupName curveGroupName = CurveGroupName.of("USD-DSCON-LIBOR3M"); Map<CurveGroupName, CurveGroupDefinition> defns = RatesCalibrationCsvLoader.load(GROUPS_RESOURCE, SETTINGS_RESOURCE, CALIBRATION_RESOURCE); CurveGroupDefinition curveGroupDefinition = defns.get(curveGroupName).filtered(valDate, refData); MarketDataConfig marketDataConfig = MarketDataConfig.builder() .add(curveGroupName, curveGroupDefinition) .build(); CalibrationMeasures calibrationMeasures = CalibrationMeasures.PAR_SPREAD; CurveCalibrator calibrator = CurveCalibrator.of(1e-9, 1e-9, 100, calibrationMeasures); RatesProvider multiCurve = calibrator.calibrate(curveGroupDefinition, marketData, refData);
And so my groups.csv has the usual definition for setting up USD-DSCON-LIBOR3M. I’ve added in GBP config here (GBP-DSCON-LIBOR6M), but then got a little confused at the best way to add this in. It feels like a new CurveGroupName would be defined for GBP, added to the marketDataConfig, but then how would this flow through - two RatesProviders?
Alternatively, I guess I could define them all in one group name e.g. rather than USD-DSCON-LIBOR3M go for something more generic DSCON-LIBOR, that would include multiple currency data. But seems a bit messy.
I wondered what the advised solution looks like? I could only see examples using the example market data builder, or using single currency.