  We develop a 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 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. In the case that borrowing and lending rates coincide, we provide a
fully explicit expression for the unique XVA, expressed as a percentage of the
price of the traded claim, and for the corresponding replication strategies. In
the general case of asymmetric funding, repo and collateral rates, we study the
semilinear partial differential equations (PDE) characterizing buyer's and
seller's XVA and show the existence of a unique classical solution to it. To
illustrate our results, we conduct a numerical study demonstrating how funding
costs, repo rates, and counterparty risk contribute to determine the total
valuation adjustment.
