public final class FxOptionVolatilitiesNode extends Object implements org.joda.beans.ImmutableBean, Serializable
Each node is not necessarily associated with an instrument,
but provides the necessary information to create FxOptionVolatilities.
| Modifier and Type | Class and Description |
|---|---|
static class |
FxOptionVolatilitiesNode.Builder
The bean-builder for
FxOptionVolatilitiesNode. |
static class |
FxOptionVolatilitiesNode.Meta
The meta-bean for
FxOptionVolatilitiesNode. |
| Modifier and Type | Method and 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 for
FxOptionVolatilitiesNode. |
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() |
public static FxOptionVolatilitiesNode of(CurrencyPair currencyPair, DaysAdjustment spotDateOffset, BusinessDayAdjustment businessDayAdjustment, ValueType quoteValueType, QuoteId quoteId, Tenor tenor, Strike strike)
The label is created from quoteId.
currencyPair - the currency pairspotDateOffset - the spot date offsetbusinessDayAdjustment - the business day adjustmentquoteValueType - the quote value typequoteId - the quote IDtenor - the tenorstrike - the strikepublic FxVolatilitySurfaceYearFractionParameterMetadata metadata(ZonedDateTime valuationDateTime, DayCount dayCount, ReferenceData refData)
This provides curve metadata for the node at the specified valuation date.
valuationDateTime - the valuation date timedayCount - the day countrefData - the reference datapublic double timeToExpiry(ZonedDateTime valuationDateTime, DayCount dayCount, ReferenceData refData)
valuationDateTime - the valuation date timedayCount - the day countrefData - the reference datapublic static FxOptionVolatilitiesNode.Meta meta()
FxOptionVolatilitiesNode.public static FxOptionVolatilitiesNode.Builder builder()
public FxOptionVolatilitiesNode.Meta metaBean()
metaBean in interface org.joda.beans.Beanpublic CurrencyPair getCurrencyPair()
The quote must be based on this currency pair and direction.
public String getLabel()
public DaysAdjustment getSpotDateOffset()
Typically this is the same as the standard convention of the spot date offset of the underlying FX forward.
public BusinessDayAdjustment getBusinessDayAdjustment()
Typically this is the same as the standard convention of the business day adjustment applied to the delivery date of the underlying FX forward.
public DaysAdjustment getExpiryDateOffset()
By default the expiry date offset is the inverse of spotDateOffset.
In this case BusinessDayAdjustment in spotDateOffset must be NONE.
public ValueType getQuoteValueType()
public QuoteId getQuoteId()
public Tenor getTenor()
Typically the tenor is coherent to that of the underlying FX forward. Thus it spans the period between spot date to delivery date.
public Strike getStrike()
public FxOptionVolatilitiesNode.Builder toBuilder()
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.