This is illustrated in the following tree diagram where at each payment date either the contract has a default event, in which case it ends with a payment of formula_9 shown in red, where formula_10 is the recovery rate, or it survives without a default being triggered, in which case a premium payment of formula_8 is made, shown in blue. At either side of the diagram are the cashflows up to that point in time with premium payments in blue and default payments in red. If the contract is terminated the square is shown with solid shading.