Modeling xva adjustments

From CaseMark/skills · View interactive version

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.

How to use this skill

Skill file

Modeling XVA Adjustments

When To Use

Inputs To Gather

Workflow

  1. 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).
  1. 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).
  1. CVA calculation — Integrate discounted EPE against counterparty default probability:
  1. DVA calculation — Mirror CVA using ENE and own default probability:
  1. FVA calculation — Compute funding cost/benefit on expected unsecured exposure:
  1. KVA calculation — Estimate lifetime cost of regulatory capital:
  1. MVA calculation — Quantify cost of funding initial margin over trade life:
  1. 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.
  1. Hedging strategy — Identify primary XVA risk drivers:
  1. Sensitivity & stress testing — Run bumps on key inputs (credit spreads ±10bp, funding spreads ±5bp, rates ±25bp, correlation shifts) and report XVA Greeks (CS01, IR01, FVA01). Stress-test under adverse scenarios (counterparty downgrade, funding stress, margin call spikes).

Output

Quality Checks

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.