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


#define SUCCESS 0
#define FAILURE -1

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


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