Class ResolvedBill
- java.lang.Object
-
- com.opengamma.strata.product.bond.ResolvedBill
-
- All Implemented Interfaces:
ResolvedProduct
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class ResolvedBill extends Object implements ResolvedProduct, org.joda.beans.ImmutableBean, Serializable
A bill, resolved for pricing.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ResolvedBill.Builder
The bean-builder forResolvedBill
.static class
ResolvedBill.Meta
The meta-bean forResolvedBill
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ResolvedBill.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
Currency
getCurrency()
Returns the currency of the bill.DayCount
getDayCount()
Gets the day count convention applicable.LegalEntityId
getLegalEntityId()
Gets the legal entity identifier.Payment
getNotional()
Gets the notional payment of the bill notional, the amount must be positive.SecurityId
getSecurityId()
Gets the security identifier.DaysAdjustment
getSettlementDateOffset()
Gets the number of days between valuation date and settlement date.BillYieldConvention
getYieldConvention()
Gets yield convention.int
hashCode()
static ResolvedBill.Meta
meta()
The meta-bean forResolvedBill
.ResolvedBill.Meta
metaBean()
double
priceFromYield(double yield, LocalDate settlementDate)
Computes the price from the yield at a given settlement date.ResolvedBill.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
double
yieldFromPrice(double price, LocalDate settlementDate)
Computes the yield from the price at a given settlement date.
-
-
-
Method Detail
-
getCurrency
public Currency getCurrency()
Returns the currency of the bill.- Returns:
- the currency
-
priceFromYield
public double priceFromYield(double yield, LocalDate settlementDate)
Computes the price from the yield at a given settlement date.- Parameters:
yield
- the yieldsettlementDate
- the settlement date- Returns:
- the price
-
yieldFromPrice
public double yieldFromPrice(double price, LocalDate settlementDate)
Computes the yield from the price at a given settlement date.- Parameters:
price
- the pricesettlementDate
- the settlement date- Returns:
- the yield
-
meta
public static ResolvedBill.Meta meta()
The meta-bean forResolvedBill
.- Returns:
- the meta-bean, not null
-
builder
public static ResolvedBill.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public ResolvedBill.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getSecurityId
public SecurityId getSecurityId()
Gets the security identifier.This identifier uniquely identifies the security within the system.
- Returns:
- the value of the property, not null
-
getNotional
public Payment getNotional()
Gets the notional payment of the bill notional, the amount must be positive.- Returns:
- the value of the property, not null
-
getDayCount
public DayCount getDayCount()
Gets the day count convention applicable.The conversion from dates to a numerical value is made based on this day count.
- Returns:
- the value of the property, not null
-
getYieldConvention
public BillYieldConvention getYieldConvention()
Gets yield convention.The convention defines how to convert from yield to price and inversely.
- Returns:
- the value of the property, not null
-
getLegalEntityId
public LegalEntityId getLegalEntityId()
Gets the legal entity identifier.This identifier is used for the legal entity that issues the bill.
- Returns:
- the value of the property, not null
-
getSettlementDateOffset
public DaysAdjustment getSettlementDateOffset()
Gets the number of days between valuation date and settlement date.It is usually one business day for US and UK bills and two days for Euroland government bills.
- Returns:
- the value of the property, not null
-
toBuilder
public ResolvedBill.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-