Interface CdsConvention

    • Method Detail

      • of

        static CdsConvention of​(java.lang.String uniqueName)
        Obtains an instance from the specified unique name.
        Parameters:
        uniqueName - the unique name
        Returns:
        the convention
        Throws:
        java.lang.IllegalArgumentException - if the name is not known
      • extendedEnum

        static ExtendedEnum<CdsConvention> extendedEnum()
        Gets the extended enum helper.

        This helper allows instances of the convention to be looked up. It also provides the complete set of available instances.

        Returns:
        the extended enum helper
      • getSettlementDateOffset

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

        It is usually 3 business days for standardised CDS contracts.

        Returns:
        days adjustment
      • getCurrency

        Currency getCurrency()
        Get the currency of the CDS.

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

        Returns:
        the currency
      • createTrade

        default CdsTrade createTrade​(StandardId legalEntityId,
                                     java.time.LocalDate tradeDate,
                                     Tenor tenor,
                                     BuySell buySell,
                                     double notional,
                                     double fixedRate,
                                     ReferenceData refData)
        Creates a CDS trade based on the trade date and the IMM date logic.

        The start date and end date are computed from trade date with the standard semi-annual roll convention.

        Parameters:
        legalEntityId - the legal entity ID
        tradeDate - the trade date
        tenor - the tenor
        buySell - buy or sell
        notional - the notional
        fixedRate - the fixed rate
        refData - the reference data
        Returns:
        the CDS trade
      • createTrade

        default CdsTrade createTrade​(StandardId legalEntityId,
                                     java.time.LocalDate tradeDate,
                                     java.time.LocalDate startDate,
                                     Tenor tenor,
                                     BuySell buySell,
                                     double notional,
                                     double fixedRate,
                                     ReferenceData refData)
        Creates a CDS trade based on the trade date, start date and the IMM date logic.

        The end date is computed from the start date with the standard semi-annual roll convention.

        Parameters:
        legalEntityId - the legal entity ID
        tradeDate - the trade date
        startDate - the start date
        tenor - the tenor
        buySell - buy or sell
        notional - the notional
        fixedRate - the fixed rate
        refData - the reference data
        Returns:
        the CDS trade
      • createTrade

        default CdsTrade createTrade​(StandardId legalEntityId,
                                     java.time.LocalDate tradeDate,
                                     java.time.LocalDate startDate,
                                     java.time.LocalDate endDate,
                                     BuySell buySell,
                                     double notional,
                                     double fixedRate,
                                     ReferenceData refData)
        Creates a CDS trade from trade date, start date and end date.

        The settlement date is computed from the trade date using settlementDateOffset defined in the convention.

        Parameters:
        legalEntityId - the legal entity ID
        tradeDate - the trade date
        startDate - the start date
        endDate - the end date
        buySell - buy or sell
        notional - the notional
        fixedRate - the fixed rate
        refData - the reference data
        Returns:
        the CDS trade
      • toTrade

        CdsTrade toTrade​(StandardId legalEntityId,
                         TradeInfo tradeInfo,
                         java.time.LocalDate startDate,
                         java.time.LocalDate endDate,
                         BuySell buySell,
                         double notional,
                         double fixedRate)
        Creates a CDS trade with TradeInfo.
        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
      • createTrade

        default CdsTrade createTrade​(StandardId legalEntityId,
                                     java.time.LocalDate tradeDate,
                                     Tenor tenor,
                                     BuySell buySell,
                                     double notional,
                                     double fixedRate,
                                     AdjustablePayment upFrontFee,
                                     ReferenceData refData)
        Creates a CDS trade with upfront fee based on the trade date and the IMM date logic.

        The start date and end date are computed from trade date with the standard semi-annual roll convention.

        Parameters:
        legalEntityId - the legal entity ID
        tradeDate - the trade date
        tenor - the tenor
        buySell - buy or sell
        notional - the notional
        fixedRate - the fixed rate
        upFrontFee - the upFront fee
        refData - the reference data
        Returns:
        the CDS trade
      • createTrade

        default CdsTrade createTrade​(StandardId legalEntityId,
                                     java.time.LocalDate tradeDate,
                                     java.time.LocalDate startDate,
                                     Tenor tenor,
                                     BuySell buySell,
                                     double notional,
                                     double fixedRate,
                                     AdjustablePayment upFrontFee,
                                     ReferenceData refData)
        Creates a CDS trade with upfront fee based on the trade date, start date and the IMM date logic.

        The end date is computed from the start date with the standard semi-annual roll convention.

        Parameters:
        legalEntityId - the legal entity ID
        tradeDate - the trade date
        startDate - the start date
        tenor - the tenor
        buySell - buy or sell
        notional - the notional
        fixedRate - the fixed rate
        upFrontFee - the upFront fee
        refData - the reference data
        Returns:
        the CDS trade
      • createTrade

        default CdsTrade createTrade​(StandardId legalEntityId,
                                     java.time.LocalDate tradeDate,
                                     java.time.LocalDate startDate,
                                     java.time.LocalDate endDate,
                                     BuySell buySell,
                                     double notional,
                                     double fixedRate,
                                     AdjustablePayment upFrontFee,
                                     ReferenceData refData)
        Creates a CDS trade with upfront fee from trade date, start date and end date.

        The settlement date is computed from the trade date using settlementDateOffset defined in the convention.

        Parameters:
        legalEntityId - the legal entity ID
        tradeDate - the trade date
        startDate - the start date
        endDate - the end date
        buySell - buy or sell
        notional - the notional
        fixedRate - the fixed rate
        upFrontFee - the upFront fee
        refData - the reference data
        Returns:
        the CDS trade
      • toTrade

        CdsTrade toTrade​(StandardId legalEntityId,
                         TradeInfo tradeInfo,
                         java.time.LocalDate startDate,
                         java.time.LocalDate endDate,
                         BuySell buySell,
                         double notional,
                         double fixedRate,
                         AdjustablePayment upFrontFee)
        Creates a CDS trade with upfront fee and TradeInfo.
        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
      • getName

        java.lang.String getName()
        Gets the name that uniquely identifies this convention.

        This name is used in serialization and can be parsed using of(String).

        Specified by:
        getName in interface Named
        Returns:
        the unique name