Class ImmutableCdsConvention

    • Method Detail

      • of

        public static ImmutableCdsConvention of​(String name,
                                                Currency currency,
                                                DayCount dayCount,
                                                Frequency paymentFrequency,
                                                BusinessDayAdjustment businessDayAdjustment,
                                                DaysAdjustment settlementDateOffset)
        Obtains a convention based on the specified parameters.
        Parameters:
        name - the name of the convention
        currency - the currency
        dayCount - the day count
        paymentFrequency - the payment frequency
        businessDayAdjustment - the business day adjustment
        settlementDateOffset - the settlement date offset
        Returns:
        the CDS convention
      • getStartDateBusinessDayAdjustment

        public BusinessDayAdjustment getStartDateBusinessDayAdjustment()
        Gets the business day adjustment to apply to the start date, providing a default result if no override specified.

        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.

        Returns:
        the start date business day adjustment, not null
      • getEndDateBusinessDayAdjustment

        public BusinessDayAdjustment getEndDateBusinessDayAdjustment()
        Gets the business day adjustment to apply to the end date, providing a default result if no override specified.

        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.

        Returns:
        the end date business day adjustment, not null
      • toTrade

        public CdsTrade toTrade​(StandardId legalEntityId,
                                TradeInfo tradeInfo,
                                LocalDate startDate,
                                LocalDate endDate,
                                BuySell buySell,
                                double notional,
                                double fixedRate)
        Description copied from interface: CdsConvention
        Creates a CDS trade with TradeInfo.
        Specified by:
        toTrade in interface CdsConvention
        Parameters:
        legalEntityId - the legal entity ID
        tradeInfo - the trade info
        startDate - the start date
        endDate - the end date
        buySell - buy or sell
        notional - the notional
        fixedRate - the fixed rate
        Returns:
        the CDS trade
      • toTrade

        public CdsTrade toTrade​(StandardId legalEntityId,
                                TradeInfo tradeInfo,
                                LocalDate startDate,
                                LocalDate endDate,
                                BuySell buySell,
                                double notional,
                                double fixedRate,
                                AdjustablePayment upfrontFee)
        Description copied from interface: CdsConvention
        Creates a CDS trade with upfront fee and TradeInfo.
        Specified by:
        toTrade in interface CdsConvention
        Parameters:
        legalEntityId - the legal entity ID
        tradeInfo - the trade info
        startDate - the start date
        endDate - the end date
        buySell - buy or sell
        notional - the notional
        fixedRate - the fixed rate
        upfrontFee - the upFront fee
        Returns:
        the CDS trade
      • builder

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

        public String getName()
        Gets the convention name.
        Specified by:
        getName in interface CdsConvention
        Specified by:
        getName in interface Named
        Returns:
        the value of the property, not null
      • getCurrency

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

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

        Specified by:
        getCurrency in interface CdsConvention
        Returns:
        the value of the property, not null
      • getDayCount

        public DayCount getDayCount()
        Gets the day count convention applicable.

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

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

        public Frequency getPaymentFrequency()
        Gets the periodic frequency of payments.

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

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

        public BusinessDayAdjustment getBusinessDayAdjustment()
        Gets 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.

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

        public StubConvention getStubConvention()
        Gets 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.

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

        public RollConvention getRollConvention()
        Gets 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.

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

        public PaymentOnDefault getPaymentOnDefault()
        Gets 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.

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

        public ProtectionStartOfDay getProtectionStart()
        Gets 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.

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

        public DaysAdjustment getStepinDateOffset()
        Gets 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.

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

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

        It is usually 3 business days for standardised CDS contracts.

        Specified by:
        getSettlementDateOffset in interface CdsConvention
        Returns:
        the value of the property, not null
      • toBuilder

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

        public int hashCode()
        Overrides:
        hashCode in class Object