risk-attributionEstimate an asset covariance matrix from a supplied return history (sample, EWMA or Ledoit-Wolf), split portfolio VaR and Expected Shortfall into per-position Euler contributions (parametric normal, and historical-simulation ES), give incremental VaR per position, and regress asset returns on suppli
risk-backtestBacktest a supplied VaR forecast series, and optionally an Expected Shortfall series, against realised P&L. Reports exceptions, the Kupiec proportion-of-failures test, the Christoffersen independence and conditional coverage tests, the Basel MAR99 traffic-light zone for one-day 99% VaR, and the Acer
risk-counterpartyCalculate Basel SA-CCR exposure at default for one derivative netting set (CRE52), or summarise a simulated exposure profile such as an ORE netting-set exposure report into peak PFE, EPE, Effective EE and Effective EPE (CRE50, CRE53). Use for regulatory counterparty exposure measures. Not for CVA or
risk-creditCalculate portfolio credit VaR from obligor exposure, PD and LGD, either with the Vasicek asymptotic single risk factor quantile (the model behind the Basel IRB formula, CRE31) or with a seeded default-mode one-factor Gaussian copula Monte Carlo for a finite portfolio, giving expected loss, unexpect
risk-data-importTurn a caller's CSV, spreadsheet or JSON of positions, P&L, prices or exposures into a Risk Desk request contract, repairing clear format and unit errors and reporting each repair. Use when a user attaches a file and asks for a risk figure, asks how to format their data, or a tool rejected their inp
risk-derivativesGreeks, spot and vol scenario grids, and historical full-revaluation P&L for a book that mixes linear positions with European calls and puts on spot (Black-Scholes-Merton) or futures (Black-76) underlyings. Use when a book holds options and the question is cash delta, gamma, vega, theta or rho expos
risk-frtbCompute Basel FRTB market risk capital pieces from figures a bank has already produced. It covers the internal models approach (liquidity-adjusted, stress-calibrated Expected Shortfall and IMCC, then aggregate capital with the multiplier, the amber-desk surcharge and RWA), the desk eligibility tests
risk-limitsCheck a limit set (gross, net, leverage, an asset's gross share, VaR, Expected Shortfall, a named stress loss) against Risk Desk exposure, tail and stress results, and run a pre-trade what-if that revalues the book with proposed trades and checks the limits after. Use when the user asks whether a bo
risk-liquidityEstimate days to liquidate each asset at a participation rate of average daily traded value, the schedule of what is still held by day, the exogenous bid-ask spread cost of liquidation, and liquidity-adjusted VaR after Bangia, Diebold, Schuermann and Stroughair (1999). Use when the user asks how lon
risk-portfolioAggregate gross and net exposure, gross and net leverage against a supplied NAV, and each asset's share of gross for signed linear positions in one base currency (risk_exposure). Use when the user asks for gross or net exposure, leverage, or which asset is the biggest share of the book. Not for opti
risk-setupInstall and verify the Risk Desk runtime when its CLI or MCP tools are missing, an optional extra (xva for ORE, dev for tests) is absent, or the Option Desk engine wheel will not resolve. Includes a doctor script that reports what is installed and whether risk_desk_status answers, without installing
risk-stressRevalue linear positions under explicitly supplied asset-return scenarios, replay a dated historical window from the user's own price data, list the dated scenario library (Lehman 2008, COVID 2020, UK gilt and LDI 2022), find the most plausible shock that produces a target loss (reverse stress) unde
risk-tailCalculate VaR and Expected Shortfall from supplied horizon P&L, either historical only (risk_tail) or side by side under normal, Student-t, extreme value, GARCH filtered historical, GARCH-EVT and GARCH-t Monte Carlo models (risk_tail_models). Use for loss quantiles, tail severity and model compariso
risk-xvaRun a trusted local ORE (Open Source Risk Engine) project for counterparty exposure and valuation adjustments (risk_xva), and read its XVA and exposure reports. Use for ORE CVA, DVA, funding and other XVA reports, or to produce the netting-set exposure profile that risk_exposure_profile summarises.