Amending example to run correctly with GBP swap


#1

Hi great product. I have starting out exploring Strata, and decided to test calibration and the associated pv01s for a vanilla GBP SWAP indexed to GBP Libor 6M and discounted with OIS. I’m using the data provided in
/example-calibration/curves/GBP-DSCONOIS-L6MIRS

and following the example: SwapPricingWithCalibrationExample in the finance subdirectory of com.opengamma.strata.examples, which is set up for a USD swap.

The example compiles and runs…so I assume I have correctly changed all the market data and input files so as to build the correct swap, but the report template “swap-report-template”

TradeReportTemplate reportTemplate = ExampleData.loadTradeReportTemplate("swap-report-template");

returns a column “USD Discounting PV01”, with the message
"FAIL: Invalid field ‘usd’ in type com.opengamma.strata.market.param.CurrencyParameterSensitivities. Use one of: [gbp, gbp-dscon-ois, gbp-libor6m-irs]"

Could someone point me to the right place to make this change - in order to get my minimal working example working? Many thanks


#2

In swap-report-template.ini, you need to change Measures.PV01CalibratedBucketed.usd.usd-disc to Measures.PV01CalibratedBucketed.gbp.gbp-discon-ois or Measures.PV01CalibratedBucketed.gbp.gbp-libor6m-irs. ie. you are selecting the curve to show the sensitivities for.