#include "cgeneral.h"
#include "bastypes.h"
#include "dtlist.h"
Functions | |
TDateList * | JpmcdsNewDateList (TDate startDate, TDate maturityDate, TDateInterval *interval, TBoolean stubAtEnd) |
Makes an array of dates from startDate, MaturityDate, & interval. | |
TDateList * | JpmcdsNewDateListExtended (TDate startDate, TDate maturityDate, TDateInterval *interval, TBoolean stubAtEnd) |
Makes an array of dates using startDate, MaturityDate, & interval. | |
TDateList * | JpmcdsNewDateListExtendedRoll (TDate startDate, TDate maturityDate, TDate rollDate, TDateInterval *interval, TBoolean stubAtEnd) |
Makes an array of dates using startDate, MaturityDate, rollDate & interval. | |
TDateList * | JpmcdsNewDateListFromTCurve (TCurve *curve) |
Allocates a new TDateList and copies supplied dates into it from supplied TCurve. | |
TDateList * | JpmcdsNewPayDates (TDate startDate, TDate matDate, TDateInterval *payInterval, TBoolean stubAtEnd) |
Allocates a new TDateList by calling JpmcdsNewDateList, and then removing the startDate. | |
TDateList * | JpmcdsNewDateListBusDayAdj (TDateList *dateList, long badDayConv, char *holidayFile) |
Creates a new business-day adjusted dateList from an UN-adjusted datelist, using the supplied busisness day adjustment convention. | |
int | JpmcdsDateListBusDayAdj (TDateList *dateList, long badDayConv, char *holidayFile) |
Adjusts a datelist (in-place) according to the supplied business day adjustment convention. |
int JpmcdsDateListBusDayAdj | ( | TDateList * | dateList, | |
long | badDayConv, | |||
char * | holidayFile | |||
) |
Adjusts a datelist (in-place) according to the supplied business day adjustment convention.
dateList | (I/O) Date list to adjust (in-place) | |
badDayConv | (I) See JpmcdsBusinessDay | |
holidayFile | (I) Holiday date file |
TDateList* JpmcdsNewDateList | ( | TDate | startDate, | |
TDate | maturityDate, | |||
TDateInterval * | interval, | |||
TBoolean | stubAtEnd | |||
) |
Makes an array of dates from startDate, MaturityDate, & interval.
If (maturityDate-startDate) divided by interval is not an integer, there is a stub. If stubAtEnd is set, the stub is placed at the end; otherwise, it is placed at the beginning. Unlike JpmcdsNewDateListExtended, the startDate and maturityDate are always included, and are the first and last dates respectively. Assuming there is no stub, dates created are of the form: baseDate + idx*Interval, where startIdx <= idx <= Time2Maturity/Interval Returns a new DateList on success, and NULL on failure.
TDateList* JpmcdsNewDateListExtended | ( | TDate | startDate, | |
TDate | maturityDate, | |||
TDateInterval * | interval, | |||
TBoolean | stubAtEnd | |||
) |
Makes an array of dates using startDate, MaturityDate, & interval.
If time2Maturity/interval is not an integer, there is a stub. If stubAtEnd is set, the stub is placed at the end; otherwise, it is placed at the beginning. If there is a stub at the END, the MaturityDate is NOT included in the list; but the NEXT date is. If there is a stub at the BEGINNING, the startDate is NOT included in the list; but the PREVIOUS date is. This is necessary for Actual/Actual stub calculation. Assuming there is no stub, dates created are of the form: baseDate + idx*Interval, where startIdx <= idx <= Time2Maturity/Interval Returns a new DateList on success, and NULL on failure.
TDateList* JpmcdsNewDateListExtendedRoll | ( | TDate | startDate, | |
TDate | maturityDate, | |||
TDate | rollDate, | |||
TDateInterval * | interval, | |||
TBoolean | stubAtEnd | |||
) |
Makes an array of dates using startDate, MaturityDate, rollDate & interval.
If rollDate is non-zero and stubAtEnd is False, then the rollDate is used to generate cash flow dates. First starting from roll-date we see if we can count forward an integral number of intervals to the maturity date. If this is so then we can generate our datelist by counting forward from the rolldate.
Returns a new DateList on success, and NULL on failure.