#include "cx.h"
Functions | |
int | JpmcdsContingentLegPV (TContingentLeg *cl, TDate today, TDate valueDate, TDate stepinDate, TCurve *discountCurve, TCurve *spreadCurve, double recoveryRate, double *pv) |
Computes the PV of a contingent leg as a whole. |
int JpmcdsContingentLegPV | ( | TContingentLeg * | cl, | |
TDate | today, | |||
TDate | valueDate, | |||
TDate | stepinDate, | |||
TCurve * | discountCurve, | |||
TCurve * | spreadCurve, | |||
double | recoveryRate, | |||
double * | pv | |||
) |
Computes the PV of a contingent leg as a whole.
For each payment period this is the integral of LGD(t) . Z(t) . dS/dt dt where S is the survival function and LGD is the loss given default function and Z is the discount function. Discounting is calculated at the payment date and not at the observation date.
cl | (I) Contingent leg | |
today | (I) No observations before today | |
valueDate | (I) Value date for discounting | |
stepinDate | (I) Step-in date | |
discountCurve | (I) Risk-free curve | |
spreadCurve | (I) Spread curve | |
recoveryRate | (I) Recovery rate | |
pv | (O) Present value of contingent leg |