public final class ResolvedCds extends Object implements ResolvedProduct, org.joda.beans.ImmutableBean, Serializable
This is the resolved form of Cds and is an input to the pricers.
Applications will typically create a ResolvedCds from a Cds
using Cds.resolve(ReferenceData).
| Modifier and Type | Class and Description |
|---|---|
static class |
ResolvedCds.Builder
The bean-builder for
ResolvedCds. |
static class |
ResolvedCds.Meta
The meta-bean for
ResolvedCds. |
| Modifier and Type | Method and Description |
|---|---|
double |
accruedYearFraction(LocalDate stepinDate)
Calculates the accrued premium per fractional spread for unit notional.
|
static ResolvedCds.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
LocalDate |
calculateEffectiveStartDate(LocalDate stepinDate)
Obtains the effective start date from the step-in date.
|
LocalDate |
calculateSettlementDateFromValuation(LocalDate valuationDate,
ReferenceData refData)
Calculates the settlement date from the valuation date.
|
boolean |
equals(Object obj) |
Optional<CreditCouponPaymentPeriod> |
findPeriod(LocalDate date)
Finds the period that contains the specified date.
|
LocalDate |
getAccrualEndDate()
Obtains the accrual end date.
|
LocalDate |
getAccrualStartDate()
Obtains the accrual start date.
|
BuySell |
getBuySell()
Gets whether the CDS is buy or sell.
|
Currency |
getCurrency()
Obtains the currency.
|
DayCount |
getDayCount()
Gets the day count convention.
|
double |
getFixedRate()
Obtains the fixed coupon rate.
|
StandardId |
getLegalEntityId()
Gets the legal entity identifier.
|
double |
getNotional()
Obtains the notional.
|
PaymentOnDefault |
getPaymentOnDefault()
Gets the payment on default.
|
ImmutableList<CreditCouponPaymentPeriod> |
getPaymentPeriods()
Gets the periodic payments based on the fixed rate.
|
LocalDate |
getProtectionEndDate()
Gets the protection end date.
|
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 ResolvedCds.Meta |
meta()
The meta-bean for
ResolvedCds. |
ResolvedCds.Meta |
metaBean() |
ResolvedCds.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
public LocalDate getAccrualStartDate()
In general this is different from the protection start date.
Use stepinDateOffset to compute the protection start date.
public LocalDate getAccrualEndDate()
public double getNotional()
public Currency getCurrency()
public double getFixedRate()
public LocalDate calculateEffectiveStartDate(LocalDate stepinDate)
stepinDate - the step-in datepublic LocalDate calculateSettlementDateFromValuation(LocalDate valuationDate, ReferenceData refData)
valuationDate - the valuation daterefData - the reference data to usepublic Optional<CreditCouponPaymentPeriod> findPeriod(LocalDate date)
The search is performed using unadjusted dates.
date - the date to find the period forIllegalArgumentException - if more than one period matchespublic double accruedYearFraction(LocalDate stepinDate)
stepinDate - the step-in datepublic static ResolvedCds.Meta meta()
ResolvedCds.public static ResolvedCds.Builder builder()
public ResolvedCds.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 ImmutableList<CreditCouponPaymentPeriod> getPaymentPeriods()
Each payment period represents part of the life-time of the leg. In most cases, the periods do not overlap. However, since each payment period is essentially independent the data model allows overlapping periods.
public LocalDate getProtectionEndDate()
This may be different from the accrual end date of the last payment period in periodicPayments.
public DayCount getDayCount()
This is used to convert dates to a numerical value.
public PaymentOnDefault getPaymentOnDefault()
Whether the accrued premium is paid in the event of a default.
public ProtectionStartOfDay getProtectionStart()
When the protection starts on the start date.
public DaysAdjustment getStepinDateOffset()
The step-in date is also called protection effective date. It is usually 1 calendar day for standardized CDS contracts.
public DaysAdjustment getSettlementDateOffset()
It is usually 3 business days for standardized CDS contracts.
public ResolvedCds.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.