Debugging
AuraScore 89/100

Basel Capital Engine Calculation Drift Diagnostic Matrix

Identify computational drift and precision loss in quantitative risk and regulatory capital pipelines.

Use this template when debugging floating-point variance, Monte Carlo divergence, or unexpected Risk-Weighted Asset (RWA) calculation discrepancies across regulatory stress test pipelines.

Template

Role: Senior Quantitative Software Auditor specializing in regulatory capital modeling engines and high-performance risk simulation pipelines.

Context

  • Risk Engine Architecture: {{model_runtime_environment}}
  • Counterparty Exposure Records: {{counterparty_exposure_dataset}}
  • Observed Output Variance: {{observed_rwa_variance}}
  • Quantitative Pricing Library: {{pricing_kernel_version}}
  • Pseudo-Random Seed Configuration: {{monte_carlo_seed_config}}
  • Regulatory Basel Standard: {{regulatory_framework_standard}}

Task

Generate an advanced diagnostic matrix evaluating numerical drift, floating-point rounding degradation, and model implementation flaws causing {{observed_rwa_variance}} across capital calculation pipelines, providing targeted numerical remediations.

Method

  1. Audit {{counterparty_exposure_dataset}} for non-normal distributions, NaN/Inf injection, or extreme tail values.
  2. Profile {{pricing_kernel_version}} SIMD vectorization routines for IEEE 754 precision loss across heterogeneous CPU/GPU nodes.
  3. Trace the deterministic pseudo-random number generator under {{monte_carlo_seed_config}} to identify thread-scheduling race conditions.
  4. Recompute expected Value-at-Risk (VaR) and Expected Shortfall bounds against {{regulatory_framework_standard}} formulas.
  5. Compare intermediate netting and collateral aggregation routines in {{model_runtime_environment}} against analytical benchmarks.
  6. Classify calculation drift points by capital adequacy impact and computational cost.
  7. Develop deterministic unit-testing test fixtures with strict epsilon tolerances for regression testing.

Constraints

  • The diagnostic MUST differentiate strictly between mathematical model drift and software implementation bugs.
  • Remediation approaches MUST NOT compromise the engine throughput required by {{model_runtime_environment}}.
  • Numerical stability fixes MUST comply with precision requirements defined in {{regulatory_framework_standard}}.
  • Analysis MUST explicitly verify thread safety and seed isolation across multi-threaded execution runs.

Output format

  1. Numerical Integrity Assessment (evaluation of floating-point drift and simulation divergence).
  2. Drift Root Cause Matrix (Markdown table with columns: Calculation Module, Mathematical Function, Root Cause Mechanism, Precision Loss (bps), Determinism Status, Remediation Code Pattern).
  3. Precision Verification Test Suite (specification of epsilon bounds and deterministic seed validation tests).

Self-review

  • Confirm all precision tolerances match {{regulatory_framework_standard}} compliance thresholds.
  • Verify that compiler optimization flags (e.g., fast-math) are accounted for in {{model_runtime_environment}}.
  • Check that seed isolation checks explicitly address concurrency issues from {{monte_carlo_seed_config}}.
AuraScore breakdown
89/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification14/14 · Strong

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness3/5 · Adequate

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-debugging
financial-services
quantitative
basel
risk-engine