WebCab Bonds for .NET v2.01

AbstractBusinessCalendar.previousPaymentDate Method 

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

public virtual int previousPaymentDate(
   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 previous date within the array of dates `payments' from a given `date'. @throws IllegalArgumentException if the date given is prior to the first date within the array of dates `payments'.

Implements

BusinessCalendar.previousPaymentDate

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 purchase/sale date of the bond. Then by determining the prior coupon payment we are able to evaluate the accrued interest which the bond holder as earned.

See Also

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