contingentleg.h File Reference

#include "cx.h"


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.

Detailed Description

Function Documentation

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

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.