Class CdsIndexIsdaCreditCurveNode
- java.lang.Object
-
- com.opengamma.strata.market.curve.node.CdsIndexIsdaCreditCurveNode
-
- All Implemented Interfaces:
IsdaCreditCurveNode,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class CdsIndexIsdaCreditCurveNode extends Object implements IsdaCreditCurveNode, org.joda.beans.ImmutableBean, Serializable
An ISDA compliant curve node whose instrument is a CDS index.The trade produced by the node will be a protection payer (BUY) for a positive quantity and a protection receiver (SELL) for a negative quantity.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCdsIndexIsdaCreditCurveNode.BuilderThe bean-builder forCdsIndexIsdaCreditCurveNode.static classCdsIndexIsdaCreditCurveNode.MetaThe meta-bean forCdsIndexIsdaCreditCurveNode.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CdsIndexIsdaCreditCurveNode.Builderbuilder()Returns a builder used to create an instance of the bean.LocalDatedate(LocalDate tradeDate, ReferenceData refData)Calculates the date associated with the node.booleanequals(Object obj)StandardIdgetCdsIndexId()Gets the CDS index identifier.OptionalDoublegetFixedRate()Gets the fixed coupon rate.StringgetLabel()Gets the label to use for the node.ImmutableList<StandardId>getLegalEntityIds()Gets the legal entity identifiers.ObservableIdgetObservableId()Gets the identifier of the market data value that provides the quoted value.CdsQuoteConventiongetQuoteConvention()Gets the market quote convention.CdsTemplategetTemplate()Gets the template for the single names associated with this node.inthashCode()static CdsIndexIsdaCreditCurveNode.Metameta()The meta-bean forCdsIndexIsdaCreditCurveNode.CdsIndexIsdaCreditCurveNode.MetametaBean()DatedParameterMetadatametadata(LocalDate nodeDate)Returns metadata for the node from the node date.static CdsIndexIsdaCreditCurveNodeofParSpread(CdsTemplate template, ObservableId observableId, StandardId cdsIndexId, List<StandardId> legalEntityIds)Returns a curve node with par spread convention.static CdsIndexIsdaCreditCurveNodeofPointsUpfront(CdsTemplate template, ObservableId observableId, StandardId cdsIndexId, List<StandardId> legalEntityIds, Double fixedRate)Returns a curve node with points upfront convention.static CdsIndexIsdaCreditCurveNodeofQuotedSpread(CdsTemplate template, ObservableId observableId, StandardId cdsIndexId, List<StandardId> legalEntityIds, Double fixedRate)Returns a curve node with quoted spread convention.CdsIndexIsdaCreditCurveNode.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()CdsIndexCalibrationTradetrade(double quantity, MarketData marketData, ReferenceData refData)Creates a trade representing the CDS index at the node.
-
-
-
Method Detail
-
ofParSpread
public static CdsIndexIsdaCreditCurveNode ofParSpread(CdsTemplate template, ObservableId observableId, StandardId cdsIndexId, List<StandardId> legalEntityIds)
Returns a curve node with par spread convention.- Parameters:
template- the templateobservableId- the observable IDcdsIndexId- the CDS index IDlegalEntityIds- the legal entity IDs- Returns:
- the curve node
-
ofPointsUpfront
public static CdsIndexIsdaCreditCurveNode ofPointsUpfront(CdsTemplate template, ObservableId observableId, StandardId cdsIndexId, List<StandardId> legalEntityIds, Double fixedRate)
Returns a curve node with points upfront convention.- Parameters:
template- the templateobservableId- the observable IDcdsIndexId- the CDS index IDlegalEntityIds- the legal entity IDsfixedRate- the fixed rate- Returns:
- the curve node
-
ofQuotedSpread
public static CdsIndexIsdaCreditCurveNode ofQuotedSpread(CdsTemplate template, ObservableId observableId, StandardId cdsIndexId, List<StandardId> legalEntityIds, Double fixedRate)
Returns a curve node with quoted spread convention.- Parameters:
template- the templateobservableId- the observable IDcdsIndexId- the CDS index IDlegalEntityIds- the legal entity IDsfixedRate- the fixed rate- Returns:
- the curve node
-
date
public LocalDate date(LocalDate tradeDate, ReferenceData refData)
Description copied from interface:IsdaCreditCurveNodeCalculates the date associated with the node.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.
- Specified by:
datein interfaceIsdaCreditCurveNode- Parameters:
tradeDate- the trade daterefData- the reference data- Returns:
- the node date
-
metadata
public DatedParameterMetadata metadata(LocalDate nodeDate)
Description copied from interface:IsdaCreditCurveNodeReturns metadata for the node from the node date.The node date must be computed by
IsdaCreditCurveNode.date(LocalDate, ReferenceData).- Specified by:
metadatain interfaceIsdaCreditCurveNode- Parameters:
nodeDate- the node date used when calibrating the curve- Returns:
- metadata for the node
-
trade
public CdsIndexCalibrationTrade trade(double quantity, MarketData marketData, ReferenceData refData)
Creates a trade representing the CDS index at the node.This uses the observed market data to build the CDS index 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.
- Parameters:
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 dates- Returns:
- a trade representing the instrument at the node
-
meta
public static CdsIndexIsdaCreditCurveNode.Meta meta()
The meta-bean forCdsIndexIsdaCreditCurveNode.- Returns:
- the meta-bean, not null
-
builder
public static CdsIndexIsdaCreditCurveNode.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public CdsIndexIsdaCreditCurveNode.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getTemplate
public CdsTemplate getTemplate()
Gets the template for the single names associated with this node.- Returns:
- the value of the property, not null
-
getLabel
public String getLabel()
Gets the label to use for the node.When building, this will default based on
templateif not specified.- Specified by:
getLabelin interfaceIsdaCreditCurveNode- Returns:
- the value of the property, not empty
-
getObservableId
public ObservableId getObservableId()
Gets the identifier of the market data value that provides the quoted value.- Specified by:
getObservableIdin interfaceIsdaCreditCurveNode- 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
-
getQuoteConvention
public CdsQuoteConvention getQuoteConvention()
Gets the market quote convention.The CDS index is quoted in par spread, points upfront or quoted spread. See
CdsQuoteConventionfor detail.- Returns:
- the value of the property, not null
-
getFixedRate
public OptionalDouble getFixedRate()
Gets the fixed coupon rate.This must be represented in decimal form.
- Returns:
- the optional value of the property, not null
-
toBuilder
public CdsIndexIsdaCreditCurveNode.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-