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