Amending example to run correctly with GBP swap


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

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 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


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.