  In this paper we extend the existing literature on xVA along three
directions. First, we enhance current BSDE-based xVA frameworks to include
initial margin in presence of defaults. Next, we solve the consistency problem
that arises when the front-office desk of the bank uses trade-specific discount
curves (CSA discounting) which differ from the discount rate adopted by the xVA
desk. Finally, we clarify the impact of aggregation of several sub-portfolios
of trades on the xVA-valuation of the resulting global portfolio and study
related non-linearity effects.
