public class DiscountingBillProductPricer extends Object
This function provides the ability to price a ResolvedBill.
| Modifier and Type | Field and Description |
|---|---|
static DiscountingBillProductPricer |
DEFAULT
Default implementation.
|
| Constructor and Description |
|---|
DiscountingBillProductPricer() |
| Modifier and Type | Method and Description |
|---|---|
CurrencyAmount |
presentValue(ResolvedBill bill,
LegalEntityDiscountingProvider provider)
Calculates the present value of the bill product.
|
PointSensitivities |
presentValueSensitivity(ResolvedBill bill,
LegalEntityDiscountingProvider provider)
Calculates the present value sensitivity of the bill product.
|
PointSensitivities |
presentValueSensitivityWithZSpread(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value sensitivity of the bill product with z-spread.
|
CurrencyAmount |
presentValueWithZSpread(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value of a bill product with z-spread.
|
double |
priceFromCurves(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
LocalDate settlementDate)
Calculates the price for settlement at a given settlement date using curves.
|
double |
priceFromCurvesWithZSpread(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
LocalDate settlementDate,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the price for settlement at a given settlement date using curves with z-spread.
|
PointSensitivityBuilder |
priceSensitivity(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
LocalDate settlementDate)
Calculates the price sensitivity for settlement at a given settlement date using curves.
|
double |
yieldFromCurves(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
LocalDate settlementDate)
Calculates the yield for settlement at a given settlement date using curves.
|
double |
yieldFromCurvesWithZSpread(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
LocalDate settlementDate,
double zSpread,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the yield for settlement at a given settlement date using curves with z-spread.
|
public static final DiscountingBillProductPricer DEFAULT
public CurrencyAmount presentValue(ResolvedBill bill, LegalEntityDiscountingProvider provider)
The present value of the product is the value on the valuation date. The result is expressed using the payment currency of the bill.
Coupon payments of the product are considered based on the valuation date.
bill - the productprovider - the discounting providerpublic CurrencyAmount presentValueWithZSpread(ResolvedBill bill, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve.
bill - the productprovider - the discounting providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic PointSensitivities presentValueSensitivity(ResolvedBill bill, LegalEntityDiscountingProvider provider)
The present value sensitivity of the product is the sensitivity of the present value to the underlying curves.
bill - the productprovider - the discounting providerpublic PointSensitivities presentValueSensitivityWithZSpread(ResolvedBill bill, LegalEntityDiscountingProvider provider, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
The present value sensitivity of the product is the sensitivity of the present value to the underlying curves.
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve.
bill - the productprovider - the discounting providerzSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic double priceFromCurves(ResolvedBill bill, LegalEntityDiscountingProvider provider, LocalDate settlementDate)
bill - the billprovider - the discounting providersettlementDate - the settlement datepublic double priceFromCurvesWithZSpread(ResolvedBill bill, LegalEntityDiscountingProvider provider, LocalDate settlementDate, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve.
The z-spread is applied only on the legal entity curve, not on the repo curve.
bill - the billprovider - the discounting providersettlementDate - the settlement datezSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic double yieldFromCurves(ResolvedBill bill, LegalEntityDiscountingProvider provider, LocalDate settlementDate)
bill - the billprovider - the discounting providersettlementDate - the settlement datepublic double yieldFromCurvesWithZSpread(ResolvedBill bill, LegalEntityDiscountingProvider provider, LocalDate settlementDate, double zSpread, CompoundedRateType compoundedRateType, int periodsPerYear)
The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve.
The z-spread is applied only on the legal entity curve, not on the repo curve.
bill - the billprovider - the discounting providersettlementDate - the settlement datezSpread - the z-spreadcompoundedRateType - the compounded rate typeperiodsPerYear - the number of periods per yearpublic PointSensitivityBuilder priceSensitivity(ResolvedBill bill, LegalEntityDiscountingProvider provider, LocalDate settlementDate)
The price sensitivity of the security is the sensitivity of the price to the underlying curves.
bill - the billprovider - the discounting providersettlementDate - the settlement dateCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.