Class OvernightFutureCurveNode
- java.lang.Object
- 
- com.opengamma.strata.market.curve.node.OvernightFutureCurveNode
 
- 
- All Implemented Interfaces:
- CurveNode,- Serializable,- org.joda.beans.Bean,- org.joda.beans.ImmutableBean
 
 public final class OvernightFutureCurveNode extends Object implements CurveNode, org.joda.beans.ImmutableBean, Serializable A curve node whose instrument is an Overnight Future.The trade produced by the node will be a long for a positive quantity and a short for a negative quantity. This convention is line with other nodes where a positive quantity is similar to long a bond or deposit. - See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classOvernightFutureCurveNode.BuilderThe bean-builder forOvernightFutureCurveNode.static classOvernightFutureCurveNode.MetaThe meta-bean forOvernightFutureCurveNode.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OvernightFutureCurveNode.Builderbuilder()Returns a builder used to create an instance of the bean.LocalDatedate(LocalDate valuationDate, ReferenceData refData)Calculates the date associated with the node.booleanequals(Object obj)doublegetAdditionalSpread()Gets the additional spread added to the price.CurveNodeDategetDate()Gets the method by which the date of the node is calculated, defaulted to 'End'.CurveNodeDateOrdergetDateOrder()Gets the date order rules, used to ensure that the dates in the curve are in order.StringgetLabel()Gets the label to use for the node, may be empty.QuoteIdgetRateId()Gets the identifier of the market data value which provides the price.OvernightFutureTemplategetTemplate()Gets the template for the Overnight Futures associated with this node.inthashCode()doubleinitialGuess(MarketData marketData, ValueType valueType)Gets the initial guess used for calibrating the node.static OvernightFutureCurveNode.Metameta()The meta-bean forOvernightFutureCurveNode.OvernightFutureCurveNode.MetametaBean()DatedParameterMetadatametadata(LocalDate valuationDate, ReferenceData refData)Returns metadata for the node.static OvernightFutureCurveNodeof(OvernightFutureTemplate template, QuoteId rateId)Obtains a curve node for an Overnight Future using the specified contract and rate key.static OvernightFutureCurveNodeof(OvernightFutureTemplate template, QuoteId rateId, double additionalSpread)Obtains a curve node for an Overnight Future using the specified contract, rate key and spread.static OvernightFutureCurveNodeof(OvernightFutureTemplate template, QuoteId rateId, double additionalSpread, String label)Obtains a curve node for an Overnight Future using the specified contract, rate key, spread and label.Set<ObservableId>requirements()Determines the market data that is required by the node.ResolvedOvernightFutureTraderesolvedTrade(double quantity, MarketData marketData, ReferenceData refData)Creates a resolved trade representing the instrument at the node.ResolvedOvernightFutureTradesampleResolvedTrade(LocalDate valuationDate, FxRateProvider fxProvider, ReferenceData refData)Creates a resolved trade representing the instrument at the node.OvernightFutureCurveNode.BuildertoBuilder()Returns a builder that allows this bean to be mutated.StringtoString()OvernightFutureTradetrade(double quantity, MarketData marketData, ReferenceData refData)Creates a trade representing the instrument at the node.OvernightFutureCurveNodewithDate(CurveNodeDate date)Returns a copy of this node with the specified date.
 
- 
- 
- 
Method Detail- 
ofpublic static OvernightFutureCurveNode of(OvernightFutureTemplate template, QuoteId rateId) Obtains a curve node for an Overnight Future using the specified contract and rate key.- Parameters:
- template- the template used for building the instrument for the node
- rateId- the identifier of the market rate for the security
- Returns:
- a node whose instrument is built from the template using a market rate
 
 - 
ofpublic static OvernightFutureCurveNode of(OvernightFutureTemplate template, QuoteId rateId, double additionalSpread) Obtains a curve node for an Overnight Future using the specified contract, rate key and spread.- Parameters:
- template- the template used for building the instrument for the node
- rateId- the identifier of the market rate for the security
- additionalSpread- the additional spread amount added to the rate
- Returns:
- a node whose instrument is built from the template using a market rate
 
 - 
ofpublic static OvernightFutureCurveNode of(OvernightFutureTemplate template, QuoteId rateId, double additionalSpread, String label) Obtains a curve node for an Overnight Future using the specified contract, rate key, spread and label.- Parameters:
- template- the template used for building the instrument for the node
- rateId- the identifier of the market rate for the security
- additionalSpread- the additional spread amount added to the rate
- label- the label to use for the node, if empty an appropriate default label will be generated
- Returns:
- a node whose instrument is built from the template using a market rate
 
 - 
requirementspublic Set<ObservableId> requirements() Description copied from interface:CurveNodeDetermines the market data that is required by the node.This returns the market data needed to build the trade that the node represents. - Specified by:
- requirementsin interface- CurveNode
- Returns:
- requirements for the market data needed to build a trade representing the instrument at the node
 
 - 
datepublic LocalDate date(LocalDate valuationDate, ReferenceData refData) Description copied from interface:CurveNodeCalculates the date associated with the node.Each curve node has an associated date which defines the x-value in the curve. This date is visible in the parameter metadata. 
 - 
metadatapublic DatedParameterMetadata metadata(LocalDate valuationDate, ReferenceData refData) Description copied from interface:CurveNodeReturns metadata for the node.This provides curve metadata for the node at the specified valuation date. 
 - 
tradepublic OvernightFutureTrade trade(double quantity, MarketData marketData, ReferenceData refData) Description copied from interface:CurveNodeCreates a trade representing the instrument at the node.This uses the observed market data to build the trade that the node represents. The reference data is typically used to find the start date of the trade from the valuation date. 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. - Specified by:
- tradein interface- CurveNode
- Parameters:
- quantity- the quantity or notional of the trade
- marketData- the market data required to build a trade for the instrument, including the valuation date
- refData- the reference data, used to resolve the trade dates
- Returns:
- a trade representing the instrument at the node
 
 - 
resolvedTradepublic ResolvedOvernightFutureTrade resolvedTrade(double quantity, MarketData marketData, ReferenceData refData) Description copied from interface:CurveNodeCreates a resolved trade representing the instrument at the node.This uses the observed market data to build the trade that the node represents. The trade is then resolved using the specified reference data if necessary. The valuation date is defined by the market data. Resolved objects may be bound to data that changes over time, such as holiday calendars. If the data changes, such as the addition of a new holiday, the resolved form will not be updated. Care must be taken when placing the resolved form in a cache or persistence layer. - Specified by:
- resolvedTradein interface- CurveNode
- Parameters:
- quantity- the quantity or notional of the trade
- marketData- the market data required to build a trade for the instrument, including the valuation date
- refData- the reference data, used to resolve the trade
- Returns:
- a trade representing the instrument at the node
 
 - 
sampleResolvedTradepublic ResolvedOvernightFutureTrade sampleResolvedTrade(LocalDate valuationDate, FxRateProvider fxProvider, ReferenceData refData) Description copied from interface:CurveNodeCreates a resolved trade representing the instrument at the node.This uses an arbitrary quantity, typically 1, and an arbitrary market data quote, typically 0, to create a trade. This is useful when the trade is to be used to calculate the current par value. The FX provider is typically only used for cross-currency trades. In many cases, FxRateProvider.minimal()can be passed in.Resolved objects may be bound to data that changes over time, such as holiday calendars. If the data changes, such as the addition of a new holiday, the resolved form will not be updated. Care must be taken when placing the resolved form in a cache or persistence layer. - Specified by:
- sampleResolvedTradein interface- CurveNode
- Parameters:
- valuationDate- the valuation date
- fxProvider- the FX rate provider
- refData- the reference data, used to resolve the trade
- Returns:
- a trade representing the instrument at the node
 
 - 
initialGuesspublic double initialGuess(MarketData marketData, ValueType valueType) Description copied from interface:CurveNodeGets the initial guess used for calibrating the node.This uses the observed market data to select a suitable initial guess. For example, a Fixed-Ibor swap would return the market quote, which is the fixed rate, providing that the value type is 'ZeroRate'. The valuation date is defined by the market data. This is primarily used as a performance hint. Since the guess is refined by calibration, in most cases any suitable number can be returned, such as zero. - Specified by:
- initialGuessin interface- CurveNode
- Parameters:
- marketData- the market data required to build a trade for the instrument, including the valuation date
- valueType- the type of y-value that the curve will contain
- Returns:
- the initial guess of the calibrated value
 
 - 
withDatepublic OvernightFutureCurveNode withDate(CurveNodeDate date) Returns a copy of this node with the specified date.- Parameters:
- date- the date to use
- Returns:
- the node based on this node with the specified date
 
 - 
metapublic static OvernightFutureCurveNode.Meta meta() The meta-bean forOvernightFutureCurveNode.- Returns:
- the meta-bean, not null
 
 - 
builderpublic static OvernightFutureCurveNode.Builder builder() Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
 
 - 
metaBeanpublic OvernightFutureCurveNode.Meta metaBean() - Specified by:
- metaBeanin interface- org.joda.beans.Bean
 
 - 
getTemplatepublic OvernightFutureTemplate getTemplate() Gets the template for the Overnight Futures associated with this node. The contract specification of the future.- Returns:
- the value of the property, not null
 
 - 
getRateIdpublic QuoteId getRateId() Gets the identifier of the market data value which provides the price.- Returns:
- the value of the property, not null
 
 - 
getAdditionalSpreadpublic double getAdditionalSpread() Gets the additional spread added to the price. This amount is directly added to the price, where 0.993 represents a 0.7% rate.- Returns:
- the value of the property
 
 - 
getLabelpublic String getLabel() Gets the label to use for the node, may be empty.If empty, a default label will be created when the metadata is built. The default label depends on the valuation date, so cannot be created in the node. 
 - 
getDatepublic CurveNodeDate getDate() Gets the method by which the date of the node is calculated, defaulted to 'End'.- Returns:
- the value of the property
 
 - 
getDateOrderpublic CurveNodeDateOrder getDateOrder() Gets the date order rules, used to ensure that the dates in the curve are in order. If not specified, this will default toCurveNodeDateOrder.DEFAULT.- Specified by:
- getDateOrderin interface- CurveNode
- Returns:
- the value of the property, not null
 
 - 
toBuilderpublic OvernightFutureCurveNode.Builder toBuilder() Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
 
 
- 
 
-