Interface CdsTemplate

    • Method Detail

      • getConvention

        CdsConvention getConvention()
        Gets the market convention of the credit default swap.
        Returns:
        the convention
      • createTrade

        CdsTrade createTrade​(StandardId legalEntityId,
                             LocalDate tradeDate,
                             BuySell buySell,
                             double notional,
                             double fixedRate,
                             ReferenceData refData)
        Creates a trade based on this template.

        This returns a trade based on the specified trade date.

        The notional is unsigned, with buy/sell determining the direction of the trade. If buying the CDS, the protection is received from the counterparty on default, with the fixed coupon being paid. If selling the CDS, the protection is paid to the counterparty on default, with the fixed coupon being received.

        Parameters:
        legalEntityId - the legal entity ID
        tradeDate - the date of the trade
        buySell - the buy/sell flag
        notional - the notional amount, in the payment currency of the template
        fixedRate - the fixed rate, typically derived from the market
        refData - the reference data, used to resolve the trade dates
        Returns:
        the trade
        Throws:
        ReferenceDataNotFoundException - if an identifier cannot be resolved in the reference data
      • createTrade

        CdsTrade createTrade​(StandardId legalEntityId,
                             LocalDate tradeDate,
                             BuySell buySell,
                             double notional,
                             double fixedRate,
                             AdjustablePayment upFrontFee,
                             ReferenceData refData)
        Creates a trade based on this template.

        This returns a trade based on the specified trade date and upfront fee.

        The notional is unsigned, with buy/sell determining the direction of the trade. If buying the CDS, the protection is received from the counterparty on default, with the fixed coupon being paid. If selling the CDS, the protection is paid to the counterparty on default, with the fixed coupon being received.

        Parameters:
        legalEntityId - the legal entity ID
        tradeDate - the date of the trade
        buySell - the buy/sell flag
        notional - the notional amount, in the payment currency of the template
        fixedRate - the fixed rate, typically derived from the market
        upFrontFee - the reference data
        refData - the reference data, used to resolve the trade dates
        Returns:
        the trade
        Throws:
        ReferenceDataNotFoundException - if an identifier cannot be resolved in the reference data