Package com.opengamma.strata.loader.csv
Class SeasonalityDefinitionCsvLoader
- java.lang.Object
-
- com.opengamma.strata.loader.csv.SeasonalityDefinitionCsvLoader
-
public final class SeasonalityDefinitionCsvLoader extends Object
Loads a set of seasonality definitions into memory by reading from CSV resources.The CSV file has the following header row:
Curve Name,Shift Type,Jan-Feb,Feb-Mar,Mar-Apr,Apr-May,May-Jun,Jun-Jul,Jul-Aug,Aug-Sep,Sep-Oct,Oct-Nov,Nov-Dec,Dec-Jan
.- The 'Curve Name' column is the name of the curve.
- The 'Shift Type' column is the type of the shift, "Scaled" (multiplicative) or "Absolute" (additive).
- The 'Jan-Feb' and similar columns are the seasonality values month-on-month.
CSV files sometimes contain a Unicode Byte Order Mark. Callers are responsible for handling this, such as by using
UnicodeBom
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Map<CurveName,SeasonalityDefinition>
loadSeasonalityDefinitions(ResourceLocator resource)
Loads the seasonality definition CSV file.static Map<CurveName,SeasonalityDefinition>
parseSeasonalityDefinitions(CharSource charSource)
Parses the seasonality definition CSV file.
-
-
-
Method Detail
-
loadSeasonalityDefinitions
public static Map<CurveName,SeasonalityDefinition> loadSeasonalityDefinitions(ResourceLocator resource)
Loads the seasonality definition CSV file.- Parameters:
resource
- the seasonality CSV resource- Returns:
- the map of seasonality definitions
-
parseSeasonalityDefinitions
public static Map<CurveName,SeasonalityDefinition> parseSeasonalityDefinitions(CharSource charSource)
Parses the seasonality definition CSV file.- Parameters:
charSource
- the seasonality CSV character source- Returns:
- the map of seasonality definitions
-
-