public final class DatesCdsTemplate extends Object implements CdsTemplate, org.joda.beans.ImmutableBean, Serializable
This defines almost all the data necessary to create a credit default swap CdsTrade.
The start and end of the trade are specified by LocalDate.
Use TenorCdsTemplate for standard CDS trades.
The legal entity ID, trade date, notional and fixed rate are required to complete the template and create the trade. As such, it is often possible to get a market quote for a trade based on the template.
A CDS is quoted in points upfront, par spread, or quoted spread. For the latter two cases, the market quotes are passed as the fixed rate.
| Modifier and Type | Class and Description |
|---|---|
static class |
DatesCdsTemplate.Meta
The meta-bean for
DatesCdsTemplate. |
| Modifier and Type | Method and Description |
|---|---|
CdsTrade |
createTrade(StandardId legalEntityId,
LocalDate tradeDate,
BuySell buySell,
double notional,
double fixedRate,
AdjustablePayment upFrontFee,
ReferenceData refData)
Creates a trade based on this template.
|
CdsTrade |
createTrade(StandardId legalEntityId,
LocalDate tradeDate,
BuySell buySell,
double notional,
double fixedRate,
ReferenceData refData)
Creates a trade based on this template.
|
boolean |
equals(Object obj) |
CdsConvention |
getConvention()
Gets the market convention of the credit default swap.
|
LocalDate |
getEndDate()
Gets the end date.
|
LocalDate |
getStartDate()
Gets the start date.
|
int |
hashCode() |
static DatesCdsTemplate.Meta |
meta()
The meta-bean for
DatesCdsTemplate. |
DatesCdsTemplate.Meta |
metaBean() |
static DatesCdsTemplate |
of(LocalDate startDate,
LocalDate endDate,
CdsConvention convention)
Obtains a template based on the specified dates and convention.
|
String |
toString() |
public static DatesCdsTemplate of(LocalDate startDate, LocalDate endDate, CdsConvention convention)
startDate - the start dateendDate - the end dateconvention - the conventionpublic CdsTrade createTrade(StandardId legalEntityId, LocalDate tradeDate, BuySell buySell, double notional, double fixedRate, ReferenceData refData)
CdsTemplateThis returns a trade based on the specified trade date.
The notional is unsigned, with buy/sell determining the direction of the trade. If buying the CDS, the protection is received from the counterparty on default, with the fixed coupon being paid. If selling the CDS, the protection is paid to the counterparty on default, with the fixed coupon being received.
createTrade in interface CdsTemplatelegalEntityId - the legal entity IDtradeDate - the date of the tradebuySell - the buy/sell flagnotional - the notional amount, in the payment currency of the templatefixedRate - the fixed rate, typically derived from the marketrefData - the reference data, used to resolve the trade datespublic CdsTrade createTrade(StandardId legalEntityId, LocalDate tradeDate, BuySell buySell, double notional, double fixedRate, AdjustablePayment upFrontFee, ReferenceData refData)
CdsTemplateThis returns a trade based on the specified trade date and upfront fee.
The notional is unsigned, with buy/sell determining the direction of the trade. If buying the CDS, the protection is received from the counterparty on default, with the fixed coupon being paid. If selling the CDS, the protection is paid to the counterparty on default, with the fixed coupon being received.
createTrade in interface CdsTemplatelegalEntityId - the legal entity IDtradeDate - the date of the tradebuySell - the buy/sell flagnotional - the notional amount, in the payment currency of the templatefixedRate - the fixed rate, typically derived from the marketupFrontFee - the reference datarefData - the reference data, used to resolve the trade datespublic static DatesCdsTemplate.Meta meta()
DatesCdsTemplate.public DatesCdsTemplate.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic LocalDate getStartDate()
The start date of the underling CDS product.
This date can be modified following the rule in convention.
public LocalDate getEndDate()
The end date of the underling CDS product.
This date can be modified following the rule in convention.
public CdsConvention getConvention()
getConvention in interface CdsTemplateCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.