## Class ResolvedFixedCouponBond

• java.lang.Object
• com.opengamma.strata.product.bond.ResolvedFixedCouponBond
• All Implemented Interfaces:
ResolvedProduct, java.io.Serializable, Bean, ImmutableBean

public final class ResolvedFixedCouponBond
extends java.lang.Object
implements ResolvedProduct, ImmutableBean, java.io.Serializable
A fixed coupon bond, resolved for pricing.

This is the resolved form of FixedCouponBond and is an input to the pricers. Applications will typically create a ResolvedFixedCouponBond from a FixedCouponBond using FixedCouponBond.resolve(ReferenceData).

The list of FixedCouponBondPaymentPeriod represents the periodic coupon payments, whereas the nominal payment is defined by Payment.

The legal entity of this fixed coupon bond is identified by StandardId. The enum, FixedCouponBondYieldConvention, specifies the yield computation convention.

A ResolvedFixedCouponBond 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.

#### Price

Strata uses decimal prices for bonds in the trade model, pricers and market data. For example, a price of 99.32% is represented in Strata by 0.9932.
Serialized Form
• ### Nested Class Summary

Nested Classes
Modifier and Type Class Description
static class  ResolvedFixedCouponBond.Builder
The bean-builder for ResolvedFixedCouponBond.
static class  ResolvedFixedCouponBond.Meta
The meta-bean for ResolvedFixedCouponBond.
• ### Method Summary

All Methods
Modifier and Type Method Description
static ResolvedFixedCouponBond.Builder builder()
Returns a builder used to create an instance of the bean.
boolean equals​(java.lang.Object obj)
java.util.Optional<FixedCouponBondPaymentPeriod> findPeriod​(java.time.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.
java.time.LocalDate getEndDate()
Gets the end date of the product.
double getFixedRate()
Gets the fixed coupon rate.
Frequency getFrequency()
Gets the frequency of the bond payments.
LegalEntityId getLegalEntityId()
Gets the legal entity identifier.
Payment getNominalPayment()
Gets the nominal payment of the product.
double getNotional()
Gets the notional amount, must be positive.
com.google.common.collect.ImmutableList<FixedCouponBondPaymentPeriod> getPeriodicPayments()
Gets the periodic payments of the product.
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.
java.time.LocalDate getStartDate()
Gets the start date of the product.
java.time.LocalDate getUnadjustedEndDate()
java.time.LocalDate getUnadjustedStartDate()
FixedCouponBondYieldConvention getYieldConvention()
Gets yield convention.
boolean hasExCouponPeriod()
Checks if there is an ex-coupon period.
int hashCode()
static ResolvedFixedCouponBond.Meta meta()
The meta-bean for ResolvedFixedCouponBond.
ResolvedFixedCouponBond.Meta metaBean()
ResolvedFixedCouponBond.Builder toBuilder()
Returns a builder that allows this bean to be mutated.
java.lang.String toString()
double yearFraction​(java.time.LocalDate startDate, java.time.LocalDate endDate)
Calculates the year fraction within the specified period.
• ### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• ### Methods inherited from interface org.joda.beans.Bean

property, propertyNames
• ### Method Detail

• #### getStartDate

public java.time.LocalDate getStartDate()
Gets the start date of the product.

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.

Returns:
the start date
• #### getEndDate

public java.time.LocalDate getEndDate()
Gets the end date of the product.

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.

Returns:
the end date

public java.time.LocalDate getUnadjustedStartDate()

This is the unadjusted first coupon period date of the bond.

Returns:

public java.time.LocalDate getUnadjustedEndDate()

This is the unadjusted last coupon period date of the bond.

Returns:
• #### getCurrency

public Currency getCurrency()
Gets the currency of the product.

All payments in the bond will have this currency.

Returns:
the currency
• #### getNotional

public double getNotional()
Gets the notional amount, must be positive.

The notional expressed here must be positive. The currency of the notional is specified by getCurrency().

Returns:
the notional amount
• #### hasExCouponPeriod

public boolean hasExCouponPeriod()
Checks if there is an ex-coupon period.
Returns:
true if has an ex-coupon period
• #### findPeriod

public java.util.Optional<FixedCouponBondPaymentPeriod> findPeriod​(java.time.LocalDate date)
Finds the period that contains the specified date.

The search is performed using unadjusted dates.

Parameters:
date - the date to find the period for
Returns:
Throws:
java.lang.IllegalArgumentException - if more than one period matches
• #### yearFraction

public double yearFraction​(java.time.LocalDate startDate,
java.time.LocalDate endDate)
Calculates the year fraction within the specified period.

Year fractions on bonds are calculated on unadjusted dates.

Parameters:
startDate - the start date
endDate - the end date
Returns:
the year fraction
Throws:
java.lang.IllegalArgumentException - if the dates are outside the range of the bond or start is after end
• #### meta

public static ResolvedFixedCouponBond.Meta meta()
The meta-bean for ResolvedFixedCouponBond.
Returns:
the meta-bean, not null
• #### builder

public static ResolvedFixedCouponBond.Builder builder()
Returns a builder used to create an instance of the bean.
Returns:
the builder, not null
• #### metaBean

public ResolvedFixedCouponBond.Meta metaBean()
Specified by:
metaBean in interface 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
• #### getNominalPayment

public Payment getNominalPayment()
Gets the nominal payment of the product.

The payment date of the nominal payment agrees with the final coupon payment date of the periodic payments.

Returns:
the value of the property, not null
• #### getPeriodicPayments

public com.google.common.collect.ImmutableList<FixedCouponBondPaymentPeriod> getPeriodicPayments()
Gets the periodic payments of the product.

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.

Returns:
the value of the property, not null
• #### getFrequency

public Frequency getFrequency()
Gets the frequency of the bond payments.

This must match the frequency used to generate the payment schedule.

Returns:
the value of the property, not null
• #### getRollConvention

public RollConvention getRollConvention()
Gets the roll convention of the bond payments.

This must match the convention used to generate the payment schedule.

Returns:
the value of the property, not null
• #### getFixedRate

public double getFixedRate()
Gets the fixed coupon rate.

The periodic payments are based on this fixed coupon rate.

Returns:
the value of the property
• #### 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. For the fixed bond, the day count convention is used to compute accrued interest.

Note that the year fraction of a coupon payment is computed based on the unadjusted dates in the schedule.

Returns:
the value of the property, not null
• #### getYieldConvention

public FixedCouponBondYieldConvention 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 bond.

Returns:
the value of the property, not null
• #### getSettlementDateOffset

public DaysAdjustment getSettlementDateOffset()
Gets the number of days between valuation date and settlement date.

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.

It is usually one business day for US treasuries and UK Gilts and three days for Euroland government bonds.

Returns:
the value of the property, not null
• #### toBuilder

public ResolvedFixedCouponBond.Builder toBuilder()
Returns a builder that allows this bean to be mutated.
Returns:
the mutable builder, not null
• #### equals

public boolean equals​(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
• #### hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object
• #### toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object