JMSLTM Numerical Library 5.0.1

com.imsl.finance
Interface BasisPart


public interface BasisPart

Component of DayCountBasis. The day count basis consists of a month basis and a yearly basis. Each of these components implements this interface.

See Also:
DayCountBasis

Method Summary
 int daysBetween(GregorianCalendar date1, GregorianCalendar date2)
          Returns the number of days from date1 to date2.
 double daysInPeriod(GregorianCalendar date, int frequency)
          Returns the number of days in a coupon period.
 int getDaysInYear(GregorianCalendar settlement, GregorianCalendar maturity)
          Returns the number of days in the year.
 

Method Detail

daysBetween

int daysBetween(GregorianCalendar date1,
                GregorianCalendar date2)
Returns the number of days from date1 to date2.

Parameters:
date1 - a GregorianCalendar which specifies the initial date
date2 - a GregorianCalendar which specifies the final date
Returns:
an int indicating the number of days from date1 to date2.

daysInPeriod

double daysInPeriod(GregorianCalendar date,
                    int frequency)
Returns the number of days in a coupon period.

Parameters:
date - a GregorianCalendar which specifies the final date of the coupon period
frequency - is the number of coupon periods per year. This is typically 1, 2 or 4.
Returns:
an int which specifies the number of days in the coupon period

getDaysInYear

int getDaysInYear(GregorianCalendar settlement,
                  GregorianCalendar maturity)
Returns the number of days in the year.

Parameters:
settlement - a GregorianCalendar date which specifies the settlement date
maturity - a GregorianCalendar date which specifies the maturity date
Returns:
an int which specifies the number of days in the year

JMSLTM Numerical Library 5.0.1

Copyright © 1970-2008 Visual Numerics, Inc.
Built July 8 2008.