Class CdsIndexIsdaCreditCurveNode

  • All Implemented Interfaces:
    IsdaCreditCurveNode, Serializable, org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class CdsIndexIsdaCreditCurveNode
    extends Object
    implements IsdaCreditCurveNode, org.joda.beans.ImmutableBean, Serializable
    An ISDA compliant curve node whose instrument is a CDS index.

    The trade produced by the node will be a protection payer (BUY) for a positive quantity and a protection receiver (SELL) for a negative quantity.

    See Also:
    Serialized Form
    • Method Detail

      • ofParSpread

        public static CdsIndexIsdaCreditCurveNode ofParSpread​(CdsTemplate template,
                                                              ObservableId observableId,
                                                              StandardId cdsIndexId,
                                                              List<StandardId> legalEntityIds)
        Returns a curve node with par spread convention.
        Parameters:
        template - the template
        observableId - the observable ID
        cdsIndexId - the CDS index ID
        legalEntityIds - the legal entity IDs
        Returns:
        the curve node
      • ofPointsUpfront

        public static CdsIndexIsdaCreditCurveNode ofPointsUpfront​(CdsTemplate template,
                                                                  ObservableId observableId,
                                                                  StandardId cdsIndexId,
                                                                  List<StandardId> legalEntityIds,
                                                                  Double fixedRate)
        Returns a curve node with points upfront convention.
        Parameters:
        template - the template
        observableId - the observable ID
        cdsIndexId - the CDS index ID
        legalEntityIds - the legal entity IDs
        fixedRate - the fixed rate
        Returns:
        the curve node
      • ofQuotedSpread

        public static CdsIndexIsdaCreditCurveNode ofQuotedSpread​(CdsTemplate template,
                                                                 ObservableId observableId,
                                                                 StandardId cdsIndexId,
                                                                 List<StandardId> legalEntityIds,
                                                                 Double fixedRate)
        Returns a curve node with quoted spread convention.
        Parameters:
        template - the template
        observableId - the observable ID
        cdsIndexId - the CDS index ID
        legalEntityIds - the legal entity IDs
        fixedRate - the fixed rate
        Returns:
        the curve node
      • date

        public LocalDate date​(LocalDate tradeDate,
                              ReferenceData refData)
        Description copied from interface: IsdaCreditCurveNode
        Calculates the date associated with the node.

        Each curve node has an associated date which defines the x-value in the curve. This is typically the adjusted end date of the instrument.

        Specified by:
        date in interface IsdaCreditCurveNode
        Parameters:
        tradeDate - the trade date
        refData - the reference data
        Returns:
        the node date
      • trade

        public CdsIndexCalibrationTrade trade​(double quantity,
                                              MarketData marketData,
                                              ReferenceData refData)
        Creates a trade representing the CDS index at the node.

        This uses the observed market data to build the CDS index trade that the node represents. The resulting trade is not resolved. The notional of the trade is taken from the 'quantity' variable. The quantity is signed and will affect whether the trade is Buy or Sell. The valuation date is defined by the market data.

        Parameters:
        quantity - the quantity or notional of the trade
        marketData - the market data required to build a trade for the instrument, including the valuation date
        refData - the reference data, used to resolve the trade dates
        Returns:
        a trade representing the instrument at the node
      • getTemplate

        public CdsTemplate getTemplate()
        Gets the template for the single names associated with this node.
        Returns:
        the value of the property, not null
      • getLabel

        public String getLabel()
        Gets the label to use for the node.

        When building, this will default based on template if not specified.

        Specified by:
        getLabel in interface IsdaCreditCurveNode
        Returns:
        the value of the property, not empty
      • getObservableId

        public ObservableId getObservableId()
        Gets the identifier of the market data value that provides the quoted value.
        Specified by:
        getObservableId in interface IsdaCreditCurveNode
        Returns:
        the value of the property, not null
      • getCdsIndexId

        public StandardId getCdsIndexId()
        Gets the CDS index identifier.

        This identifier is used to refer this CDS index product.

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

        public ImmutableList<StandardId> getLegalEntityIds()
        Gets the legal entity identifiers.

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

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

        public CdsQuoteConvention getQuoteConvention()
        Gets the market quote convention.

        The CDS index is quoted in par spread, points upfront or quoted spread. See CdsQuoteConvention for detail.

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

        public OptionalDouble getFixedRate()
        Gets the fixed coupon rate.

        This must be represented in decimal form.

        Returns:
        the optional value of the property, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object