public class DiscountingFraProductPricer extends Object
This provides the ability to price ResolvedFra.
The product is priced using a forward curve for the index.
| Modifier and Type | Field and Description |
|---|---|
static DiscountingFraProductPricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingFraProductPricer(RateComputationFn<RateComputation> rateComputationFn)
Creates an instance.
|
| Modifier and Type | Method and Description |
|---|---|
CashFlows |
cashFlows(ResolvedFra fra,
RatesProvider provider)
Calculates the future cash flow of the FRA product.
|
ExplainMap |
explainPresentValue(ResolvedFra fra,
RatesProvider provider)
Explains the present value of the FRA product.
|
CurrencyAmount |
forecastValue(ResolvedFra fra,
RatesProvider provider)
Calculates the forecast value of the FRA product.
|
PointSensitivities |
forecastValueSensitivity(ResolvedFra fra,
RatesProvider provider)
Calculates the forecast value sensitivity of the FRA product.
|
double |
parRate(ResolvedFra fra,
RatesProvider provider)
Calculates the par rate of the FRA product.
|
PointSensitivities |
parRateSensitivity(ResolvedFra fra,
RatesProvider provider)
Calculates the par rate curve sensitivity of the FRA product.
|
double |
parSpread(ResolvedFra fra,
RatesProvider provider)
Calculates the par spread of the FRA product.
|
PointSensitivities |
parSpreadSensitivity(ResolvedFra fra,
RatesProvider provider)
Calculates the par spread curve sensitivity of the FRA product.
|
CurrencyAmount |
presentValue(ResolvedFra fra,
RatesProvider provider)
Calculates the present value of the FRA product.
|
PointSensitivities |
presentValueSensitivity(ResolvedFra fra,
RatesProvider provider)
Calculates the present value sensitivity of the FRA product.
|
public static final DiscountingFraProductPricer DEFAULT
public DiscountingFraProductPricer(RateComputationFn<RateComputation> rateComputationFn)
rateComputationFn - the rate computation functionpublic CurrencyAmount presentValue(ResolvedFra fra, RatesProvider provider)
The present value of the product is the value on the valuation date. This is the discounted forecast value.
fra - the productprovider - the rates providerpublic PointSensitivities presentValueSensitivity(ResolvedFra fra, RatesProvider provider)
The present value sensitivity of the product is the sensitivity of the present value to the underlying curves.
fra - the productprovider - the rates providerpublic CurrencyAmount forecastValue(ResolvedFra fra, RatesProvider provider)
The forecast value of the product is the value on the valuation date without present value discounting.
fra - the productprovider - the rates providerpublic PointSensitivities forecastValueSensitivity(ResolvedFra fra, RatesProvider provider)
The forecast value sensitivity of the product is the sensitivity of the forecast value to the underlying curves.
fra - the productprovider - the rates providerpublic double parRate(ResolvedFra fra, RatesProvider provider)
The par rate is the rate for which the FRA present value is 0.
fra - the productprovider - the rates providerpublic PointSensitivities parRateSensitivity(ResolvedFra fra, RatesProvider provider)
The par rate curve sensitivity of the product is the sensitivity of the par rate to the underlying curves.
fra - the productprovider - the rates providerpublic double parSpread(ResolvedFra fra, RatesProvider provider)
This is spread to be added to the fixed rate to have a present value of 0.
fra - the productprovider - the rates providerpublic PointSensitivities parSpreadSensitivity(ResolvedFra fra, RatesProvider provider)
The par spread curve sensitivity of the product is the sensitivity of the par spread to the underlying curves.
fra - the productprovider - the rates providerpublic CashFlows cashFlows(ResolvedFra fra, RatesProvider provider)
There is only one cash flow on the payment date for the FRA product.
The expected currency amount of the cash flow is the same as forecastValue(ResolvedFra, RatesProvider).
fra - the productprovider - the rates providerpublic ExplainMap explainPresentValue(ResolvedFra fra, RatesProvider provider)
This returns explanatory information about the calculation.
fra - the FRA product for which present value should be computedprovider - the rates providerCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.