Class ImmutableCdsConvention.Builder

    • Method Detail

      • name

        public ImmutableCdsConvention.Builder name​(java.lang.String name)
        Sets the convention name.
        Parameters:
        name - the new value, not null
        Returns:
        this, for chaining, not null
      • currency

        public ImmutableCdsConvention.Builder currency​(Currency currency)
        Sets the currency of the CDS.

        The amounts of the notional are expressed in terms of this currency.

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

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

        This is used to convert schedule period dates to a numerical value.

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

        public ImmutableCdsConvention.Builder paymentFrequency​(Frequency paymentFrequency)
        Sets the periodic frequency of payments.

        Regular payments will be made at the specified periodic frequency. This also defines the accrual periodic frequency.

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

        public ImmutableCdsConvention.Builder businessDayAdjustment​(BusinessDayAdjustment businessDayAdjustment)
        Sets the business day adjustment to apply to payment schedule dates.

        Each date in the calculated schedule is determined without taking into account weekends and holidays. The adjustment specified here is used to convert those dates to valid business days.

        The start date and end date may have their own business day adjustment rules. If those are not present, then this adjustment is used instead.

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

        public ImmutableCdsConvention.Builder startDateBusinessDayAdjustment​(BusinessDayAdjustment startDateBusinessDayAdjustment)
        Sets the business day adjustment to apply to the start date, optional with defaulting getter.

        The start date property is an unadjusted date and as such might be a weekend or holiday. The adjustment specified here is used to convert the start date to a valid business day.

        This will default to the businessDayAdjustment if not specified.

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

        public ImmutableCdsConvention.Builder endDateBusinessDayAdjustment​(BusinessDayAdjustment endDateBusinessDayAdjustment)
        Sets the business day adjustment to apply to the end date, optional with defaulting getter.

        The end date property is an unadjusted date and as such might be a weekend or holiday. The adjustment specified here is used to convert the end date to a valid business day.

        This will default to the 'None' if not specified.

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

        public ImmutableCdsConvention.Builder stubConvention​(StubConvention stubConvention)
        Sets the convention defining how to handle stubs, optional with defaulting getter.

        The stub convention is used during schedule construction to determine whether the irregular remaining period occurs at the start or end of the schedule. It also determines whether the irregular period is shorter or longer than the regular period.

        This will default to 'SmartInitial' if not specified.

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

        public ImmutableCdsConvention.Builder rollConvention​(RollConvention rollConvention)
        Sets the convention defining how to roll dates, optional with defaulting getter.

        The schedule periods are determined at the high level by repeatedly adding the frequency to the start date, or subtracting it from the end date. The roll convention provides the detailed rule to adjust the day-of-month or day-of-week.

        This will default to 'Day20' if not specified.

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

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

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

        This will default to 'accrued premium' if not specified.

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

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

        When the protection starts on the start date.

        This will default to 'beginning of the start day' if not specified.

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

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

        This will default to '1 calendar day' if not specified.

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

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

        It is usually 3 business days for standardised CDS contracts.

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