The underlying integral which models the price of the contingent part of the CDS contract is:
where:
is the value at the present time of the contingent
leg of the CDS contract
is the recovery fraction
is the discount function, as defined by the zero curve
is the survival probability
is the time at beginning of risk
is the time at end of riskThe value of the above integral is evaluated using the approximation that the combination of the spread and zero curves are piecewise flat. In that approximation, the integral is evaluated exactly in the usual way using the sum:
where


is discount factor at time
computed from the
spread curve
is the discount factor at time
computed from
the zero curve 

The set of time points,
used in this sum are the
union of:
There are two conventions for determining if the fee leg should be payable in case of a default of the reference names and the choice of these naturally affect the valuation of the present value. The two possibilities are:
The fee leg of contract adopting the first (no accrual payment on default) convention is valued very simply as discounted value of the coupon payment times the survival probability:
where as before
is the discount function and
is the survival probability, and
is the amount of the
-th coupon payment.
In the case of the second convention noted above (i.e., if a default
occurs before the end of the accrual of the coupon, the fractional
accrued amount is paid), the value
needs to be
increased by the expected value of the fractional accrued
amount. Therefore the value of the coupon payments when the contract
are made with the second convention can be written as:
The integral within the sum over coupon payments can be evaluated in a way similar to the integral for the contingent leg, leading to an exact result in the case that the rates are flat-forward.