Class Curves
- java.lang.Object
-
- com.opengamma.strata.market.curve.Curves
-
public final class Curves extends Object
Helper for creating common types of curves.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CurveMetadatablackVolatilityByExpiry(CurveName name, DayCount dayCount)Creates curve metadata for a curve providing Black volatility by expiry.static CurveMetadatablackVolatilityByExpiry(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)Creates curve metadata for a curve providing Black volatility by expiry.static CurveMetadatablackVolatilityByExpiry(String name, DayCount dayCount)Creates curve metadata for a curve providing Black volatility by expiry.static CurveMetadatacorrelationByExpiry(CurveName name, DayCount dayCount)Creates curve metadata for a curve providing correlation by expiry.static CurveMetadatacorrelationByExpiry(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)Creates curve metadata for a curve providing correlation by expiry.static CurveMetadatacorrelationByExpiry(String name, DayCount dayCount)Creates curve metadata for a curve providing correlation by expiry.static CurveMetadatadiscountFactors(CurveName name, DayCount dayCount)Creates curve metadata for a curve providing discount factors.static CurveMetadatadiscountFactors(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)Creates curve metadata for a curve providing discount factors.static CurveMetadatadiscountFactors(String name, DayCount dayCount)Creates curve metadata for a curve providing discount factors.static CurveMetadataforwardRates(CurveName name, DayCount dayCount)Creates curve metadata for a curve providing forward rates.static CurveMetadataforwardRates(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)Creates curve metadata for a curve providing forward rates.static CurveMetadataforwardRates(String name, DayCount dayCount)Creates curve metadata for a curve providing forward rates.static CurveMetadatanormalVolatilityByExpiry(CurveName name, DayCount dayCount)Creates curve metadata for a curve providing normal volatility by expiry.static CurveMetadatanormalVolatilityByExpiry(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)Creates curve metadata for a curve providing normal volatility by expiry.static CurveMetadatanormalVolatilityByExpiry(String name, DayCount dayCount)Creates curve metadata for a curve providing normal volatility by expiry.static CurveMetadataprices(CurveName name)Creates curve metadata for a curve providing monthly prices, typically used in inflation.static CurveMetadataprices(CurveName name, List<? extends ParameterMetadata> parameterMetadata)Creates curve metadata for a curve providing monthly prices, typically used in inflation.static CurveMetadataprices(String name)Creates curve metadata for a curve providing monthly prices, typically used in inflation.static CurveMetadatarecoveryRates(CurveName name, DayCount dayCount)Creates curve metadata for a curve providing recovery rates.static CurveMetadatarecoveryRates(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)Creates curve metadata for a curve providing recovery rates.static CurveMetadatarecoveryRates(String name, DayCount dayCount)Creates curve metadata for a curve providing recovery rates.static CurveMetadatasabrParameterByExpiry(CurveName name, DayCount dayCount, ValueType yType)Creates metadata for a curve providing a SABR parameter.static CurveMetadatasabrParameterByExpiry(CurveName name, DayCount dayCount, ValueType yType, List<? extends ParameterMetadata> parameterMetadata)Creates metadata for a curve providing a SABR parameter.static CurveMetadatasabrParameterByExpiry(String name, DayCount dayCount, ValueType yType)Creates metadata for a curve providing a SABR parameter.static CurveMetadatazeroRates(CurveName name, DayCount dayCount)Creates curve metadata for a curve providing zero rates.static CurveMetadatazeroRates(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)Creates curve metadata for a curve providing zero rates.static CurveMetadatazeroRates(String name, DayCount dayCount)Creates curve metadata for a curve providing zero rates.
-
-
-
Method Detail
-
zeroRates
public static CurveMetadata zeroRates(String name, DayCount dayCount)
Creates curve metadata for a curve providing zero rates.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
zeroRates
public static CurveMetadata zeroRates(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing zero rates.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
zeroRates
public static CurveMetadata zeroRates(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing zero rates.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day countparameterMetadata- the parameter metadata- Returns:
- the curve metadata
-
forwardRates
public static CurveMetadata forwardRates(String name, DayCount dayCount)
Creates curve metadata for a curve providing forward rates.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
forwardRates
public static CurveMetadata forwardRates(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing forward rates.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
forwardRates
public static CurveMetadata forwardRates(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing forward rates.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day countparameterMetadata- the parameter metadata- Returns:
- the curve metadata
-
discountFactors
public static CurveMetadata discountFactors(String name, DayCount dayCount)
Creates curve metadata for a curve providing discount factors.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
discountFactors
public static CurveMetadata discountFactors(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing discount factors.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
discountFactors
public static CurveMetadata discountFactors(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing discount factors.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day countparameterMetadata- the parameter metadata- Returns:
- the curve metadata
-
prices
public static CurveMetadata prices(String name)
Creates curve metadata for a curve providing monthly prices, typically used in inflation.The x-values represent months relative to an unspecified base month.
- Parameters:
name- the curve name- Returns:
- the curve metadata
-
prices
public static CurveMetadata prices(CurveName name)
Creates curve metadata for a curve providing monthly prices, typically used in inflation.The x-values represent months relative to an unspecified base month.
- Parameters:
name- the curve name- Returns:
- the curve metadata
-
prices
public static CurveMetadata prices(CurveName name, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing monthly prices, typically used in inflation.The x-values represent months relative to an unspecified base month.
- Parameters:
name- the curve nameparameterMetadata- the parameter metadata- Returns:
- the curve metadata
-
blackVolatilityByExpiry
public static CurveMetadata blackVolatilityByExpiry(String name, DayCount dayCount)
Creates curve metadata for a curve providing Black volatility by expiry.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
blackVolatilityByExpiry
public static CurveMetadata blackVolatilityByExpiry(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing Black volatility by expiry.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
blackVolatilityByExpiry
public static CurveMetadata blackVolatilityByExpiry(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing Black volatility by expiry.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day countparameterMetadata- the parameter metadata- Returns:
- the curve metadata
-
normalVolatilityByExpiry
public static CurveMetadata normalVolatilityByExpiry(String name, DayCount dayCount)
Creates curve metadata for a curve providing normal volatility by expiry.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
normalVolatilityByExpiry
public static CurveMetadata normalVolatilityByExpiry(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing normal volatility by expiry.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
normalVolatilityByExpiry
public static CurveMetadata normalVolatilityByExpiry(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing normal volatility by expiry.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day countparameterMetadata- the parameter metadata- Returns:
- the curve metadata
-
recoveryRates
public static CurveMetadata recoveryRates(String name, DayCount dayCount)
Creates curve metadata for a curve providing recovery rates.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
recoveryRates
public static CurveMetadata recoveryRates(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing recovery rates.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
recoveryRates
public static CurveMetadata recoveryRates(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing recovery rates.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day countparameterMetadata- the parameter metadata- Returns:
- the curve metadata
-
sabrParameterByExpiry
public static CurveMetadata sabrParameterByExpiry(String name, DayCount dayCount, ValueType yType)
Creates metadata for a curve providing a SABR parameter.The x-values represent time to expiry year fractions as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day countyType- the y-value type, which must be one of the four SABR values- Returns:
- the curve metadata
-
sabrParameterByExpiry
public static CurveMetadata sabrParameterByExpiry(CurveName name, DayCount dayCount, ValueType yType)
Creates metadata for a curve providing a SABR parameter.The x-values represent time to expiry year fractions as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day countyType- the y-value type, which must be one of the four SABR values- Returns:
- the curve metadata
-
sabrParameterByExpiry
public static CurveMetadata sabrParameterByExpiry(CurveName name, DayCount dayCount, ValueType yType, List<? extends ParameterMetadata> parameterMetadata)
Creates metadata for a curve providing a SABR parameter.The x-values represent time to expiry year fractions as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day countyType- the y-value type, which must be one of the four SABR valuesparameterMetadata- the parameter metadata- Returns:
- the curve metadata
-
correlationByExpiry
public static CurveMetadata correlationByExpiry(String name, DayCount dayCount)
Creates curve metadata for a curve providing correlation by expiry.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
correlationByExpiry
public static CurveMetadata correlationByExpiry(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing correlation by expiry.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day count- Returns:
- the curve metadata
-
correlationByExpiry
public static CurveMetadata correlationByExpiry(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing correlation by expiry.The x-values represent year fractions relative to an unspecified base date as defined by the specified day count.
- Parameters:
name- the curve namedayCount- the day countparameterMetadata- the parameter metadata- Returns:
- the curve metadata
-
-