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
merged 2 commits into from May 23, 2019

Conversation

Projects
None yet
3 participants
@marc-henrard
Copy link
Contributor

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

This comment has been minimized.

Copy link
@yukiiwashita

yukiiwashita May 21, 2019

Member

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

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
security/snyk - examples/pom.xml (OpenGamma) No new issues
Details
security/snyk - modules/calc/pom.xml (OpenGamma) No new issues
Details
security/snyk - modules/collect/pom.xml (OpenGamma) No new issues
Details
security/snyk - modules/data/pom.xml (OpenGamma) No new issues
Details
security/snyk - modules/loader/pom.xml (OpenGamma) No new issues
Details
security/snyk - modules/market/pom.xml (OpenGamma) No new issues
Details
security/snyk - modules/math/pom.xml (OpenGamma) No new issues
Details
security/snyk - modules/measure/pom.xml (OpenGamma) No new issues
Details
security/snyk - modules/pom.xml (OpenGamma) No new issues
Details
security/snyk - modules/product/pom.xml (OpenGamma) No new issues
Details
security/snyk - modules/report/pom.xml (OpenGamma) No new issues
Details
security/snyk - pom.xml (OpenGamma) No new issues
Details
workflow Workflow: workflow
Details

@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
You can’t perform that action at this time.