public class DiscountingFraTradePricer extends Object
This provides the ability to price ResolvedFraTrade.
The trade is priced by pricing the underlying product using a forward curve for the index.
| Modifier and Type | Field and Description |
|---|---|
static DiscountingFraTradePricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingFraTradePricer(DiscountingFraProductPricer productPricer)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
CashFlows |
cashFlows(ResolvedFraTrade trade,
RatesProvider provider)
Calculates the future cash flow of the FRA trade.
|
MultiCurrencyAmount |
currencyExposure(ResolvedFraTrade trade,
RatesProvider provider)
Calculates the currency exposure of the FRA trade.
|
CurrencyAmount |
currentCash(ResolvedFraTrade trade,
RatesProvider provider)
Calculates the current cash of the FRA trade.
|
ExplainMap |
explainPresentValue(ResolvedFraTrade trade,
RatesProvider provider)
Explains the present value of the FRA product.
|
CurrencyAmount |
forecastValue(ResolvedFraTrade trade,
RatesProvider provider)
Calculates the forecast value of the FRA trade.
|
PointSensitivities |
forecastValueSensitivity(ResolvedFraTrade trade,
RatesProvider provider)
Calculates the forecast value sensitivity of the FRA trade.
|
DiscountingFraProductPricer |
getProductPricer()
Gets the underlying product pricer.
|
double |
parRate(ResolvedFraTrade trade,
RatesProvider provider)
Calculates the par rate of the FRA trade.
|
PointSensitivities |
parRateSensitivity(ResolvedFraTrade trade,
RatesProvider provider)
Calculates the par rate curve sensitivity of the FRA trade.
|
double |
parSpread(ResolvedFraTrade trade,
RatesProvider provider)
Calculates the par spread of the FRA trade.
|
PointSensitivities |
parSpreadSensitivity(ResolvedFraTrade trade,
RatesProvider provider)
Calculates the par spread curve sensitivity of the FRA trade.
|
CurrencyAmount |
presentValue(ResolvedFraTrade trade,
RatesProvider provider)
Calculates the present value of the FRA trade.
|
PointSensitivities |
presentValueSensitivity(ResolvedFraTrade trade,
RatesProvider provider)
Calculates the present value sensitivity of the FRA trade.
|
public static final DiscountingFraTradePricer DEFAULT
public DiscountingFraTradePricer(DiscountingFraProductPricer productPricer)
productPricer - the pricer for ResolvedFrapublic DiscountingFraProductPricer getProductPricer()
public CurrencyAmount presentValue(ResolvedFraTrade trade, RatesProvider provider)
The present value of the trade is the value on the valuation date. This is the discounted forecast value.
trade - the tradeprovider - the rates providerpublic ExplainMap explainPresentValue(ResolvedFraTrade trade, RatesProvider provider)
This returns explanatory information about the calculation.
trade - the tradeprovider - the rates providerpublic PointSensitivities presentValueSensitivity(ResolvedFraTrade 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 CurrencyAmount forecastValue(ResolvedFraTrade trade, RatesProvider provider)
The forecast value of the trade is the value on the valuation date without present value discounting.
trade - the tradeprovider - the rates providerpublic PointSensitivities forecastValueSensitivity(ResolvedFraTrade trade, RatesProvider provider)
The forecast value sensitivity of the product is the sensitivity of the forecast value to the underlying curves.
trade - the tradeprovider - the rates providerpublic double parRate(ResolvedFraTrade trade, RatesProvider provider)
The par rate is the rate for which the FRA present value is 0.
trade - the tradeprovider - the rates providerpublic PointSensitivities parRateSensitivity(ResolvedFraTrade trade, RatesProvider provider)
The par rate curve sensitivity of the product is the sensitivity of the par rate to the underlying curves.
trade - the tradeprovider - the rates providerpublic double parSpread(ResolvedFraTrade trade, RatesProvider provider)
This is spread to be added to the fixed rate to have a present value of 0.
trade - the tradeprovider - the rates providerpublic PointSensitivities parSpreadSensitivity(ResolvedFraTrade trade, RatesProvider provider)
The par spread curve sensitivity of the product is the sensitivity of the par spread to the underlying curves.
trade - the tradeprovider - the rates providerpublic CashFlows cashFlows(ResolvedFraTrade trade, RatesProvider provider)
There is only one cash flow on the payment date for the FRA trade.
The expected currency amount of the cash flow is the same as forecastValue(ResolvedFraTrade, RatesProvider).
trade - the tradeprovider - the rates providerpublic MultiCurrencyAmount currencyExposure(ResolvedFraTrade trade, RatesProvider provider)
trade - the tradeprovider - the rates providerpublic CurrencyAmount currentCash(ResolvedFraTrade 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.