Class CdsIndex
- java.lang.Object
-
- com.opengamma.strata.product.credit.CdsIndex
-
- All Implemented Interfaces:
Resolvable<ResolvedCdsIndex>
,Product
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class CdsIndex extends Object implements Product, Resolvable<ResolvedCdsIndex>, org.joda.beans.ImmutableBean, Serializable
A CDS (portfolio) index product.A CDS index is a portofolio of single name credit default swaps. The protection buyer periodically pays fixed coupons to the protection seller until the expiry, and in return, the protection buyer receives the bond of a defaulted constituent legal entity for par.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CdsIndex.Builder
The bean-builder forCdsIndex
.static class
CdsIndex.Meta
The meta-bean forCdsIndex
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ImmutableSet<Currency>
allCurrencies()
Returns the set of currencies the product refers to.static CdsIndex.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
BuySell
getBuySell()
Gets whether the CDS index is buy or sell.StandardId
getCdsIndexId()
Gets the CDS index identifier.Currency
getCurrency()
Gets the currency of the CDS index.DayCount
getDayCount()
Gets the day count convention.double
getFixedRate()
Gets the fixed coupon rate.ImmutableList<StandardId>
getLegalEntityIds()
Gets the legal entity identifiers.double
getNotional()
Gets the notional amount, must be non-negative.PaymentOnDefault
getPaymentOnDefault()
Gets the payment on default.PeriodicSchedule
getPaymentSchedule()
Gets the payment schedule.ProtectionStartOfDay
getProtectionStart()
Gets the protection start of the day.DaysAdjustment
getSettlementDateOffset()
Gets the number of days between valuation date and settlement date.DaysAdjustment
getStepinDateOffset()
Gets the number of days between valuation date and step-in date.int
hashCode()
static CdsIndex.Meta
meta()
The meta-bean forCdsIndex
.CdsIndex.Meta
metaBean()
static CdsIndex
of(BuySell buySell, StandardId cdsIndexId, List<StandardId> legalEntityIds, Currency currency, double notional, LocalDate startDate, LocalDate endDate, Frequency paymentFrequency, HolidayCalendarId calendar, double fixedRate)
Creates an instance of a standardized CDS index.ResolvedCdsIndex
resolve(ReferenceData refData)
Resolves this object using the specified reference data.CdsIndex.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.opengamma.strata.product.Product
allPaymentCurrencies, isCrossCurrency
-
-
-
-
Method Detail
-
of
public static CdsIndex of(BuySell buySell, StandardId cdsIndexId, List<StandardId> legalEntityIds, Currency currency, double notional, LocalDate startDate, LocalDate endDate, Frequency paymentFrequency, HolidayCalendarId calendar, double fixedRate)
Creates an instance of a standardized CDS index.- Parameters:
buySell
- buy or sellcdsIndexId
- the CDS index IDlegalEntityIds
- the legal entity IDscurrency
- the currencynotional
- the notionalstartDate
- the start dateendDate
- the end datecalendar
- the calendarpaymentFrequency
- the payment frequencyfixedRate
- the fixed coupon rate- Returns:
- the instance
-
allCurrencies
public ImmutableSet<Currency> allCurrencies()
Description copied from interface:Product
Returns the set of currencies the product refers to.This returns the complete set of currencies, not just the payment currencies. For example, the sets will differ when one of the currencies is non-deliverable.
- Specified by:
allCurrencies
in interfaceProduct
- Returns:
- the set of currencies the product refers to
-
resolve
public ResolvedCdsIndex resolve(ReferenceData refData)
Description copied from interface:Resolvable
Resolves this object using the specified reference data.This converts the object implementing this interface to the equivalent resolved form. All
ReferenceDataId
identifiers in this instance will be resolved. The resolved form will typically be a type that is optimized for pricing.Resolved objects may be bound to data that changes over time, such as holiday calendars. If the data changes, such as the addition of a new holiday, the resolved form will not be updated. Care must be taken when placing the resolved form in a cache or persistence layer.
- Specified by:
resolve
in interfaceResolvable<ResolvedCdsIndex>
- Parameters:
refData
- the reference data to use when resolving- Returns:
- the resolved instance
-
meta
public static CdsIndex.Meta meta()
The meta-bean forCdsIndex
.- Returns:
- the meta-bean, not null
-
builder
public static CdsIndex.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public CdsIndex.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getBuySell
public BuySell getBuySell()
Gets whether the CDS index is buy or sell.A value of 'Buy' implies buying protection, where the fixed coupon is paid and the protection is received in the event of default. A value of 'Sell' implies selling protection, where the fixed coupon is received and the protection is paid in the event of default.
- 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
-
getCurrency
public Currency getCurrency()
Gets the currency of the CDS index.The amounts of the notional are expressed in terms of this currency.
- Returns:
- the value of the property, not null
-
getNotional
public double getNotional()
Gets the notional amount, must be non-negative.The fixed notional amount applicable during the lifetime of the CDS. The currency of the notional is specified by
currency
.- Returns:
- the value of the property
-
getPaymentSchedule
public PeriodicSchedule getPaymentSchedule()
Gets the payment schedule.This is used to define the payment periods.
- Returns:
- the value of the property, not null
-
getFixedRate
public double getFixedRate()
Gets the fixed coupon rate.This must be represented in decimal form.
- Returns:
- the value of the property
-
getDayCount
public DayCount getDayCount()
Gets the day count convention.This is used to convert dates to a numerical value.
When building, this will default to 'Act/360'.
- 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.
When building, this will default to 'AccruedPremium'.
- 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.
When building, this will default to 'Beginning'.
- 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. It is usually 1 calendar day for standardized CDS index contracts.
When building, this will default to 1 calendar day.
- 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 standardized CDS index contracts.
When building, this will default to 3 business days in the calendar of the payment schedule.
- Returns:
- the value of the property, not null
-
toBuilder
public CdsIndex.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-