public final class CashFlowEquivalentCalculator extends Object
Reference: Henrard, M. The Irony in the derivatives discounting Part II: the crisis. Wilmott Journal, 2010, 2, 301-316.
| Modifier and Type | Method and Description |
|---|---|
static ImmutableMap<Payment,PointSensitivityBuilder> |
cashFlowEquivalentAndSensitivityFixedLeg(ResolvedSwapLeg fixedLeg,
RatesProvider ratesProvider)
Computes cash flow equivalent and sensitivity of fixed leg.
|
static ImmutableMap<Payment,PointSensitivityBuilder> |
cashFlowEquivalentAndSensitivityIborLeg(ResolvedSwapLeg iborLeg,
RatesProvider ratesProvider)
Computes cash flow equivalent and sensitivity of Ibor leg.
|
static ImmutableMap<Payment,PointSensitivityBuilder> |
cashFlowEquivalentAndSensitivityOnLeg(ResolvedSwapLeg onLeg,
RatesProvider multicurve)
Computes cash flow equivalent of and sensitivity overnight leg.
|
static ImmutableMap<Payment,PointSensitivityBuilder> |
cashFlowEquivalentAndSensitivitySwap(ResolvedSwap swap,
RatesProvider ratesProvider)
Computes cash flow equivalent and sensitivity of swap.
|
static ResolvedSwapLeg |
cashFlowEquivalentFixedLeg(ResolvedSwapLeg fixedLeg,
RatesProvider ratesProvider)
Computes cash flow equivalent of fixed leg.
|
static ResolvedSwapLeg |
cashFlowEquivalentIborLeg(ResolvedSwapLeg iborLeg,
RatesProvider ratesProvider)
Computes cash flow equivalent of Ibor leg.
|
static ResolvedSwapLeg |
cashFlowEquivalentOnLeg(ResolvedSwapLeg onLeg,
RatesProvider multicurve)
Computes cash flow equivalent of overnight leg.
|
static ResolvedSwapLeg |
cashFlowEquivalentSwap(ResolvedSwap swap,
RatesProvider ratesProvider)
Computes cash flow equivalent of swap.
|
static List<Payment> |
normalize(List<Payment> input)
Generate a new payment list with the dates sorted and the amounts of elements with same payment date compressed.
|
static Map<Payment,PointSensitivityBuilder> |
normalize(Map<Payment,PointSensitivityBuilder> input)
Generate a new map with each payment date unique and the amounts and sensitivities of elements
with same payment date compressed.
|
static List<Payment> |
normalize(ResolvedSwapLeg input)
Extract the payments from the
NotionalExchange in the SwapLeg. |
public static ResolvedSwapLeg cashFlowEquivalentSwap(ResolvedSwap swap, RatesProvider ratesProvider)
The swap should be a fix-for-Ibor swap without compounding, and its swap legs
should not involve PaymentEvent.
The return type is ResolvedSwapLeg in which individual payments are
represented in terms of NotionalExchange.
swap - the swap productratesProvider - the rates providerpublic static ResolvedSwapLeg cashFlowEquivalentIborLeg(ResolvedSwapLeg iborLeg, RatesProvider ratesProvider)
The return type is ResolvedSwapLeg in which individual payments are
represented in terms of NotionalExchange.
iborLeg - the Ibor legratesProvider - the rates providerpublic static ResolvedSwapLeg cashFlowEquivalentFixedLeg(ResolvedSwapLeg fixedLeg, RatesProvider ratesProvider)
The return type is ResolvedSwapLeg in which individual payments are
represented in terms of NotionalExchange.
fixedLeg - the fixed legratesProvider - the rates providerpublic static ResolvedSwapLeg cashFlowEquivalentOnLeg(ResolvedSwapLeg onLeg, RatesProvider multicurve)
Each payment period should contain one accrual period of type OvernightCompoundedRateComputation.
When the payment date is not equal to the end composition date, the start and end cashflow equivalent are
adjusted by the ratio of discount factors between the payment date and the end date.
The return type is ResolvedSwapLeg in which individual payments are
represented in terms of NotionalExchange.
onLeg - the overnight legmulticurve - the multi-curve rates providerpublic static ImmutableMap<Payment,PointSensitivityBuilder> cashFlowEquivalentAndSensitivitySwap(ResolvedSwap swap, RatesProvider ratesProvider)
The swap should be a fix-for-Ibor swap without compounding, and its swap legs should not involve PaymentEvent.
The return type is a map of NotionalExchange and PointSensitivityBuilder.
swap - the swap productratesProvider - the rates providerpublic static ImmutableMap<Payment,PointSensitivityBuilder> cashFlowEquivalentAndSensitivityIborLeg(ResolvedSwapLeg iborLeg, RatesProvider ratesProvider)
The return type is a map of NotionalExchange and PointSensitivityBuilder.
iborLeg - the Ibor legratesProvider - the rates providerpublic static ImmutableMap<Payment,PointSensitivityBuilder> cashFlowEquivalentAndSensitivityFixedLeg(ResolvedSwapLeg fixedLeg, RatesProvider ratesProvider)
The return type is a map of NotionalExchange and PointSensitivityBuilder.
fixedLeg - the fixed legratesProvider - the rates providerpublic static ImmutableMap<Payment,PointSensitivityBuilder> cashFlowEquivalentAndSensitivityOnLeg(ResolvedSwapLeg onLeg, RatesProvider multicurve)
Each payment period should contain one accrual period of type OvernightCompoundedRateComputation.
When the payment date is not equal to the end composition date, the start and end cashflow equivalent are
adjusted by the ratio of discount factors between the payment date and the end date.
The return type is a map of NotionalExchange and PointSensitivityBuilder.
onLeg - the overnight legmulticurve - the multi-curve rates providerpublic static List<Payment> normalize(ResolvedSwapLeg input)
NotionalExchange in the SwapLeg.
Generate a list with the dates sorted and the amounts of elements with same payment date compressed.
The original SwapLeg is unchanged.
input - the starting swap legpublic static List<Payment> normalize(List<Payment> input)
The original list is unchanged.
input - the starting listpublic static Map<Payment,PointSensitivityBuilder> normalize(Map<Payment,PointSensitivityBuilder> input)
The original map is unchanged.
input - the starting mapCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.