Class FixedCouponBondSecurity

  • All Implemented Interfaces:
    LegalEntitySecurity, Security, java.io.Serializable, Bean, ImmutableBean

    public final class FixedCouponBondSecurity
    extends java.lang.Object
    implements LegalEntitySecurity, ImmutableBean, java.io.Serializable
    A security representing a fixed coupon bond.

    A fixed coupon bond is a financial instrument that represents a stream of fixed payments.

    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.
    See Also:
    Serialized Form
    • Method Detail

      • getUnderlyingIds

        public com.google.common.collect.ImmutableSet<SecurityId> getUnderlyingIds()
        Description copied from interface: Security
        Gets the set of underlying security identifiers.

        The set must contain all the security identifiers that this security directly refers to. For example, a bond future will return the identifiers of the underlying basket of bonds, but a bond future option will only return the identifier of the underlying future, not the basket.

        Specified by:
        getUnderlyingIds in interface Security
        Returns:
        the underlying security identifiers
      • createProduct

        public FixedCouponBond createProduct​(ReferenceData refData)
        Description copied from interface: Security
        Creates the product associated with this security.

        The product of a security is distinct from the security. The product includes the financial details from this security, but excludes the additional information. The product also includes the products of any underlying securities.

        Specified by:
        createProduct in interface Security
        Parameters:
        refData - the reference data used to find underlying securities
        Returns:
        the product
      • createTrade

        public FixedCouponBondTrade createTrade​(TradeInfo info,
                                                double quantity,
                                                double tradePrice,
                                                ReferenceData refData)
        Description copied from interface: Security
        Creates a trade based on this security.

        This creates a trade of a suitable type for this security.

        Specified by:
        createTrade in interface Security
        Parameters:
        info - the trade information
        quantity - the number of contracts in the trade
        tradePrice - the price agreed when the trade occurred
        refData - the reference data used to find underlying securities
        Returns:
        the trade
      • createPosition

        public FixedCouponBondPosition createPosition​(PositionInfo positionInfo,
                                                      double quantity,
                                                      ReferenceData refData)
        Description copied from interface: Security
        Creates a position based on this security from a net quantity.

        This creates a position of a suitable type for this security.

        Specified by:
        createPosition in interface Security
        Parameters:
        positionInfo - the position information
        quantity - the number of contracts in the position
        refData - the reference data used to find underlying securities
        Returns:
        the position
      • createPosition

        public FixedCouponBondPosition createPosition​(PositionInfo positionInfo,
                                                      double longQuantity,
                                                      double shortQuantity,
                                                      ReferenceData refData)
        Description copied from interface: Security
        Creates a position based on this security from a long and short quantity.

        This creates a position of a suitable type for this security.

        The long quantity and short quantity must be zero or positive, not negative.

        Specified by:
        createPosition in interface Security
        Parameters:
        positionInfo - the position information
        longQuantity - the long quantity in the position
        shortQuantity - the short quantity in the position
        refData - the reference data used to find underlying securities
        Returns:
        the position
      • builder

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

        public SecurityInfo getInfo()
        Gets the standard security information.

        This includes the security identifier.

        Specified by:
        getInfo in interface Security
        Returns:
        the value of the property, not null
      • getCurrency

        public Currency getCurrency()
        Gets the currency that the bond is traded in.
        Specified by:
        getCurrency in interface Security
        Returns:
        the value of the property, not null
      • 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 currency.

        Returns:
        the value of the property
      • getAccrualSchedule

        public PeriodicSchedule getAccrualSchedule()
        Gets the accrual schedule.

        This is used to define the accrual periods. These are used directly or indirectly to determine other dates in the product.

        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.

        Specified by:
        getLegalEntityId in interface LegalEntitySecurity
        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
      • getExCouponPeriod

        public DaysAdjustment getExCouponPeriod()
        Gets ex-coupon period.

        Some bonds trade ex-coupons before the coupon payment. The coupon is paid not to the owner of the bond on the payment date but to the owner of the bond on the detachment date. The difference between the two is the ex-coupon period (measured in days).

        Because the detachment date is not after the coupon date, the number of days stored in this field should be zero or negative.

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

        public FixedCouponBondSecurity.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