Class ResolvedCdsIndex.Builder

  • All Implemented Interfaces:
    org.joda.beans.BeanBuilder<ResolvedCdsIndex>
    Enclosing class:
    ResolvedCdsIndex

    public static final class ResolvedCdsIndex.Builder
    extends org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCdsIndex>
    The bean-builder for ResolvedCdsIndex.
    • Method Detail

      • get

        public Object get​(String propertyName)
        Specified by:
        get in interface org.joda.beans.BeanBuilder<ResolvedCdsIndex>
        Overrides:
        get in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCdsIndex>
      • buySell

        public ResolvedCdsIndex.Builder buySell​(BuySell buySell)
        Sets whether the CDS index is buy or sell.

        A value of 'Buy' implies buying protection, where the fixed coupon is paid and the protection is received in the event of default. A value of 'Sell' implies selling protection, where the fixed coupon is received and the protection is paid in the event of default.

        Parameters:
        buySell - the new value, not null
        Returns:
        this, for chaining, not null
      • cdsIndexId

        public ResolvedCdsIndex.Builder cdsIndexId​(StandardId cdsIndexId)
        Sets the CDS index identifier.

        This identifier is used to refer this CDS index product.

        Parameters:
        cdsIndexId - the new value, not null
        Returns:
        this, for chaining, not null
      • legalEntityIds

        public ResolvedCdsIndex.Builder legalEntityIds​(List<StandardId> legalEntityIds)
        Sets the legal entity identifiers.

        These identifiers refer to the reference legal entities of the CDS index.

        Parameters:
        legalEntityIds - the new value, not null
        Returns:
        this, for chaining, not null
      • legalEntityIds

        public ResolvedCdsIndex.Builder legalEntityIds​(StandardId... legalEntityIds)
        Sets the legalEntityIds property in the builder from an array of objects.
        Parameters:
        legalEntityIds - the new value, not null
        Returns:
        this, for chaining, not null
      • paymentPeriods

        public ResolvedCdsIndex.Builder paymentPeriods​(List<CreditCouponPaymentPeriod> paymentPeriods)
        Sets the periodic payments based on the fixed rate.

        Each payment period represents part of the life-time of the leg. In most cases, the periods do not overlap. However, since each payment period is essentially independent the data model allows overlapping periods.

        Parameters:
        paymentPeriods - the new value, not empty
        Returns:
        this, for chaining, not null
      • paymentPeriods

        public ResolvedCdsIndex.Builder paymentPeriods​(CreditCouponPaymentPeriod... paymentPeriods)
        Sets the paymentPeriods property in the builder from an array of objects.
        Parameters:
        paymentPeriods - the new value, not empty
        Returns:
        this, for chaining, not null
      • protectionEndDate

        public ResolvedCdsIndex.Builder protectionEndDate​(LocalDate protectionEndDate)
        Sets the protection end date.

        This may be different from the accrual end date of the last payment period in periodicPayments.

        Parameters:
        protectionEndDate - the new value, not null
        Returns:
        this, for chaining, not null
      • dayCount

        public ResolvedCdsIndex.Builder dayCount​(DayCount dayCount)
        Sets the day count convention.

        This is used to convert dates to a numerical value.

        Parameters:
        dayCount - the new value, not null
        Returns:
        this, for chaining, not null
      • paymentOnDefault

        public ResolvedCdsIndex.Builder paymentOnDefault​(PaymentOnDefault paymentOnDefault)
        Sets the payment on default.

        Whether the accrued premium is paid in the event of a default.

        Parameters:
        paymentOnDefault - the new value, not null
        Returns:
        this, for chaining, not null
      • protectionStart

        public ResolvedCdsIndex.Builder protectionStart​(ProtectionStartOfDay protectionStart)
        Sets the protection start of the day.

        When the protection starts on the start date.

        Parameters:
        protectionStart - the new value, not null
        Returns:
        this, for chaining, not null
      • stepinDateOffset

        public ResolvedCdsIndex.Builder stepinDateOffset​(DaysAdjustment stepinDateOffset)
        Sets the number of days between valuation date and step-in date.

        The step-in date is also called protection effective date. It is usually 1 calendar day for standardized CDS index contracts.

        Parameters:
        stepinDateOffset - the new value, not null
        Returns:
        this, for chaining, not null
      • settlementDateOffset

        public ResolvedCdsIndex.Builder settlementDateOffset​(DaysAdjustment settlementDateOffset)
        Sets the number of days between valuation date and settlement date.

        It is usually 3 business days for standardized CDS index contracts.

        Parameters:
        settlementDateOffset - the new value, not null
        Returns:
        this, for chaining, not null
      • toString

        public String toString()
        Overrides:
        toString in class org.joda.beans.impl.direct.DirectFieldsBeanBuilder<ResolvedCdsIndex>