Class SwaptionSurfaceExpiryTenorParameterMetadata
- java.lang.Object
-
- com.opengamma.strata.pricer.swaption.SwaptionSurfaceExpiryTenorParameterMetadata
-
- All Implemented Interfaces:
ParameterMetadata
,Serializable
,org.joda.beans.Bean
,org.joda.beans.ImmutableBean
public final class SwaptionSurfaceExpiryTenorParameterMetadata extends Object implements ParameterMetadata, org.joda.beans.ImmutableBean, Serializable
Surface node metadata for a surface node for swaptions with a specific time to expiry and underlying swap tenor.This typically represents a node of swaption volatility surface parameterized by expiry and tenor. Alternative applications include a representation of a node on model parameter surface, e.g., SABR model parameters.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SwaptionSurfaceExpiryTenorParameterMetadata.Meta
The meta-bean forSwaptionSurfaceExpiryTenorParameterMetadata
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Pair<Double,Double>
getIdentifier()
Returns an object used to identify the parameter.String
getLabel()
Gets the label that describes the node.double
getTenor()
Gets the tenor of the surface node.double
getYearFraction()
Gets the year fraction of the surface node.int
hashCode()
static SwaptionSurfaceExpiryTenorParameterMetadata.Meta
meta()
The meta-bean forSwaptionSurfaceExpiryTenorParameterMetadata
.SwaptionSurfaceExpiryTenorParameterMetadata.Meta
metaBean()
static SwaptionSurfaceExpiryTenorParameterMetadata
of(double yearFraction, double tenor)
Creates node metadata using swap convention, year fraction and strike.static SwaptionSurfaceExpiryTenorParameterMetadata
of(double yearFraction, double tenor, String label)
Creates node using swap convention, year fraction, strike and label.String
toString()
-
-
-
Method Detail
-
of
public static SwaptionSurfaceExpiryTenorParameterMetadata of(double yearFraction, double tenor)
Creates node metadata using swap convention, year fraction and strike.- Parameters:
yearFraction
- the year fractiontenor
- the tenor- Returns:
- node metadata
-
of
public static SwaptionSurfaceExpiryTenorParameterMetadata of(double yearFraction, double tenor, String label)
Creates node using swap convention, year fraction, strike and label.- Parameters:
yearFraction
- the year fractiontenor
- the tenorlabel
- the label to use- Returns:
- the metadata
-
getIdentifier
public Pair<Double,Double> getIdentifier()
Description copied from interface:ParameterMetadata
Returns 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:
getIdentifier
in interfaceParameterMetadata
- Returns:
- an object used to uniquely identify the parameter within the data
-
meta
public static SwaptionSurfaceExpiryTenorParameterMetadata.Meta meta()
The meta-bean forSwaptionSurfaceExpiryTenorParameterMetadata
.- Returns:
- the meta-bean, not null
-
metaBean
public SwaptionSurfaceExpiryTenorParameterMetadata.Meta metaBean()
- Specified by:
metaBean
in 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
-
getTenor
public double getTenor()
Gets the tenor of the surface node.This is the tenor of the underlying swap that the node on the surface is defined as.
- Returns:
- the value of the property
-
getLabel
public String getLabel()
Gets the label that describes the node.- Specified by:
getLabel
in interfaceParameterMetadata
- Returns:
- the value of the property, not empty
-
-