public final class ResolvedCapitalIndexedBond extends Object implements ResolvedProduct, org.joda.beans.ImmutableBean, Serializable
This is the resolved form of CapitalIndexedBond and is an input to the pricers.
Applications will typically create a ResolvedCapitalIndexedBond from a CapitalIndexedBond
using CapitalIndexedBond.resolve(ReferenceData).
The periodic coupon payments are defined in periodicPayments,
whereas nominalPayment separately represents the nominal payments.
The legal entity of this bond is identified by legalEntityId.
The enum, yieldConvention, specifies the yield computation convention.
The accrued interest must be computed with dayCount.
A ResolvedCapitalIndexedBond is bound to data that changes over time, such as holiday calendars.
If the data changes, such as the addition of a new holiday, the resolved form will not be updated.
Care must be taken when placing the resolved form in a cache or persistence layer.
| Modifier and Type | Class and Description |
|---|---|
static class |
ResolvedCapitalIndexedBond.Builder
The bean-builder for
ResolvedCapitalIndexedBond. |
static class |
ResolvedCapitalIndexedBond.Meta
The meta-bean for
ResolvedCapitalIndexedBond. |
| Modifier and Type | Method and Description |
|---|---|
double |
accruedInterest(LocalDate referenceDate)
Calculates the accrued interest of the bond with the specified date.
|
static ResolvedCapitalIndexedBond.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
LocalDate |
calculateSettlementDateFromValuation(LocalDate valuationDate,
ReferenceData refData)
Calculates the settlement date from the valuation date.
|
boolean |
equals(Object obj) |
Optional<CapitalIndexedBondPaymentPeriod> |
findPeriod(LocalDate date)
Finds the period that contains the specified date.
|
OptionalInt |
findPeriodIndex(LocalDate date)
Finds the period that contains the specified date.
|
Currency |
getCurrency()
Gets the currency of the product.
|
DayCount |
getDayCount()
Gets the day count convention applicable.
|
LocalDate |
getEndDate()
Gets the end date of the product.
|
double |
getFirstIndexValue()
Gets the first index value
|
Frequency |
getFrequency()
Gets the frequency of the bond payments.
|
LegalEntityId |
getLegalEntityId()
Gets the legal entity identifier.
|
CapitalIndexedBondPaymentPeriod |
getNominalPayment()
Gets the nominal payment of the product.
|
double |
getNotional()
Gets the notional amount, must be positive.
|
ImmutableList<CapitalIndexedBondPaymentPeriod> |
getPeriodicPayments()
Gets the periodic payments of the product.
|
InflationRateCalculation |
getRateCalculation()
Gets the inflation rate calculation.
|
RollConvention |
getRollConvention()
Gets the roll convention of the bond payments.
|
SecurityId |
getSecurityId()
Gets the security identifier.
|
DaysAdjustment |
getSettlementDateOffset()
Gets the number of days between valuation date and settlement date.
|
LocalDate |
getStartDate()
Gets the start date of the product.
|
LocalDate |
getUnadjustedEndDate()
The unadjusted end date.
|
LocalDate |
getUnadjustedStartDate()
The unadjusted start date.
|
CapitalIndexedBondYieldConvention |
getYieldConvention()
Gets yield convention.
|
boolean |
hasExCouponPeriod()
Checks if there is an ex-coupon period.
|
int |
hashCode() |
static ResolvedCapitalIndexedBond.Meta |
meta()
The meta-bean for
ResolvedCapitalIndexedBond. |
ResolvedCapitalIndexedBond.Meta |
metaBean() |
ResolvedCapitalIndexedBond.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
double |
yearFraction(LocalDate startDate,
LocalDate endDate)
Calculates the year fraction within the specified period.
|
double |
yearFraction(LocalDate startDate,
LocalDate endDate,
DayCount dayCount)
Calculates the year fraction within the specified period and day count.
|
public LocalDate getStartDate()
This is the first coupon period date of the bond, often known as the effective date. This date has been adjusted to be a valid business day.
public LocalDate getEndDate()
This is the last coupon period date of the bond, often known as the maturity date. This date has been adjusted to be a valid business day.
public LocalDate getUnadjustedStartDate()
This is the unadjusted first coupon period date of the bond.
public LocalDate getUnadjustedEndDate()
This is the unadjusted last coupon period date of the bond.
public Currency getCurrency()
All payments in the bond will have this currency.
public double getNotional()
The notional expressed here must be positive.
The currency of the notional is specified by getCurrency().
public boolean hasExCouponPeriod()
public double getFirstIndexValue()
This is the price index value at the start of the bond.
public Optional<CapitalIndexedBondPaymentPeriod> findPeriod(LocalDate date)
The search is performed using unadjusted dates.
date - the date to find the period forIllegalArgumentException - if more than one period matchespublic OptionalInt findPeriodIndex(LocalDate date)
The search is performed using unadjusted dates.
date - the date to find the period forIllegalArgumentException - if more than one period matchespublic double yearFraction(LocalDate startDate, LocalDate endDate)
Year fractions on bonds are calculated on unadjusted dates.
startDate - the start dateendDate - the end dateIllegalArgumentException - if the dates are outside the range of the bond or start is after endpublic double yearFraction(LocalDate startDate, LocalDate endDate, DayCount dayCount)
Year fractions on bonds are calculated on unadjusted dates.
startDate - the start dateendDate - the end datedayCount - the day countIllegalArgumentException - if the dates are outside the range of the bond or start is after endpublic LocalDate calculateSettlementDateFromValuation(LocalDate valuationDate, ReferenceData refData)
valuationDate - the valuation daterefData - the reference data to usepublic double accruedInterest(LocalDate referenceDate)
referenceDate - the reference datepublic static ResolvedCapitalIndexedBond.Meta meta()
ResolvedCapitalIndexedBond.public static ResolvedCapitalIndexedBond.Builder builder()
public ResolvedCapitalIndexedBond.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic SecurityId getSecurityId()
This identifier uniquely identifies the security within the system.
public CapitalIndexedBondPaymentPeriod getNominalPayment()
The payment date of the nominal payment agrees with the final coupon payment date of the periodic payments.
public ImmutableList<CapitalIndexedBondPaymentPeriod> getPeriodicPayments()
Each payment period represents part of the life-time of the product. The start date and end date of the leg are determined from the first and last period. As such, the periods should be sorted.
public Frequency getFrequency()
This must match the frequency used to generate the payment schedule.
public RollConvention getRollConvention()
This must match the convention used to generate the payment schedule.
public DayCount getDayCount()
The conversion from dates to a numerical value is made based on this day count. For the inflation-indexed bond, the day count convention is used to compute accrued interest.
public CapitalIndexedBondYieldConvention getYieldConvention()
The convention defines how to convert from yield to price and inversely.
public LegalEntityId getLegalEntityId()
This identifier is used for the legal entity that issues the bond.
public DaysAdjustment getSettlementDateOffset()
This is used to compute clean price. The clean price is the relative price to be paid at the standard settlement date in exchange for the bond.
public InflationRateCalculation getRateCalculation()
The reference index is interpolated index or monthly index.
Real coupons are represented by gearing in the calculation.
The price index value at the start of the bond is represented by firstIndexValue in the calculation.
public ResolvedCapitalIndexedBond.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.