Search

CN-121981680-A - Document-driven quantitative research and transaction self-evolution system and method with multi-agent cooperation

CN121981680ACN 121981680 ACN121981680 ACN 121981680ACN-121981680-A

Abstract

The invention belongs to the technical field of financial science and technology, and discloses a document-driven quantitative research and transaction self-evolution system and method with multi-agent cooperation. The system adopts a layered architecture, comprises a data and factor service layer, an execution engine layer, an intelligent agent layer, an interface service layer and a front-end control layer, and aims to solve the core problems of research and engineering implementation fracturing, lack of interface constraint for code generation and lack of self-evolution capability of strategies in quantized strategy research and development. The system automatically converts strategy ideas described by natural language into normalized documents, configurations and executable codes by researching cooperative work of the intelligent agents, factor intelligent agents and coding intelligent agents, automatically diagnoses and adjusts problems such as strategy skip fitting, factor attenuation and the like by self-monitoring, self-diagnosing and self-improving closed loops formed by the intelligent agents, drives the strategy to continuously self-evolve, and realizes full life cycle automatic management from strategy ideas, factor design, automatic coding, real disc return and feedback-based autonomous optimization.

Inventors

  • XU KAITAO

Assignees

  • 徐凯韬

Dates

Publication Date
20260505
Application Date
20260123

Claims (10)

  1. 1. The document driven type quantitative research and transaction self-evolution system with the cooperation of multiple agents is characterized by comprising a data and factor service layer, an execution engine layer, an agent layer, an interface service layer and a front-end control layer which are connected sequentially through interfaces; Wherein: (1) The data and factor service layer comprises: a) The data service module is used for uniformly accessing, storing and inquiring the multisource market data, the basic surface data and the alternative data, and providing interfaces for acquiring the line-by-line transaction data, the order book data and the K line data with different frequencies according to the security codes, the time stamps and the frequencies; b) The factor service module is used for performing factor calculation on the data provided by the data service module according to a preset factor expression, providing factor registration, factor inquiry, factor evaluation and real-time factor subscription interfaces, and storing factor metadata in a factor metadata table; (2) The execution engine layer comprises: a) The back testing engine is used for driving the strategy codes to run on a historical time axis based on historical data and outputting back testing results and performance indexes; b) The real disc engine is used for driving the strategy code to run under the real-time data stream and generating a transaction instruction; c) The risk engine is used for checking single risk, account risk and daily loss limit of the transaction instruction according to the risk control parameters in the policy configuration file, and the fusing module is used for performing degradation or shutdown control on the policy execution state when the operation monitoring index reaches a preset degradation or shutdown condition; (3) The intelligent agent layer comprises a research intelligent agent, a factor intelligent agent, a coding intelligent agent, a self-monitoring intelligent agent, a self-diagnosis intelligent agent and a self-improvement intelligent agent which are coordinated through the interface service layer: a) The research intelligent agent is used for converting the natural language strategy description input by a user into a plurality of strategy description documents and a strategy configuration file, wherein the strategy description documents adopt a mark language format and at least comprise strategy formal description documents, strategy return testing and optimizing scheme documents, strategy and transaction system interface specification documents and strategy operation monitoring specification documents, and the strategy configuration file adopts a structured configuration format and comprises strategy basic information, data configuration, factor configuration, return testing configuration, real disc configuration, risk control configuration, monitoring configuration, optimizing configuration and self-improvement configuration fields; b) A factor agent for generating a factor study document based on the policy specification document and the policy configuration document, the factor study document including at least a factor expression, a factor metadata structure, a factor evaluation scheme, and a factor retirement and monitoring rule; c) The coding intelligent agent is used for reading the strategy description document, the strategy configuration file and the factor research document, analyzing interface marks in the strategy description document, and generating or updating strategy class code files, data access encapsulation code files, factor binding code files, factor registration code files and return entry and real disc entry code files only according to a preset interface template corresponding to the interface marks; d) The self-monitoring intelligent agent is used for collecting operation indexes such as benefits, withdrawal, execution delay, factor information coefficients, order execution conditions and the like in the process of operating the back-testing engine and the real disc engine driving strategy codes, and generating monitoring summary according to a preset period; e) The self-diagnosis intelligent body is used for identifying one or more diagnosis types at least comprising strategy overfitting, factor attenuation, execution offset and data quality problems according to predefined diagnosis rules based on the monitoring summary, the return measurement result output by the return measurement engine and the factor evaluation result output by the factor service module, and generating a structured diagnosis file; f) The self-improving agent is used for reading the structured diagnosis files, automatically generating a strategy tuning task description document when at least one diagnosis type meets a preset self-improving triggering condition, calling the research agent and the factor agent to generate a new version strategy description document and a strategy configuration file, calling the coding agent to generate or update a corresponding new version strategy code file set, calling the callback engine and the simulation engine to evaluate the new version strategy in batches, and determining whether to update the currently activated strategy version according to the evaluation result; (4) The interface service layer is used for providing a remote call interface for triggering the research intelligent agent, the factor intelligent agent, the coding intelligent agent, the self-diagnosis intelligent agent and the self-improvement intelligent agent to execute and triggering the remote call interface for triggering the return test engine and the real disc engine to execute; (5) The front-end control layer is used for displaying and editing the strategy description document, the factor research document and the strategy configuration file, displaying the running results and monitoring indexes of the return engine and the real disk engine, and providing a user interface for strategy version comparison, one-key rollback and self-improvement flow triggering.
  2. 2. The system of claim 1, wherein the interface tag in the policy specification document for identifying the available code template is expressed in a fixed text format as a "code template reference: class name, method name", the code agent considers only the interfaces that appear in the interface tag as available interfaces when parsing the policy specification document, prohibits the generation of call codes for interfaces that do not appear in the interface tag, marks in the policy specification document in a "[ require confirmation: module name, method name ]" format when new interfaces need to be introduced, and adds the corresponding interfaces to a preset interface template library after manual auditing to define a callable interface set of the code agent, reducing security and maintenance risks associated with unconstrained code generation.
  3. 3. The system of claim 1, wherein the policy configuration file is in YAML or an equivalent structured text format, the execution engine layer parses and verifies the policy configuration file through a predefined strongly typed policy configuration class, maps fields of the policy basic information, data configuration, factor configuration, loop configuration, real disk configuration, risk control configuration, monitoring configuration, optimization configuration, self-improvement configuration, etc. to field objects inside a program, and the loop engine, real disk engine, risk engine, fusing module, and self-monitoring agent acquire policy operation parameters only through the policy configuration class object, without reading parameters from other configuration sources.
  4. 4. The system of claim 1, wherein the factor metadata table maintained by the factor service module includes at least factor identification, factor name, factor category, frequency, factor expression, parameter, data source, creator, creation time and version information fields, wherein the factor research document generated by the factor agent contains metadata descriptions in one-to-one correspondence with the factor metadata table fields, and the code agent automatically generates a factor registration code file according to the factor research document and writes factor metadata into the factor metadata table.
  5. 5. The system of claim 1, wherein the embedded point position of the self-monitoring agent in the policy execution path at least comprises an on_bar or on_tick method entry and exit of a policy class, a transaction signal generation node, an order sending and delivery return processing node and a factor evaluation node, and the self-monitoring agent aggregates the raw data collected by the embedded point according to a preset time granularity to form a monitoring summary comprising daily benefit, a summer ratio, maximum withdrawal, daily win ratio, engine delay, factor information coefficient and factor coverage.
  6. 6. The system of claim 1, wherein the self-diagnostic agent analyzes the monitoring summary, the return results, and the factor evaluation results using a rules engine and a time-series anomaly detection algorithm, identifies a diagnostic type including at least one or more of a policy pass fit, a factor decay, an execution offset, and a data quality problem, and records a diagnostic type, a trigger index, a suggested action, and a confidence in the structured diagnostic file.
  7. 7. The system of claim 1, wherein the self-improving agent, when generating the strategic tuning task description document, selects different tuning strategies based on the diagnostic type in the structured diagnostic file, wherein the set of factors and the factor parameters are preferentially adjusted when the diagnostic type is factor attenuation, and wherein the order execution algorithm and the risk control parameters are preferentially adjusted when the diagnostic type is execution offset.
  8. 8. The system of claim 1, wherein the front-end control layer manages a policy directory with a policy identifier and a version number as organization dimensions, a policy code file is stored under a "policy/{ policy identifier }/v { version number }/" directory, a current active version field is recorded in the policy configuration file, the real disk engine loads and executes a corresponding version of policy code based on the active version field, and the front-end control layer provides an a/B experiment configuration interface for configuring a fund allocation proportion of different policy versions and comparing return and real disk performance thereof.
  9. 9. A quantitative research and transaction self-evolution method based on multiple agents is characterized by comprising the following steps: s1, receiving natural language strategy descriptions input by a user, and generating a plurality of strategy description documents and a strategy configuration file by a research intelligent agent according to preset document specifications; S2, reading the strategy description document and the strategy configuration file by a factor agent to generate a factor research document, wherein the factor research document comprises a factor expression and a factor metadata structure description; S3, reading the strategy description document, the strategy configuration file and the factor research document by the coding intelligent agent, analyzing a code template reference mark in the strategy description document, generating or updating a strategy class code file, a data access packaging code file, a factor binding code file, a factor registration code file and a return entry and real disc entry code file according to a preset interface template corresponding to the mark; S4, loading the strategy code file set by a back testing engine based on the strong type configuration object obtained through analysis of the strategy configuration file, driving strategy operation on historical data and outputting a back testing result and performance indexes; S5, when the preset condition of the uploading condition is met, executing the strategy code file set by the real disk engine based on the strong type configuration object under the real-time data stream, and implementing risk control by the risk engine and the fusing module; s6, collecting operation indexes by the self-monitoring agent in the operation process of the return test engine and the real disc engine, and generating a structured diagnosis file by the self-diagnosis agent based on monitoring summary, a return test result and a factor evaluation result; and S7, when the structured diagnosis file meets the preset self-improvement triggering condition, automatically generating a strategy tuning task description document by the self-improvement intelligent body, repeatedly executing the steps S1 to S4 to generate a new version strategy description document, a strategy configuration file and a strategy code, and updating a strategy version used by real disk execution after the return and simulation verification are passed.
  10. 10. The method according to claim 9, wherein in the step S3, if a tag of "[ needing to confirm: module name, method name ]" format appears in the policy description document or the factor study document, the code agent does not generate a code for an interface corresponding to the tag until the interface is added to a preset interface template library through manual verification, and the interface can be used in a subsequent code generation process.

Description

Document-driven quantitative research and transaction self-evolution system and method with multi-agent cooperation Technical Field The invention belongs to the technical field of financial science and technology, in particular relates to a computer-implemented system and method for quantized investment strategy research, factor design, automatic generation of strategy codes and self-adaptive evolution, and particularly relates to a document-driven quantized research and transaction self-evolution system and method with multi-agent cooperation. Background With the rapid growth of market trade data such as securities, futures, digital money, etc., and the continuous increase of computing power, quantized investments are widely used in institutions and individual investors. Typical quantitative development processes generally include multiple links such as strategy conception, data analysis and factor design, strategy back-testing, simulation testing, real disk deployment and operation monitoring. In the prior art, the following problems generally exist among the links: 1) Research and engineering implementation fracturing-quantitative researchers typically describe policy logic in natural language or semi-structured documents from which policy codes are written manually by development engineers. The mode is easy to generate the following problems that the strategy implementation deviates from the expectation due to inconsistent understanding of natural language, multiple rounds of communication and repeated modification are needed between research and development, the development period is long, and the strategy document and the actual execution code are difficult to keep synchronous in time, so that maintenance and compliance audit are affected. (2) The documents, the configurations and the codes lack unified fact sources that in the existing quantization system, policy documents are generally stored in a knowledge base or version base, parameter configurations are distributed in a database, a configuration file or a Web form, an execution engine can read operation parameters from a plurality of sources, and therefore the back measurement is inconsistent with the real disk configuration, the history version is difficult to restore completely, and the policy evolution process lacks structured records and unified management. (3) The strategy code generation mode lacks interface constraint, wherein the prior scheme tries to configure the strategy through a graphical user interface, then automatically generates the strategy code, and adopts a mode of 'strategy template + visual configuration + code segment splicing'. The method has the problems that the code quality depends on preset fragments, interface specifications are difficult to unify, complex strategy logic is difficult to express, maintenance is difficult and the like, and is particularly more prominent in the scenes of multiple data sources, multiple factors and complex execution engines. (4) The existing back-testing and real-disk execution framework generally only outputs performance indexes such as benefits, back-overs and the like and back-testing reports, and monitoring during operation stays in the dimensions such as account net value, risk exposure, system delay and the like, and an automatic mechanism for structuring and feeding back monitoring results to an adjustment factor, an adjustment parameter and a reconstruction strategy is lacking. The algorithm transaction strategy generator based on reinforcement learning mainly focuses on a 'state identification-action decision-rewarding-learning optimization-risk control' closed loop in a single reinforcement learning intelligent agent, and does not establish a unified self-evolution framework among strategy research documents, factor design, engineering realization and operation monitoring. (5) In practice, the strategy codes are usually managed by means of a version control system, but the association between the strategy versions and corresponding documents and configurations is not visual, a unified mechanism is lacked to support small-scale parallel experiments and safe rollback of multiple versions in real discs according to fund proportion, the strategy upgrading is dependent on manual judgment and operation, and the process is fragmented and difficult to audit. In summary, the prior art generally lacks a system-level technical scheme which is driven by multi-agent cooperation with documents and configurations as unified fact sources, and from natural language strategy research to code generation, from back-testing and real-disk execution to self-evolution based on real-disk feedback. Disclosure of Invention The invention aims to solve the problems of the prior art that the quantized strategy research and engineering are split, documents and configuration are not unified, automatic code generation lacks interface constraint, operation monitoring is difficult to realize closed-loop to strat