JMSLTM Numerical Library 6.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 date)
          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 - an int containing 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 date)
Returns the number of days in the year.

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

JMSLTM Numerical Library 6.1

Copyright © 1970-2010 Visual Numerics, Inc.
Built July 30 2010.