summaryrefslogtreecommitdiffstats
path: root/c_layer/cdsbootstrap.h
blob: e49808d614826ce96ddf9d87465eafd2d10a5809 (plain)
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
#include "isda/ldate.h"
#include "isda/cxzerocurve.h"
#include "isda/feeleg.h"
#include "isda/contingentleg.h"
#include "stdio.h"

#ifdef __cplusplus
extern "C"
{
#endif

#define SUCCESS 0
#define FAILURE -1

typedef struct
{
    TDate           stepinDate;
    TDate           cashSettleDate;
    const TCurve         *discountCurve;
    TCurve         *cdsCurve;
    double          recoveryRate;
    double          spread;
    TContingentLeg *cl;
    TFeeLeg        *fl;
} cds_bootstrap_ctx;


int cdsBootstrapPointFunction(double   hazardRate,
                              void    *data,
                              double  *pv);

#ifdef __cplusplus
}
#endif