  We develop a novel framework for computing the total valuation adjustment
(XVA) of a European claim accounting for funding costs, counterparty credit
risk, and collateralization. Based on no-arbitrage arguments, we derive the
nonlinear backward stochastic differential equations (BSDEs) associated with
the replicating portfolios of long and short positions in the claim. This leads
to the definition of buyer's and seller's XVA which in turn identify a
no-arbitrage interval. When borrowing and lending rates coincide we provide a
fully explicit expression for the uniquely determined price of XVA, expressed
as a percentage of the price of the traded claim, and for the corresponding
replication strategies. This extends the result of Piterbarg by incorporating
the effect of premature contract termination due to default risk of the trader
and of his counterparty.
