public final class CdsIsdaCreditCurveNode extends Object implements IsdaCreditCurveNode, org.joda.beans.ImmutableBean, Serializable
The trade produced by the node will be a protection receiver (BUY) for a positive quantity and a protection payer (SELL) for a negative quantity.
Modifier and Type | Class and Description |
---|---|
static class |
CdsIsdaCreditCurveNode.Builder
The bean-builder for
CdsIsdaCreditCurveNode . |
static class |
CdsIsdaCreditCurveNode.Meta
The meta-bean for
CdsIsdaCreditCurveNode . |
Modifier and Type | Method and Description |
---|---|
static CdsIsdaCreditCurveNode.Builder |
builder()
Returns a builder used to create an instance of the bean.
|
LocalDate |
date(LocalDate tradeDate,
ReferenceData refData)
Calculates the date associated with the node.
|
boolean |
equals(Object obj) |
OptionalDouble |
getFixedRate()
Gets the fixed coupon rate.
|
String |
getLabel()
Gets the label to use for the node.
|
StandardId |
getLegalEntityId()
Gets the legal entity identifier.
|
ObservableId |
getObservableId()
Gets the identifier of the market data value that provides the quoted value.
|
CdsQuoteConvention |
getQuoteConvention()
Gets the market quote convention.
|
CdsTemplate |
getTemplate()
Gets the template for the CDS associated with this node.
|
int |
hashCode() |
static CdsIsdaCreditCurveNode.Meta |
meta()
The meta-bean for
CdsIsdaCreditCurveNode . |
CdsIsdaCreditCurveNode.Meta |
metaBean() |
DatedParameterMetadata |
metadata(LocalDate nodeDate)
Returns metadata for the node from the node date.
|
static CdsIsdaCreditCurveNode |
ofParSpread(CdsTemplate template,
ObservableId observableId,
StandardId legalEntityId)
Returns a curve node with par spread convention.
|
static CdsIsdaCreditCurveNode |
ofPointsUpfront(CdsTemplate template,
ObservableId observableId,
StandardId legalEntityId,
Double fixedRate)
Returns a curve node with points upfront convention.
|
static CdsIsdaCreditCurveNode |
ofQuotedSpread(CdsTemplate template,
ObservableId observableId,
StandardId legalEntityId,
Double fixedRate)
Returns a curve node with quoted spread convention.
|
CdsIsdaCreditCurveNode.Builder |
toBuilder()
Returns a builder that allows this bean to be mutated.
|
String |
toString() |
CdsCalibrationTrade |
trade(double quantity,
MarketData marketData,
ReferenceData refData)
Creates a trade representing the CDS at the node.
|
public static CdsIsdaCreditCurveNode ofParSpread(CdsTemplate template, ObservableId observableId, StandardId legalEntityId)
template
- the templateobservableId
- the observable IDlegalEntityId
- the legal entity IDpublic static CdsIsdaCreditCurveNode ofPointsUpfront(CdsTemplate template, ObservableId observableId, StandardId legalEntityId, Double fixedRate)
template
- the templateobservableId
- the observable IDlegalEntityId
- the legal entity IDfixedRate
- the fixed ratepublic static CdsIsdaCreditCurveNode ofQuotedSpread(CdsTemplate template, ObservableId observableId, StandardId legalEntityId, Double fixedRate)
template
- the templateobservableId
- the observable IDlegalEntityId
- the legal entity IDfixedRate
- the fixed ratepublic LocalDate date(LocalDate tradeDate, ReferenceData refData)
IsdaCreditCurveNode
Each curve node has an associated date which defines the x-value in the curve. This is typically the adjusted end date of the instrument.
date
in interface IsdaCreditCurveNode
tradeDate
- the trade daterefData
- the reference datapublic DatedParameterMetadata metadata(LocalDate nodeDate)
IsdaCreditCurveNode
The node date must be computed by IsdaCreditCurveNode.date(LocalDate, ReferenceData)
.
metadata
in interface IsdaCreditCurveNode
nodeDate
- the node date used when calibrating the curvepublic CdsCalibrationTrade trade(double quantity, MarketData marketData, ReferenceData refData)
This uses the observed market data to build the CDS trade that the node represents. The resulting trade is not resolved. The notional of the trade is taken from the 'quantity' variable. The quantity is signed and will affect whether the trade is Buy or Sell. The valuation date is defined by the market data.
quantity
- the quantity or notional of the trademarketData
- the market data required to build a trade for the instrument, including the valuation daterefData
- the reference data, used to resolve the trade datespublic static CdsIsdaCreditCurveNode.Meta meta()
CdsIsdaCreditCurveNode
.public static CdsIsdaCreditCurveNode.Builder builder()
public CdsIsdaCreditCurveNode.Meta metaBean()
metaBean
in interface org.joda.beans.Bean
public CdsTemplate getTemplate()
public String getLabel()
When building, this will default based on template
if not specified.
getLabel
in interface IsdaCreditCurveNode
public ObservableId getObservableId()
getObservableId
in interface IsdaCreditCurveNode
public StandardId getLegalEntityId()
This identifier is used for the reference legal entity of the CDS.
public CdsQuoteConvention getQuoteConvention()
The CDS is quoted in par spread, points upfront or quoted spread.
See CdsQuoteConvention
for detail.
public OptionalDouble getFixedRate()
This must be represented in decimal form.
public CdsIsdaCreditCurveNode.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.