Class FxOptionVolatilitiesNode
- java.lang.Object
-
- com.opengamma.strata.measure.fxopt.FxOptionVolatilitiesNode
-
- All Implemented Interfaces:
Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class FxOptionVolatilitiesNode extends Object implements org.joda.beans.ImmutableBean, Serializable
A node in the configuration specifying how to build FX option volatilities.Each node is not necessarily associated with an instrument, but provides the necessary information to create
FxOptionVolatilities
.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FxOptionVolatilitiesNode.Builder
The bean-builder forFxOptionVolatilitiesNode
.static class
FxOptionVolatilitiesNode.Meta
The meta-bean forFxOptionVolatilitiesNode
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FxOptionVolatilitiesNode.Builder
builder()
Returns a builder used to create an instance of the bean.boolean
equals(Object obj)
BusinessDayAdjustment
getBusinessDayAdjustment()
Gets the business day adjustment to apply to the delivery date.CurrencyPair
getCurrencyPair()
Gets the currency pair.DaysAdjustment
getExpiryDateOffset()
Gets the offset of the expiry date from the delivery date.String
getLabel()
Gets the label to use for the node.QuoteId
getQuoteId()
Gets the quote ID.ValueType
getQuoteValueType()
Gets the value type of the quote.DaysAdjustment
getSpotDateOffset()
Gets the offset of the spot value date from the valuation date.Strike
getStrike()
Gets the strike.Tenor
getTenor()
Gets the tenor.int
hashCode()
static FxOptionVolatilitiesNode.Meta
meta()
The meta-bean forFxOptionVolatilitiesNode
.FxOptionVolatilitiesNode.Meta
metaBean()
FxVolatilitySurfaceYearFractionParameterMetadata
metadata(ZonedDateTime valuationDateTime, DayCount dayCount, ReferenceData refData)
Returns metadata for the node.static FxOptionVolatilitiesNode
of(CurrencyPair currencyPair, DaysAdjustment spotDateOffset, BusinessDayAdjustment businessDayAdjustment, ValueType quoteValueType, QuoteId quoteId, Tenor tenor, Strike strike)
Creates an instance.double
timeToExpiry(ZonedDateTime valuationDateTime, DayCount dayCount, ReferenceData refData)
Calculates the time to expiry for the valuation date time.FxOptionVolatilitiesNode.Builder
toBuilder()
Returns a builder that allows this bean to be mutated.String
toString()
-
-
-
Method Detail
-
of
public static FxOptionVolatilitiesNode of(CurrencyPair currencyPair, DaysAdjustment spotDateOffset, BusinessDayAdjustment businessDayAdjustment, ValueType quoteValueType, QuoteId quoteId, Tenor tenor, Strike strike)
Creates an instance.The label is created from
quoteId
.- Parameters:
currencyPair
- the currency pairspotDateOffset
- the spot date offsetbusinessDayAdjustment
- the business day adjustmentquoteValueType
- the quote value typequoteId
- the quote IDtenor
- the tenorstrike
- the strike- Returns:
- the instance
-
metadata
public FxVolatilitySurfaceYearFractionParameterMetadata metadata(ZonedDateTime valuationDateTime, DayCount dayCount, ReferenceData refData)
Returns metadata for the node.This provides curve metadata for the node at the specified valuation date.
- Parameters:
valuationDateTime
- the valuation date timedayCount
- the day countrefData
- the reference data- Returns:
- metadata for the node
-
timeToExpiry
public double timeToExpiry(ZonedDateTime valuationDateTime, DayCount dayCount, ReferenceData refData)
Calculates the time to expiry for the valuation date time.- Parameters:
valuationDateTime
- the valuation date timedayCount
- the day countrefData
- the reference data- Returns:
- the time to expiry
-
meta
public static FxOptionVolatilitiesNode.Meta meta()
The meta-bean forFxOptionVolatilitiesNode
.- Returns:
- the meta-bean, not null
-
builder
public static FxOptionVolatilitiesNode.Builder builder()
Returns a builder used to create an instance of the bean.- Returns:
- the builder, not null
-
metaBean
public FxOptionVolatilitiesNode.Meta metaBean()
- Specified by:
metaBean
in interfaceorg.joda.beans.Bean
-
getCurrencyPair
public CurrencyPair getCurrencyPair()
Gets the currency pair.The quote must be based on this currency pair and direction.
- Returns:
- the value of the property, not null
-
getLabel
public String getLabel()
Gets the label to use for the node.- Returns:
- the value of the property, not null
-
getSpotDateOffset
public DaysAdjustment getSpotDateOffset()
Gets the offset of the spot value date from the valuation date.Typically this is the same as the standard convention of the spot date offset of the underlying FX forward.
- Returns:
- the value of the property, not null
-
getBusinessDayAdjustment
public BusinessDayAdjustment getBusinessDayAdjustment()
Gets the business day adjustment to apply to the delivery date.Typically this is the same as the standard convention of the business day adjustment applied to the delivery date of the underlying FX forward.
- Returns:
- the value of the property, not null
-
getExpiryDateOffset
public DaysAdjustment getExpiryDateOffset()
Gets the offset of the expiry date from the delivery date.By default the expiry date offset is the inverse of
spotDateOffset
. In this caseBusinessDayAdjustment
inspotDateOffset
must beNONE
.- Returns:
- the value of the property, not null
-
getQuoteValueType
public ValueType getQuoteValueType()
Gets the value type of the quote.- Returns:
- the value of the property, not null
-
getQuoteId
public QuoteId getQuoteId()
Gets the quote ID.- Returns:
- the value of the property, not null
-
getTenor
public Tenor getTenor()
Gets the tenor.Typically the tenor is coherent to that of the underlying FX forward. Thus it spans the period between spot date to delivery date.
- Returns:
- the value of the property, not null
-
getStrike
public Strike getStrike()
Gets the strike.- Returns:
- the value of the property, not null
-
toBuilder
public FxOptionVolatilitiesNode.Builder toBuilder()
Returns a builder that allows this bean to be mutated.- Returns:
- the mutable builder, not null
-
-