1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
cdef extern from "isda/yearfrac.h":
int JpmcdsStringToDayCountConv(char* day_count, long* type)
cdef long dcc(str day_count)
cdef extern from "isda/cdate.h":
ctypedef struct TDateInterval:
pass
cdef extern from "isda/mdydate.h":
ctypedef struct TMonthDayYear:
long month
long day
long year
ctypedef long TDate
cdef extern from "isda/convert.h":
int JpmcdsStringToDateInterval(char* input, char* label, TDateInterval* interval)
int JpmcdsMakeDateInterval(int num_periods, char period_type, TDateInterval* interval)
char* JpmcdsFormatDate(TDate date)
cdef extern from "isda/date_sup.h":
int JpmcdsDateIntervalToFreq(TDateInterval* interval, double* freq)
cdef extern from "isda/dateconv.h":
TDate JpmcdsDate(long year, long month, long day)
int JpmcdsDateToMDY(TDate date, TMonthDayYear *mdyDate)
cdef extern from "isda/ldate.h":
int JpmcdsDateFwdThenAdjust(TDate date, TDateInterval* interval, long badDayMethod,
char* holidayFile, TDate *advAdjustedDate)
cdef extern from "isda/busday.h":
int JpmcdsDateFromBusDaysOffset(TDate fromDate, # (I) input date
long offset, # (I) number of business days
char *holidayFile, # (I) holiday file specification
TDate *result);
cdef TDate pydate_to_TDate(d)
cpdef object TDate_to_pydate(TDate d)
|