net.objectlab.kit.datecalc.common
Interface IMMDateCalculator<E>

Package class diagram package IMMDateCalculator
Type Parameters:
E - a representation of a date, typically JDK: Date, Calendar; Joda:LocalDate, YearMonthDay
All Known Implementing Classes:
AbstractIMMDateCalculator

public interface IMMDateCalculator<E>

The IMMDates are defined as the 3rd Wednesday of March, June, September and December.

Version:
$Revision: 200 $ $Date: 2006-10-10 16:15:58 -0400 (Tue, 10 Oct 2006) $
Author:
Benoit Xhenseval, $LastChangedBy: benoitx $

Method Summary
 List<E> getIMMDates(E start, E end)
          Returns a list of IMM dates between 2 dates, it will exclude the start date if it is an IMM date but would include the end date if it is an IMM (same as as calling getIMMDates(start,end,IMMPeriod.QUARTERLY)).
 List<E> getIMMDates(E start, E end, IMMPeriod period)
          Returns a list of IMM dates between 2 dates, it will exclude the start date if it is an IMM date but would include the end date if it is an IMM.
 E getNextIMMDate(E startDate)
          Given a start date, it will return the next IMM Date, even if the start date is an IMM date (same as calling getNextIMMDate(IMMPeriod.QUARTERLY)).
 E getNextIMMDate(E startDate, IMMPeriod period)
          Given a start date, it will return the next IMM Date based on the IMMPeriod, even if the start date is an IMM date.
 E getPreviousIMMDate(E startDate)
          Given a start date, it will return the previous IMM Date, even if the start date is an IMM date.
 E getPreviousIMMDate(E startDate, IMMPeriod period)
          Given a start date, it will return the previous IMM Date based on the IMMPeriod, even if the start date is an IMM date.
 boolean isIMMDate(E date)
          Checks if a given date is an official IMM Date (3rd Wednesdays of March/June/Sept/Dec.
 

Method Detail

isIMMDate

boolean isIMMDate(E date)
Checks if a given date is an official IMM Date (3rd Wednesdays of March/June/Sept/Dec.

Parameters:
date -
Returns:
true if that date is an IMM date.

getNextIMMDate

E getNextIMMDate(E startDate)
Given a start date, it will return the next IMM Date, even if the start date is an IMM date (same as calling getNextIMMDate(IMMPeriod.QUARTERLY)).

Parameters:
startDate -
Returns:
the next IMMDate based on current business date.

getNextIMMDate

E getNextIMMDate(E startDate,
                 IMMPeriod period)
Given a start date, it will return the next IMM Date based on the IMMPeriod, even if the start date is an IMM date.

Parameters:
startDate -
period - specify when the "next" IMM is, if quarterly then it is the conventional algorithm.
Returns:
the next IMMDate based on current date.

getPreviousIMMDate

E getPreviousIMMDate(E startDate)
Given a start date, it will return the previous IMM Date, even if the start date is an IMM date.

Parameters:
startDate -
Returns:
the previous IMMDate based on current date.

getPreviousIMMDate

E getPreviousIMMDate(E startDate,
                     IMMPeriod period)
Given a start date, it will return the previous IMM Date based on the IMMPeriod, even if the start date is an IMM date.

Parameters:
period - specify when the "previous" IMM is, if quarterly then it is the conventional algorithm.
Returns:
the previous IMMDate based on current date.

getIMMDates

List<E> getIMMDates(E start,
                    E end)
Returns a list of IMM dates between 2 dates, it will exclude the start date if it is an IMM date but would include the end date if it is an IMM (same as as calling getIMMDates(start,end,IMMPeriod.QUARTERLY)).

Parameters:
start - start of the interval, excluded
end - end of the interval, may be included.
Returns:
list of IMM dates

getIMMDates

List<E> getIMMDates(E start,
                    E end,
                    IMMPeriod period)
Returns a list of IMM dates between 2 dates, it will exclude the start date if it is an IMM date but would include the end date if it is an IMM.

Parameters:
start - start of the interval, excluded
end - end of the interval, may be included.
period - specify when the "next" IMM is, if quarterly then it is the conventional algorithm.
Returns:
list of IMM dates


Copyright © 2006-2010 Appendium - Portfolio Financing Platform. All Rights Reserved.