PerturbationMapping

Hi,

In the HistoricalScenarioExample, in order to extend it to a Currency Swap, one would need a PerturbationMapping for FxRates.

The present MarketDataFilter are Curve based, is there an easy way to have FX Translation of two legs at Perturbed FX Rates?

Thank you.

Best regards,
Sanjeev

Hi Sanjeev

There is no support for FX rates in the scenario framework yet but it’s something we plan to address.

In order to apply perturbations to FX rates you would need the following types:

  • An implementation of MarketDataFilter<FxRate, FxRateId>
  • An implementation of ScenarioPerturbation<FxRate>

The MarketDataFilter.matches() method should return true for any FX rate which should be perturbed in the scenarios.

The ScenarioPerturbation.applyTo() method receives a MarketDataBox<FxRate> containing the base FX rate. It should contain logic to build a new market data box containing the perturbed FX rates.

Let me know if you have any more questions.

Regards
Chris