Class SeasonalityDefinition
- java.lang.Object
-
- com.opengamma.strata.market.curve.SeasonalityDefinition
-
- All Implemented Interfaces:
Serializable,org.joda.beans.Bean,org.joda.beans.ImmutableBean
public final class SeasonalityDefinition extends Object implements org.joda.beans.ImmutableBean, Serializable
Provides the definition of seasonality for a price index curve.The seasonality is describe by a adjustment type and the month on month adjustments. The adjustment type is usually
ShiftType.SCALED(multiplicative) orShiftType.ABSOLUTE(additive). The month on month adjustment is an array of length 12 with the first element being the adjustment from January to February, the second element being the adjustment from February to March, and so on to the 12th element being the adjustment from December to January.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSeasonalityDefinition.MetaThe meta-bean forSeasonalityDefinition.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)ShiftTypegetAdjustmentType()Gets the shift type applied to the unadjusted value and the adjustment.DoubleArraygetSeasonalityMonthOnMonth()Gets the month on month adjustment.inthashCode()static SeasonalityDefinition.Metameta()The meta-bean forSeasonalityDefinition.SeasonalityDefinition.MetametaBean()static SeasonalityDefinitionof(DoubleArray seasonalityMonthOnMonth, ShiftType adjustmentType)Obtains an instance of the seasonality.StringtoString()
-
-
-
Method Detail
-
of
public static SeasonalityDefinition of(DoubleArray seasonalityMonthOnMonth, ShiftType adjustmentType)
Obtains an instance of the seasonality.- Parameters:
seasonalityMonthOnMonth- the month-on-month seasonalityadjustmentType- the adjustment type- Returns:
- the instance
-
meta
public static SeasonalityDefinition.Meta meta()
The meta-bean forSeasonalityDefinition.- Returns:
- the meta-bean, not null
-
metaBean
public SeasonalityDefinition.Meta metaBean()
- Specified by:
metaBeanin interfaceorg.joda.beans.Bean
-
getSeasonalityMonthOnMonth
public DoubleArray getSeasonalityMonthOnMonth()
Gets the month on month adjustment.This is an array of length 12, with the first element being the adjustment from January to February, the second element being the adjustment from February to March, and so on to the 12th element being the adjustment from December to January.
- Returns:
- the value of the property, not null
-
getAdjustmentType
public ShiftType getAdjustmentType()
Gets the shift type applied to the unadjusted value and the adjustment. (value, seasonality) -> adjustmentType.applyShift(value, seasonality).- Returns:
- the value of the property, not null
-
-