Modeling xva adjustments is an AI agent skill from the GitHub repository CaseMark/skills. Calculates comprehensive XVA including CVA, DVA, FVA, KVA, and MVA with portfolio-level analysis and hedging strategies. Use when computing XVA, modeling valuation adjustments, or analyzing funding costs.
Regulatory parameters: SA-CCR alpha factor, supervisory risk weights, cost-of-capital rate (typically 8–12%), capital horizon [VERIFY against current Basel III/IV regime applicable to entity]
Simulation parameters: Number of Monte Carlo paths, time grid granularity, diffusion model choice (GBM, local vol, stochastic vol)
Workflow
Scope & segmentation — Identify netting sets, confirm CSA terms per netting set, classify trades as collateralized/uncollateralized/partially collateralized. Determine which XVA components are in scope (CVA, DVA, FVA, KVA, MVA).
Exposure simulation — Run Monte Carlo simulation to generate future portfolio values on a time grid. Compute expected positive exposure (EPE) and expected negative exposure (ENE) profiles per netting set, applying CSA margining logic (threshold, MTA, margin period of risk).
CVA calculation — Integrate discounted EPE against counterparty default probability:
h_capital = hurdle rate (cost of equity minus risk-free rate, typically 6–10%)
[VERIFY applicable capital framework: SA-CCR vs. IMM; Basel III vs. IV timeline]
MVA calculation — Quantify cost of funding initial margin over trade life:
Project future IM using ISDA SIMM or CCP schedule on simulated portfolios
MVA ≈ Σ_t [ DF(t) × E[IM(t)] × s_fund(t) × Δt ]
For bilateral trades under UMR, confirm phase-in applicability [VERIFY UMR phase and AANA threshold]
Aggregation & allocation — Sum components to total XVA per netting set and portfolio-wide. Allocate incremental XVA to individual trades using Euler allocation or stand-alone/incremental decomposition for pricing and desk-level P&L attribution.
Review incremental XVA for a new trade: should be bounded between stand-alone XVA (upper) and marginal XVA (lower)
Flag any counterparty without liquid CDS data — proxy mapping methodology must be documented and reviewed
Use this skill with your AI agent:Open on Skill Issue to copy, download, or add to your library.
Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.