RIDGE: An Autonomous Framework for Validation and Method Discovery in LLM-Generated Option Pricing

๐Ÿ“… 2026-07-27
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
This work addresses critical shortcomings in option pricing code generated by large language models (LLMs), which often exhibit mathematical inconsistencies, numerical instabilities, and unreliable behavior across parameter regimesโ€”issues that conventional testing methods struggle to validate effectively. To tackle this, the authors propose an autonomous verification framework that integrates no-arbitrage constraints, stress testing, benchmark comparisons, and cross-model consistency checks, augmented with a diagnostic reasoning mechanism and a reusable knowledge base of validation rules. This framework enables, for the first time, systematic accumulation and iterative refinement of financial code verification knowledge. Applied to five stochastic volatility models, it successfully rectifies all identified implementation flaws and further yields two novel semi-analytical pricing methods, substantially enhancing the reliability and practical utility of LLM-generated financial code.
๐Ÿ“ Abstract
Automated code generation is becoming an important tool in quantitative finance, where large language models can generate option pricing implementations directly from mathematical model specifications. Validating such implementations, however, requires considerably more than conventional software testing: numerical pricing methods must remain mathematically consistent, numerically stable, and reliable across a wide range of model parameters. We introduce RIDGE, an autonomous validation framework in which generated pricing implementations are subjected to structured no-arbitrage tests, stress tests, benchmark comparisons, and consistency checks. Validation evidence is interpreted diagnostically, while the resulting knowledge is accumulated in a repository and reused across models and successive validation iterations. This enables systematic refinement of both the pricing implementation and the validation methodology. The framework is applied to five stochastic volatility models. Across these studies, all detected implementation defects are removed and, in two cases, the validation process itself leads to new semi-analytic pricing methodologies. The supplementary material is available in the GitHub repository: https://github.com/ShQiangLiu/ridge.
Problem

Research questions and friction points this paper is trying to address.

option pricing
LLM-generated code
validation
numerical stability
mathematical consistency
Innovation

Methods, ideas, or system contributions that make the work stand out.

autonomous validation
LLM-generated code
option pricing
semi-analytic methods
no-arbitrage testing
๐Ÿ”Ž Similar Papers