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 CurveMetadata
blackVolatilityByExpiry(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing Black volatility by expiry.static CurveMetadata
blackVolatilityByExpiry(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing Black volatility by expiry.static CurveMetadata
blackVolatilityByExpiry(String name, DayCount dayCount)
Creates curve metadata for a curve providing Black volatility by expiry.static CurveMetadata
correlationByExpiry(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing correlation by expiry.static CurveMetadata
correlationByExpiry(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing correlation by expiry.static CurveMetadata
correlationByExpiry(String name, DayCount dayCount)
Creates curve metadata for a curve providing correlation by expiry.static CurveMetadata
discountFactors(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing discount factors.static CurveMetadata
discountFactors(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing discount factors.static CurveMetadata
discountFactors(String name, DayCount dayCount)
Creates curve metadata for a curve providing discount factors.static CurveMetadata
forwardRates(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing forward rates.static CurveMetadata
forwardRates(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing forward rates.static CurveMetadata
forwardRates(String name, DayCount dayCount)
Creates curve metadata for a curve providing forward rates.static CurveMetadata
normalVolatilityByExpiry(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing normal volatility by expiry.static CurveMetadata
normalVolatilityByExpiry(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing normal volatility by expiry.static CurveMetadata
normalVolatilityByExpiry(String name, DayCount dayCount)
Creates curve metadata for a curve providing normal volatility by expiry.static CurveMetadata
prices(CurveName name)
Creates curve metadata for a curve providing monthly prices, typically used in inflation.static CurveMetadata
prices(CurveName name, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing monthly prices, typically used in inflation.static CurveMetadata
prices(String name)
Creates curve metadata for a curve providing monthly prices, typically used in inflation.static CurveMetadata
recoveryRates(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing recovery rates.static CurveMetadata
recoveryRates(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing recovery rates.static CurveMetadata
recoveryRates(String name, DayCount dayCount)
Creates curve metadata for a curve providing recovery rates.static CurveMetadata
sabrParameterByExpiry(CurveName name, DayCount dayCount, ValueType yType)
Creates metadata for a curve providing a SABR parameter.static CurveMetadata
sabrParameterByExpiry(CurveName name, DayCount dayCount, ValueType yType, List<? extends ParameterMetadata> parameterMetadata)
Creates metadata for a curve providing a SABR parameter.static CurveMetadata
sabrParameterByExpiry(String name, DayCount dayCount, ValueType yType)
Creates metadata for a curve providing a SABR parameter.static CurveMetadata
zeroRates(CurveName name, DayCount dayCount)
Creates curve metadata for a curve providing zero rates.static CurveMetadata
zeroRates(CurveName name, DayCount dayCount, List<? extends ParameterMetadata> parameterMetadata)
Creates curve metadata for a curve providing zero rates.static CurveMetadata
zeroRates(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
-
-