Class DiscountingPaymentPricer
 java.lang.Object

 com.opengamma.strata.pricer.DiscountingPaymentPricer


Field Summary
Fields Modifier and Type Field Description static DiscountingPaymentPricer
DEFAULT
Default implementation.

Constructor Summary
Constructors Constructor Description DiscountingPaymentPricer()
Creates an instance.

Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CashFlows
cashFlows(Payment payment, BaseProvider provider)
Calculates the future cash flow of the payment.MultiCurrencyAmount
currencyExposure(Payment payment, BaseProvider provider)
Calculates the currency exposure.CurrencyAmount
currentCash(Payment payment, BaseProvider provider)
Calculates the current cash.ExplainMap
explainPresentValue(Payment payment, BaseProvider provider)
Explains the present value of the payment.CurrencyAmount
forecastValue(Payment payment, BaseProvider provider)
Computes the forecast value of the payment.double
forecastValueAmount(Payment payment, BaseProvider provider)
Computes the forecast value of the payment.CurrencyAmount
presentValue(Payment payment, BaseProvider provider)
Computes the present value of the payment by discounting.CurrencyAmount
presentValue(Payment payment, DiscountFactors discountFactors)
Computes the present value of the payment by discounting.double
presentValueAmount(Payment payment, BaseProvider provider)
Computes the present value of the payment by discounting.PointSensitivityBuilder
presentValueSensitivity(Payment payment, BaseProvider provider)
Compute the present value curve sensitivity of the payment.PointSensitivityBuilder
presentValueSensitivity(Payment payment, DiscountFactors discountFactors)
Compute the present value curve sensitivity of the payment.PointSensitivityBuilder
presentValueSensitivityWithSpread(Payment payment, DiscountFactors discountFactors, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Compute the present value curve sensitivity of the payment with zspread.CurrencyAmount
presentValueWithSpread(Payment payment, DiscountFactors discountFactors, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Computes the present value of the payment with zspread by discounting.



Field Detail

DEFAULT
public static final DiscountingPaymentPricer DEFAULT
Default implementation.


Method Detail

presentValue
public CurrencyAmount presentValue(Payment payment, BaseProvider provider)
Computes the present value of the payment by discounting.The present value is zero if the payment date is before the valuation date.
 Parameters:
payment
 the paymentprovider
 the provider Returns:
 the present value

presentValue
public CurrencyAmount presentValue(Payment payment, DiscountFactors discountFactors)
Computes the present value of the payment by discounting.The present value is zero if the payment date is before the valuation date.
The specified discount factors should be for the payment currency, however this is not validated.
 Parameters:
payment
 the paymentdiscountFactors
 the discount factors to price against Returns:
 the present value

presentValueAmount
public double presentValueAmount(Payment payment, BaseProvider provider)
Computes the present value of the payment by discounting.The present value is zero if the payment date is before the valuation date.
 Parameters:
payment
 the paymentprovider
 the provider Returns:
 the present value

presentValueWithSpread
public CurrencyAmount presentValueWithSpread(Payment payment, DiscountFactors discountFactors, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Computes the present value of the payment with zspread by discounting.The present value is zero if the payment date is before the valuation date.
The specified discount factors should be for the payment currency, however this is not validated.
The zspread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the discounting curve.
 Parameters:
payment
 the paymentdiscountFactors
 the discount factors to price againstzSpread
 the zspreadcompoundedRateType
 the compounded rate typeperiodsPerYear
 the number of periods per year Returns:
 the present value

explainPresentValue
public ExplainMap explainPresentValue(Payment payment, BaseProvider provider)
Explains the present value of the payment.This returns explanatory information about the calculation.
 Parameters:
payment
 the paymentprovider
 the provider Returns:
 the explanatory information

presentValueSensitivity
public PointSensitivityBuilder presentValueSensitivity(Payment payment, BaseProvider provider)
Compute the present value curve sensitivity of the payment.The present value sensitivity of the payment is the sensitivity of the present value to the discount factor curve. There is no sensitivity if the payment date is before the valuation date.
 Parameters:
payment
 the paymentprovider
 the provider Returns:
 the point sensitivity of the present value

presentValueSensitivity
public PointSensitivityBuilder presentValueSensitivity(Payment payment, DiscountFactors discountFactors)
Compute the present value curve sensitivity of the payment.The present value sensitivity of the payment is the sensitivity of the present value to the discount factor curve. There is no sensitivity if the payment date is before the valuation date.
The specified discount factors should be for the payment currency, however this is not validated.
 Parameters:
payment
 the paymentdiscountFactors
 the discount factors to price against Returns:
 the point sensitivity of the present value

presentValueSensitivityWithSpread
public PointSensitivityBuilder presentValueSensitivityWithSpread(Payment payment, DiscountFactors discountFactors, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
Compute the present value curve sensitivity of the payment with zspread.The present value sensitivity of the payment is the sensitivity of the present value to the discount factor curve. There is no sensitivity if the payment date is before the valuation date.
The specified discount factors should be for the payment currency, however this is not validated.
The zspread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the discounting curve.
 Parameters:
payment
 the paymentdiscountFactors
 the discount factors to price againstzSpread
 the zspreadcompoundedRateType
 the compounded rate typeperiodsPerYear
 the number of periods per year Returns:
 the point sensitivity of the present value

forecastValue
public CurrencyAmount forecastValue(Payment payment, BaseProvider provider)
Computes the forecast value of the payment.The present value is zero if the payment date is before the valuation date.
 Parameters:
payment
 the paymentprovider
 the provider Returns:
 the forecast value

forecastValueAmount
public double forecastValueAmount(Payment payment, BaseProvider provider)
Computes the forecast value of the payment.The present value is zero if the payment date is before the valuation date.
 Parameters:
payment
 the paymentprovider
 the provider Returns:
 the forecast value

cashFlows
public CashFlows cashFlows(Payment payment, BaseProvider provider)
Calculates the future cash flow of the payment.The cash flow is returned, empty if the payment has already occurred.
 Parameters:
payment
 the paymentprovider
 the provider Returns:
 the cash flow, empty if the payment has occurred

currencyExposure
public MultiCurrencyAmount currencyExposure(Payment payment, BaseProvider provider)
Calculates the currency exposure. Parameters:
payment
 the paymentprovider
 the provider Returns:
 the currency exposure

currentCash
public CurrencyAmount currentCash(Payment payment, BaseProvider provider)
Calculates the current cash. Parameters:
payment
 the paymentprovider
 the provider Returns:
 the current cash

