public class DiscountingFxSwapProductPricer extends Object
This provides the ability to price an ResolvedFxSwap
.
Modifier and Type | Field and Description |
---|---|
static DiscountingFxSwapProductPricer |
DEFAULT
Default implementation.
|
Constructor and Description |
---|
DiscountingFxSwapProductPricer(DiscountingFxSingleProductPricer fxPricer)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
MultiCurrencyAmount |
currencyExposure(ResolvedFxSwap product,
RatesProvider provider)
Calculates the currency exposure of the FX swap product.
|
MultiCurrencyAmount |
currentCash(ResolvedFxSwap swap,
LocalDate valuationDate)
Calculates the current cash of the FX swap product.
|
double |
parSpread(ResolvedFxSwap swap,
RatesProvider provider)
Calculates the par spread.
|
PointSensitivities |
parSpreadSensitivity(ResolvedFxSwap swap,
RatesProvider provider)
Calculates the par spread sensitivity to the curves.
|
MultiCurrencyAmount |
presentValue(ResolvedFxSwap swap,
RatesProvider provider)
Calculates the present value of the FX swap product.
|
PointSensitivities |
presentValueSensitivity(ResolvedFxSwap swap,
RatesProvider provider)
Calculates the present value sensitivity of the FX swap product.
|
public static final DiscountingFxSwapProductPricer DEFAULT
public DiscountingFxSwapProductPricer(DiscountingFxSingleProductPricer fxPricer)
fxPricer
- the pricer for ResolvedFxSingle
public MultiCurrencyAmount presentValue(ResolvedFxSwap swap, RatesProvider provider)
This discounts each payment on each leg in its own currency.
swap
- the productprovider
- the rates providerpublic PointSensitivities presentValueSensitivity(ResolvedFxSwap swap, RatesProvider provider)
The present value sensitivity of the product is the sensitivity of the present value to the underlying curves.
swap
- the productprovider
- the rates providerpublic double parSpread(ResolvedFxSwap swap, RatesProvider provider)
The par spread is the spread that should be added to the FX forward points to have a zero value.
swap
- the productprovider
- the rates providerpublic PointSensitivities parSpreadSensitivity(ResolvedFxSwap swap, RatesProvider provider)
The sensitivity is reported in the counter currency of the product, but is actually dimensionless.
swap
- the productprovider
- the rates providerpublic MultiCurrencyAmount currencyExposure(ResolvedFxSwap product, RatesProvider provider)
This discounts each payment on each leg in its own currency.
product
- the productprovider
- the rates providerpublic MultiCurrencyAmount currentCash(ResolvedFxSwap swap, LocalDate valuationDate)
swap
- the productvaluationDate
- the valuation dateCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.