Class DiscountingBillProductPricer

• java.lang.Object
• com.opengamma.strata.pricer.bond.DiscountingBillProductPricer

• public class DiscountingBillProductPricer
extends Object
Pricer for bill products.

This function provides the ability to price a ResolvedBill.

• Field Summary

Fields
Modifier and Type Field Description
static DiscountingBillProductPricer DEFAULT
Default implementation.
• Constructor Summary

Constructors
Constructor Description
DiscountingBillProductPricer()
• Method Summary

All Methods
Modifier and Type Method 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.
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.
• Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• Field Detail

• DEFAULT

public static final DiscountingBillProductPricer DEFAULT
Default implementation.
• Constructor Detail

• DiscountingBillProductPricer

public DiscountingBillProductPricer()
• Method Detail

• presentValue

public CurrencyAmount presentValue​(ResolvedBill bill,
LegalEntityDiscountingProvider provider)
Calculates the present value of the bill product.

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.

Parameters:
bill - the product
provider - the discounting provider
Returns:
the present value of the bill product

public CurrencyAmount presentValueWithZSpread​(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value of a bill product with z-spread.

The z-spread is a parallel shift applied to continuously compounded rates or periodic compounded rates of the issuer discounting curve.

Parameters:
bill - the product
provider - the discounting provider
zSpread - the z-spread
compoundedRateType - the compounded rate type
periodsPerYear - the number of periods per year
Returns:
the present value of the bill product
• presentValueSensitivity

public PointSensitivities presentValueSensitivity​(ResolvedBill bill,
LegalEntityDiscountingProvider provider)
Calculates the present value sensitivity of the bill product.

The present value sensitivity of the product is the sensitivity of the present value to the underlying curves.

Parameters:
bill - the product
provider - the discounting provider
Returns:
the present value curve sensitivity of the product

public PointSensitivities presentValueSensitivityWithZSpread​(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the present value sensitivity of the bill product with z-spread.

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.

Parameters:
bill - the product
provider - the discounting provider
zSpread - the z-spread
compoundedRateType - the compounded rate type
periodsPerYear - the number of periods per year
Returns:
the present value curve sensitivity of the product
• priceFromCurves

public double priceFromCurves​(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
LocalDate settlementDate)
Calculates the price for settlement at a given settlement date using curves.
Parameters:
bill - the bill
provider - the discounting provider
settlementDate - the settlement date
Returns:
the price

public double priceFromCurvesWithZSpread​(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
LocalDate settlementDate,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the price for settlement at a given settlement date using curves with z-spread.

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.

Parameters:
bill - the bill
provider - the discounting provider
settlementDate - the settlement date
zSpread - the z-spread
compoundedRateType - the compounded rate type
periodsPerYear - the number of periods per year
Returns:
the price
• yieldFromCurves

public double yieldFromCurves​(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
LocalDate settlementDate)
Calculates the yield for settlement at a given settlement date using curves.
Parameters:
bill - the bill
provider - the discounting provider
settlementDate - the settlement date
Returns:
the yield

public double yieldFromCurvesWithZSpread​(ResolvedBill bill,
LegalEntityDiscountingProvider provider,
LocalDate settlementDate,
CompoundedRateType compoundedRateType,
int periodsPerYear)
Calculates the yield for settlement at a given settlement date using curves with z-spread.

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.

Parameters:
bill - the bill
provider - the discounting provider
settlementDate - the settlement date
zSpread - the z-spread
compoundedRateType - the compounded rate type
periodsPerYear - the number of periods per year
Returns:
the yield