The value CVA0 is composed of the expected loss due to the counterparty defaults (within maturity and before the investor default) minus the gain made by the investor in the event of its own defaults (before the counterparty default; conditional on no previous default for both investor and the counterparty).
Let’s compute the following
Under the assumption of independence of and the expectation can be expressed as
Under the assumption that ,, the expectation can be expressed as
The integral can be approximated using numerical integration.
=
Another way to look at it is as follows. Let us partition the [0,T] interval to , then we have