public final class Cds extends Object implements Product, Resolvable<ResolvedCds>, org.joda.beans.ImmutableBean, Serializable
A CDS is a financial instrument where the protection seller agrees to compensate the protection buyer when the reference entity suffers a default. The protection seller is paid premium regularly from the protection buyer until the expiry of the CDS contract or the reference entity defaults before the expiry.
| Modifier and Type | Class and Description |
|---|---|
static class |
Cds.Builder
The bean-builder for
Cds. |
static class |
Cds.Meta
The meta-bean for
Cds. |
| Modifier and Type | Method and Description |
|---|---|
ImmutableSet<Currency> |
allCurrencies()
Returns the set of currencies the product refers to.
|
static Cds.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
boolean |
equals(Object obj) |
BuySell |
getBuySell()
Gets whether the CDS is buy or sell.
|
Currency |
getCurrency()
Gets the currency of the CDS.
|
DayCount |
getDayCount()
Gets the day count convention.
|
double |
getFixedRate()
Gets the fixed coupon rate.
|
StandardId |
getLegalEntityId()
Gets the legal entity identifier.
|
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 Cds.Meta |
meta()
The meta-bean for
Cds. |
Cds.Meta |
metaBean() |
static Cds |
of(BuySell buySell,
StandardId legalEntityId,
Currency currency,
double notional,
LocalDate startDate,
LocalDate endDate,
Frequency paymentFrequency,
HolidayCalendarId calendar,
double fixedRate)
Creates an instance of a standardized CDS.
|
ResolvedCds |
resolve(ReferenceData refData) |
Cds.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, waitallPaymentCurrencies, isCrossCurrencypublic static Cds of(BuySell buySell, StandardId legalEntityId, Currency currency, double notional, LocalDate startDate, LocalDate endDate, Frequency paymentFrequency, HolidayCalendarId calendar, double fixedRate)
buySell - buy or selllegalEntityId - the legal entity IDcurrency - the currencynotional - the notionalstartDate - the start dateendDate - the end datecalendar - the calendarfixedRate - the fixed coupon ratepaymentFrequency - the payment frequencypublic ImmutableSet<Currency> allCurrencies()
ProductThis 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.
allCurrencies in interface Productpublic ResolvedCds resolve(ReferenceData refData)
resolve in interface Resolvable<ResolvedCds>public static Cds.Meta meta()
Cds.public static Cds.Builder builder()
public Cds.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic BuySell getBuySell()
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.
public StandardId getLegalEntityId()
This identifier is used for the reference legal entity of the CDS.
public Currency getCurrency()
The amounts of the notional are expressed in terms of this currency.
public double getNotional()
The fixed notional amount applicable during the lifetime of the CDS.
The currency of the notional is specified by currency.
public PeriodicSchedule getPaymentSchedule()
This is used to define the payment periods.
public double getFixedRate()
This must be represented in decimal form.
public DayCount getDayCount()
This is used to convert dates to a numerical value.
When building, this will default to 'Act/360'.
public PaymentOnDefault getPaymentOnDefault()
Whether the accrued premium is paid in the event of a default.
When building, this will default to 'AccruedPremium'.
public ProtectionStartOfDay getProtectionStart()
When the protection starts on the start date.
When building, this will default to 'Beginning'.
public DaysAdjustment getStepinDateOffset()
The step-in date is also called protection effective date. It is usually 1 calendar day for standardized CDS contracts.
When building, this will default to 1 calendar day.
public DaysAdjustment getSettlementDateOffset()
It is usually 3 business days for standardized CDS contracts.
When building, this will default to 3 business days in the calendar of the payment schedule.
public Cds.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.