org.jquantlib.time
Class IMM
- java.lang.Object
-
- org.jquantlib.time.IMM
-
public class IMM extends java.lang.ObjectMain cycle of the International %Money Market (a.k.a. %IMM) months- See Also:
- International Monetary Market
-
-
Constructor Summary
Constructors Constructor and Description IMM()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static java.lang.Stringcode(Date date)Returns the IMM code for the given date (e.g.static Datedate(java.lang.String immCode)Returns Date from IMM codestatic Datedate(java.lang.String immCode, Date refDate)Returns the IMM date for the given IMM code (e.g.static booleanisIMMcode(java.lang.String in)Checks if Strings specifies a IMM code or notstatic booleanisIMMcode(java.lang.String in, boolean mainCycle)Returns whether or not the given string is an IMM codestatic booleanisIMMdate(Date date)Checks if Date is an IMM date or notstatic booleanisIMMdate(Date date, boolean mainCycle)Returns whether or not the given date is an IMM date.static java.lang.StringnextCode()Returns next main cycle IMM code from the reference datestatic java.lang.StringnextCode(Date d)Returns next cycle IMM code from the specified datestatic java.lang.StringnextCode(Date d, boolean mainCycle)Returns next cycle IMM codestatic java.lang.StringnextCode(java.lang.String immCode)Returns next main cycle IMM code from the given IMM Code.static java.lang.StringnextCode(java.lang.String immCode, boolean mainCycle)Returns next IMM code from the given IMM codestatic java.lang.StringnextCode(java.lang.String immCode, boolean mainCycle, Date referenceDate)Return next IMM code from the given IMM code and reference datestatic DatenextDate()Returns next main cycle IMM Date using Settings.getEvaluationDate as reference date.static DatenextDate(Date date)Returns next main cycle IMM Date from the specified date.static DatenextDate(Date date, boolean mainCycle)next IMM date following the given date.static DatenextDate(java.lang.String immCode)Returns next main cycle IMM date from the given IMM codestatic DatenextDate(java.lang.String immCode, boolean mainCycle)Returns next IMM date from the given IMM codestatic DatenextDate(java.lang.String IMMcode, boolean mainCycle, Date referenceDate)Next IMM date following the given IMM code
-
-
-
Method Detail
-
isIMMdate
public static boolean isIMMdate(Date date)
Checks if Date is an IMM date or not- Parameters:
date-- Returns:
-
isIMMdate
public static boolean isIMMdate(Date date, boolean mainCycle)
Returns whether or not the given date is an IMM date. For non main cycle, third Wednesday in a month is returned true,- Parameters:
date-mainCycle-- Returns:
-
isIMMcode
public static boolean isIMMcode(java.lang.String in)
Checks if Strings specifies a IMM code or not- Parameters:
in-- Returns:
-
isIMMcode
public static boolean isIMMcode(java.lang.String in, boolean mainCycle)Returns whether or not the given string is an IMM code- Parameters:
in-mainCycle-- Returns:
-
date
public static Date date(java.lang.String immCode)
Returns Date from IMM code- Parameters:
immCode-- Returns:
-
date
public static Date date(java.lang.String immCode, Date refDate)
Returns the IMM date for the given IMM code (e.g. March 20th, 2013 for H3). WhenDate.NULL_DATEis passed,Settings.getEvaluationDateis used as a reference date.- Parameters:
immCode-refDate-- Returns:
-
nextDate
public static Date nextDate()
Returns next main cycle IMM Date using Settings.getEvaluationDate as reference date.- Returns:
-
nextDate
public static Date nextDate(Date date)
Returns next main cycle IMM Date from the specified date.- Parameters:
date-- Returns:
-
nextDate
public static Date nextDate(Date date, boolean mainCycle)
next IMM date following the given date.When
Date.NULL_DATEis passed,Settings.getEvaluationDateis used as a reference date.- Parameters:
date-mainCycle-- Returns:
- the 1st delivery date for next contract listed in the International Money Market section of the Chicago Mercantile Exchange.
-
nextDate
public static Date nextDate(java.lang.String immCode)
Returns next main cycle IMM date from the given IMM code- Parameters:
immCode-- Returns:
-
nextDate
public static Date nextDate(java.lang.String immCode, boolean mainCycle)
Returns next IMM date from the given IMM code- Parameters:
immCode-mainCycle-- Returns:
-
nextDate
public static Date nextDate(java.lang.String IMMcode, boolean mainCycle, Date referenceDate)
Next IMM date following the given IMM code- Parameters:
IMMcode-mainCycle-referenceDate-- Returns:
- the 1st delivery date for next contract listed in the International Money Market section of the Chicago Mercantile Exchange.
-
nextCode
public static java.lang.String nextCode()
Returns next main cycle IMM code from the reference date- Returns:
-
nextCode
public static java.lang.String nextCode(Date d)
Returns next cycle IMM code from the specified date- Parameters:
d-- Returns:
-
nextCode
public static java.lang.String nextCode(Date d, boolean mainCycle)
Returns next cycle IMM code- Parameters:
d-mainCycle-- Returns:
- the IMM code for next contract listed in the International Money Market section of the Chicago Mercantile Exchange.
-
nextCode
public static java.lang.String nextCode(java.lang.String immCode)
Returns next main cycle IMM code from the given IMM Code.- Parameters:
immCode-- Returns:
-
nextCode
public static java.lang.String nextCode(java.lang.String immCode, boolean mainCycle)Returns next IMM code from the given IMM code- Parameters:
immCode-mainCycle-- Returns:
-
nextCode
public static java.lang.String nextCode(java.lang.String immCode, boolean mainCycle, Date referenceDate)Return next IMM code from the given IMM code and reference date- Parameters:
immCode-mainCycle-referenceDate-- Returns:
- the IMM code for next contract listed in the International Money Market section of the Chicago Mercantile Exchange.
-
code
public static java.lang.String code(Date date)
Returns the IMM code for the given date (e.g. H3 for March 20th, 2013).- Parameters:
date-- Returns:
-
-
DataMelt 3.0 © DataMelt by jWork.ORG