cdate.h File Reference

#include "cgeneral.h"

Data Structures

struct  TDateInterval
 Definition of a date interval. More...
struct  TDateList
 A list of dates. More...
struct  TDateAdjIntvl
 A holiday-adjusted date interval. More...


#define MAX_DAYS_PER_MONTH   31
#define JPMCDS_DAYS_PER_YEAR   365
#define JPMCDS_YEARS_PER_DAY   (1./365.)
#define SET_TDATE_INTERVAL(di, periods, period_type)
#define TDATE_INTERVALS_EQUAL(d1, d2)   ((d1).prd == (d2).prd && (d1).prd_typ == (d2).prd_typ)
#define JPMCDS_SET_ADJ_INTERVAL_DAYS(adjIntval, days)


typedef long int TDate
 The integer type representing dates.
typedef double TDateTime
 The value of TDate with any fractional part being a fraction of elapsed day.

Detailed Description

Define Documentation

days   ) 


adjIntval.interval.prd = days;             \
adjIntval.interval.prd_typ = 'D';          \
adjIntval.holidayFile = NULL;              \
adjIntval.badDayConv = JPMCDS_BAD_DAY_NONE;

#define SET_TDATE_INTERVAL ( di,
period_type   ) 


do {                                                 \
(di).prd = (periods);                                \
(di).prd_typ = (period_type);                        \
(di).flag = 0;                                       \
} while(0)

Distributed by BN Algorithms Ltd -- consulting in quantitative finance, mathematical algorithms and software implementations. CDS Home Page. For enquires contact
This documentation is derived from ISDA CDS Standard Model version 1.7. You can get a copy of the original ISDA code at This is a derivative work under the terms of the ISDA CDS Standard Model Public License. BN Algorithms Ltd licenses this work to you solely for on-screen viewing on your own computer. Making copies and further distribution of this work is prohibited.
This documentation is provided "as-is", without warranty of any kind, either expressed or implied, including, without limitation, warranties that the documentation is free of defects, merchantable, fit for a particular purpose or non-infringing. the entire risk as to the quality of the documentation is with you. Should this documentation prove defective in any respect, you (not the licensor) assume the cost of any necessary correction. This disclaimer of warranty constitutes an essential part of this license.