## Enum CdsQuoteConvention

• java.lang.Object
• java.lang.Enum<CdsQuoteConvention>
• com.opengamma.strata.product.credit.type.CdsQuoteConvention
• All Implemented Interfaces:
Named, NamedEnum, java.io.Serializable, java.lang.Comparable<CdsQuoteConvention>

public enum CdsQuoteConvention
extends java.lang.Enum<CdsQuoteConvention>
implements NamedEnum
Market quote conventions for credit default swaps.
• ### Enum Constant Summary

Enum Constants
Enum Constant Description
PAR_SPREAD
POINTS_UPFRONT
Points upfront.
QUOTED_SPREAD
• ### Method Summary

All Methods
Modifier and Type Method Description
static CdsQuoteConvention of​(java.lang.String name)
Obtains an instance from the specified name.
java.lang.String toString()
Returns the formatted name of the type.
static CdsQuoteConvention valueOf​(java.lang.String name)
Returns the enum constant of this type with the specified name.
static CdsQuoteConvention[] values()
Returns an array containing the constants of this enum type, in the order they are declared.
• ### Methods inherited from class java.lang.Enum

clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
• ### Methods inherited from class java.lang.Object

getClass, notify, notifyAll, wait, wait, wait
• ### Methods inherited from interface com.opengamma.strata.collect.named.NamedEnum

getName
• ### Enum Constant Detail

public static final CdsQuoteConvention PAR_SPREAD

Par spread is the old (i.e. pre-April 2009) way of quoting CDSs. A CDS would be constructed to have an initial fair value of zero; the par-spread is the value of the coupon (premium) on the premium leg that makes this so.

A zero hazard curve (or equivalent, e.g. the survival probability curve) can be implied from a set of par spread quotes (on the same name at different maturities) by finding the curve that gives all the CDSs a PV of zero (the curve is not unique and will depend on other modeling choices).

• #### POINTS_UPFRONT

public static final CdsQuoteConvention POINTS_UPFRONT
Points upfront.

Points upfront (PUF) is the current (as of April 2009) way of quoting CDSs. A CDS has a fixed coupon (premium).

An up front fee is payable by the buyer of protection (i.e. the payer of the premiums) - this fee can be negative (i.e. an amount is received by the protection buyer). PUF is quoted as a percentage of the notional.

A zero hazard curve (or equivalent, e.g. the survival probability curve) can be implied from a set of PUF quotes (on the same name at different maturities) by finding the curve that gives all the CDSs a clean present value equal to their PUF * notional (the curve is not unique and will depend on other modeling choices).

public static final CdsQuoteConvention QUOTED_SPREAD

Quoted spread (sometimes misleadingly called flat spread) is an alternative to quoting PUF where people wish to see a spread like number. It is numerically close in value to the equivalent par spread but is not exactly the same.

To find the quoted spread of a CDS from its PUF (and premium) one first finds the unique flat hazard rate that will give the CDS a clean present value equal to its PUF * notional; one then finds the par spread (the coupon that makes the CDS have zero clean PV) of the CDS from this flat hazard curve - this is the quoted spread (and the reason for the confusing name, flat spread). To go from a quoted spread to PUF, one does the reverse of the above.

A zero hazard curve (or equivalent, e.g. the survival probability curve) cannot be directly implied from a set of quoted spreads - one must first convert to PUF.

• ### Method Detail

• #### values

public static CdsQuoteConvention[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CdsQuoteConvention c : CdsQuoteConvention.values())
System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared
• #### valueOf

public static CdsQuoteConvention valueOf​(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null
• #### of

public static CdsQuoteConvention of​(java.lang.String name)
Obtains an instance from the specified name.

Parsing handles the mixed case form produced by toString() and the upper and lower case variants of the enum constant name.

Parameters:
name - the name to parse
Returns:
the type
Throws:
java.lang.IllegalArgumentException - if the name is not known
• #### toString

public java.lang.String toString()
Returns the formatted name of the type.
Overrides:
toString in class java.lang.Enum<CdsQuoteConvention>
Returns:
the formatted string representing the type