Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synthetic calibrator extended to support Cross-currency swaps. #1976

merged 2 commits into from May 23, 2019


Copy link

@marc-henrard marc-henrard commented May 21, 2019

Synthetic calibrator did not support the cross-currency instruments (FX swaps and XCcy swaps) because the way the FxRateId was treated. Code has been improved to deal with QuoteId and FxRateId separetely.

@marc-henrard marc-henrard requested a review from yukiiwashita May 21, 2019
// Generate quotes for FX pairs. The first currency is arbitrarily selected as starting point.
// The crosses are automatically generated by the MarketDataFxRateProvider used in calibration.
for (int loopccy = 1; loopccy < ccyRequired.size(); loopccy++) {
CurrencyPair ccyPair = CurrencyPair.of(ccyRequired.get(0), ccyRequired.get(loopccy));
FxRateId fxId = FxRateId.of(ccyPair);
mapIdSy.put(fxId, FxRate.of(ccyPair, inputProvider.fxRate(ccyPair)));
mapId0.put(fxId, FxRate.of(ccyPair, inputProvider.fxRate(ccyPair))); // Required to generate the trade
Copy link

@yukiiwashita yukiiwashita May 21, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because MarketData created from this map is used in CurveNode for cross currency products without MarketDataFxRateProvider, FX crosses are not generated. Thus the exact FxRateIds are required for all of the possible pairs.

@marc-henrard marc-henrard merged commit 21bf40a into master May 23, 2019
15 checks passed
@delete-merged-branch delete-merged-branch bot deleted the wip/synth-cal-fx branch May 23, 2019
@jodastephen jodastephen added this to the v2.4 milestone May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants