WebCab Bonds for .NET v2.01

AbstractBusinessCalendar.nextPaymentDate Method 

Returns the index of the element of an array of dates which is the date which is after and closest to a given date.

public virtual int nextPaymentDate(
   DateTime[] payments,
   DateTime date
);

Parameters

payments
an array of dates
date
the date for which the prior closest `payments' elements index is determined

Return Value

the index of the next date within the array of dates `payments' from a given `date'. @throws IllegalArgumentException if date is after the last payment date

Implements

BusinessCalendar.nextPaymentDate

Remarks

This method is useful when considering the evaluation of index/coupon yielding investments. For example, if the array represents date on which cash flows for a bond (i.e. the coupons and repayment of the principle) take place and the date considered is the settlement date after a bond purchase, then this method will be able to return the index of the element which corresponds to the date of the purchasers first coupon payment.

See Also

AbstractBusinessCalendar Class | WebCab.BusinessCalendar Namespace | Calendar) | Calendar)