Class FxVolatilitySurfaceYearFractionParameterMetadata
- java.lang.Object
-
- com.opengamma.strata.pricer.fxopt.FxVolatilitySurfaceYearFractionParameterMetadata
-
- All Implemented Interfaces:
ParameterMetadata,Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class FxVolatilitySurfaceYearFractionParameterMetadata extends Object implements ParameterMetadata, org.joda.beans.ImmutableBean, Serializable
Surface node metadata for a surface node with a specific time to expiry and strike.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFxVolatilitySurfaceYearFractionParameterMetadata.MetaThe meta-bean forFxVolatilitySurfaceYearFractionParameterMetadata.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)CurrencyPairgetCurrencyPair()Gets the currency pair that describes the node.Pair<Double,Strike>getIdentifier()Returns an object used to identify the parameter.StringgetLabel()Gets the label that describes the node.StrikegetStrike()Gets the strike of the surface node.doublegetYearFraction()Gets the year fraction of the surface node.Optional<Tenor>getYearFractionTenor()Gets the tenor associated with the year fraction.inthashCode()static FxVolatilitySurfaceYearFractionParameterMetadata.Metameta()The meta-bean forFxVolatilitySurfaceYearFractionParameterMetadata.FxVolatilitySurfaceYearFractionParameterMetadata.MetametaBean()static FxVolatilitySurfaceYearFractionParameterMetadataof(double yearFraction, Tenor yearFractionTenor, Strike strike, CurrencyPair currencyPair)Creates node metadata using year fraction, associated tenor, strike and currency pair.static FxVolatilitySurfaceYearFractionParameterMetadataof(double yearFraction, Tenor yearFractionTenor, Strike strike, String label, CurrencyPair currencyPair)Creates node using year fraction, associated tenor, strike, label and currency pair.static FxVolatilitySurfaceYearFractionParameterMetadataof(double yearFraction, Strike strike, CurrencyPair currencyPair)Creates node metadata using year fraction, strike and currency pair.static FxVolatilitySurfaceYearFractionParameterMetadataof(double yearFraction, Strike strike, String label, CurrencyPair currencyPair)Creates node using year fraction, strike, label and currency pair.StringtoString()
-
-
-
Method Detail
-
of
public static FxVolatilitySurfaceYearFractionParameterMetadata of(double yearFraction, Strike strike, CurrencyPair currencyPair)
Creates node metadata using year fraction, strike and currency pair.- Parameters:
yearFraction- the year fractionstrike- the strikecurrencyPair- the currency pair- Returns:
- node metadata
-
of
public static FxVolatilitySurfaceYearFractionParameterMetadata of(double yearFraction, Tenor yearFractionTenor, Strike strike, CurrencyPair currencyPair)
Creates node metadata using year fraction, associated tenor, strike and currency pair.- Parameters:
yearFraction- the year fractionyearFractionTenor- the tenor associated with year fractionstrike- the strikecurrencyPair- the currency pair- Returns:
- node metadata
-
of
public static FxVolatilitySurfaceYearFractionParameterMetadata of(double yearFraction, Strike strike, String label, CurrencyPair currencyPair)
Creates node using year fraction, strike, label and currency pair.- Parameters:
yearFraction- the year fractionstrike- the strikelabel- the label to usecurrencyPair- the currency pair- Returns:
- the metadata
-
of
public static FxVolatilitySurfaceYearFractionParameterMetadata of(double yearFraction, Tenor yearFractionTenor, Strike strike, String label, CurrencyPair currencyPair)
Creates node using year fraction, associated tenor, strike, label and currency pair.- Parameters:
yearFraction- the year fractionyearFractionTenor- the tenor associated with year fractionstrike- the strikelabel- the label to usecurrencyPair- the currency pair- Returns:
- the metadata
-
getIdentifier
public Pair<Double,Strike> getIdentifier()
Description copied from interface:ParameterMetadataReturns an object used to identify the parameter.A good choice of identifier is one that makes sense to the user and can easily be created as part of a scenario definition. For example, many nodes types are naturally identified by a tenor.
The identifier must satisfy the following criteria:
- It must be non-null
- It should be unique within a single data set
- It should have a sensible implementation of
hashCode()andequals().
- Specified by:
getIdentifierin interfaceParameterMetadata- Returns:
- an object used to uniquely identify the parameter within the data
-
meta
public static FxVolatilitySurfaceYearFractionParameterMetadata.Meta meta()
The meta-bean forFxVolatilitySurfaceYearFractionParameterMetadata.- Returns:
- the meta-bean, not null
-
metaBean
public FxVolatilitySurfaceYearFractionParameterMetadata.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getYearFraction
public double getYearFraction()
Gets the year fraction of the surface node.This is the time to expiry that the node on the surface is defined as. There is not necessarily a direct relationship with a date from an underlying instrument.
- Returns:
- the value of the property
-
getYearFractionTenor
public Optional<Tenor> getYearFractionTenor()
Gets the tenor associated with the year fraction.- Returns:
- the optional value of the property, not null
-
getStrike
public Strike getStrike()
Gets the strike of the surface node.This is the strike that the node on the surface is defined as.
- Returns:
- the value of the property, not null
-
getCurrencyPair
public CurrencyPair getCurrencyPair()
Gets the currency pair that describes the node.- Returns:
- the value of the property, not null
-
getLabel
public String getLabel()
Gets the label that describes the node.- Specified by:
getLabelin interfaceParameterMetadata- Returns:
- the value of the property, not empty
-
-