  The purpose of this paper is to design an algorithm for the computation of
the counterparty risk which is competitive in regards of a brute force
"Monte-Carlo of Monte-Carlo" method (with nested simulations). This is achieved
using marked branching diffusions describing a Galton-Watson random tree. Such
an algorithm leads at the same time to a computation of the (bilateral)
counterparty risk when we use the default-risky or counterparty-riskless option
values as mark-to-market. Our method is illustrated by various numerical
examples.
