Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@
/**
* Example to illustrate using the calculation API to price a swap.
* <p>
* 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 {

Expand Down Expand Up @@ -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);
Expand Down