From 4187d7e7035f30e8627f9bf070e3350165ba9ee8 Mon Sep 17 00:00:00 2001 From: Sean Date: Thu, 13 Aug 2026 21:35:08 +0800 Subject: [PATCH] Clarify market data in swap pricing example --- .../opengamma/strata/examples/SwapPricingExample.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/examples/src/main/java/com/opengamma/strata/examples/SwapPricingExample.java b/examples/src/main/java/com/opengamma/strata/examples/SwapPricingExample.java index f8193e3062..c28004cd86 100644 --- a/examples/src/main/java/com/opengamma/strata/examples/SwapPricingExample.java +++ b/examples/src/main/java/com/opengamma/strata/examples/SwapPricingExample.java @@ -62,7 +62,12 @@ /** * Example to illustrate using the calculation API to price a swap. *

- * This makes use of the example market data environment. + * This makes use of the example market data environment. The example uses a + * multi-curve setup: the USD discount curve is used for discounting and the + * USD-LIBOR-3M curve is used for floating-rate projection. The resulting NPV + * is therefore not directly comparable with a single flat risk-free-rate curve + * used by another pricing library unless the market data and conventions are + * aligned first. */ public class SwapPricingExample { @@ -95,7 +100,9 @@ private static void calculate(CalculationRunner runner) { Column.of(Measures.PV01_CALIBRATED_BUCKETED), Column.of(AdvancedMeasures.PV01_SEMI_PARALLEL_GAMMA_BUCKETED)); - // use the built-in example market data + // Use the built-in multi-curve example market data. USD-Disc is used for + // discounting and USD-3ML for USD-LIBOR-3M projection. This is not a flat + // 1% risk-free-rate setup. LocalDate valuationDate = LocalDate.of(2014, 1, 22); ExampleMarketDataBuilder marketDataBuilder = ExampleMarketData.builder(); MarketData marketData = marketDataBuilder.buildSnapshot(valuationDate);