Full-plug-in quantitative transaction method and system
By adopting a fully pluggable design, constructing a process topology diagram and a priority scheduling queue, processing market data in real time, analyzing dynamic calculation factors, assessing the impact of interference, and optimizing the quantitative trading system, the system solves the problems of poor scalability and insufficient flexibility of traditional systems, and achieves higher collaborative adaptability and trading efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINALIN SECURITIES CO LTD
- Filing Date
- 2025-11-18
- Publication Date
- 2026-04-17
AI Technical Summary
Traditional quantitative trading systems suffer from poor scalability, insufficient flexibility, weak coordination among various components, difficulty in quickly adjusting or replacing specific functional modules, and inability to adapt to market changes and personalized needs.
It adopts a fully plug-in-based design, which involves configuring a full plug-in library, parsing function description files, building a process topology diagram, generating a priority scheduling queue, collecting market data streams in real time, performing multi-granularity slicing processing, activating signal plug-in groups, calculating time series correlation indices, evaluating interference impact coefficients, and performing topology reconstruction to generate a fully plug-in-based trading architecture.
It enhances the collaborative adaptability of quantitative trading systems, improves the flexibility and response speed from data processing and signal generation to order execution, helps investors seize trading opportunities, optimize trading strategies, and enhance the scientific nature and profit potential of trading decisions.
Smart Images

Figure CN121883154A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a fully plug-in-based quantitative trading method and system, belonging to the field of financial trading. Background Technology
[0002] In an era of rapid development in fintech and algorithmic trading, quantitative trading, as a core technology for investment decision-making through mathematical models and automated programs, has been widely used in markets such as securities, futures, and foreign exchange. Through efficient data analysis, strategy execution, and risk control, it has significantly improved trading efficiency and return stability.
[0003] However, traditional quantitative trading systems have significant limitations in their design. On the one hand, existing systems mostly adopt a fixed architecture, tightly coupling modules such as data access, strategy development, backtesting, live trading, and risk management, resulting in poor scalability and insufficient flexibility. Users find it difficult to quickly adjust or replace specific functional modules according to market changes or personalized needs, thus limiting the efficiency of strategy iteration and innovation. On the other hand, due to the lack of a fully pluggable design concept, the collaborative capabilities of various aspects of the system (such as data source adaptation, signal generation, and order execution) are weak. Therefore, a fully pluggable quantitative trading method is needed to improve the collaborative adaptability of quantitative trading systems. Summary of the Invention
[0004] This invention provides a fully pluggable quantitative trading method and system, the main purpose of which is to improve the collaborative adaptability of quantitative trading systems.
[0005] To achieve the above objectives, this invention provides a fully plug-in-based quantitative trading method, comprising: Configure the full plugin library corresponding to the target quantization data, parse the function description files corresponding to each plugin in the full plugin library, extract the file constraint rules in the function description files, and construct the process topology diagram corresponding to the target quantization data based on the file constraint rules. Generate priority scheduling queues corresponding to each node in the process topology diagram, collect market data streams in the priority scheduling queues in real time, perform multi-granularity slicing on the market data streams to obtain granular slice data, and extract statistical distribution features from the granular slice data. Activate the signal plugin group in the full plugin library, analyze the dynamic calculation factors in the signal plugin group, calculate the time correlation index between the dynamic calculation factors, and perform composite processing on the time correlation index based on the preset weight allocation strategy to obtain a composite instruction set. The execution path of the composite instruction set in the historical backtesting environment is evaluated, the execution decay characteristics and fitting risk index in the execution path are extracted, and the interference impact coefficient corresponding to the target quantized data is calculated based on the execution decay characteristics and the fitting risk index. Based on the interference impact coefficient, the topology of the plugin combination in the full plugin library is reconstructed to obtain the reconstructed plugin group. The data feedback loop in the reconstructed plugin group is extracted, and the resource occupation waveform in the data feedback loop is collected. The stack trace pattern corresponding to the resource occupation waveform is analyzed. Based on the stack trace pattern and the preset fault tolerance rule library, the full plugin-based trading architecture corresponding to the target quantitative data is generated.
[0006] Optionally, constructing the process topology diagram corresponding to the target quantized data based on the file constraint rules includes: Parse the constraint operators in the file constraint rules; Based on the constraint operator, identify the parallel-to-serial execution domain corresponding to the target quantized data; Extract redundant connection points from the parallel-serial execution domain; Based on the redundant connection points, plan the process topology nodes corresponding to the target quantified data; Based on the process topology nodes, construct the process topology diagram corresponding to the target quantification data.
[0007] Optionally, generating the priority scheduling queue corresponding to each node in the process topology diagram includes: The process topology diagram is parsed to obtain node information groups; Identify the priority attribute corresponding to each node in the node information group; Based on the priority attribute, calculate the scheduling weight value corresponding to each node in the node information group; Based on the scheduling weight values, analyze the scheduling order relationship of each node in the process topology diagram; Based on the scheduling order relationship, a priority scheduling queue corresponding to each node in the process topology diagram is generated.
[0008] Optionally, the step of performing multi-granularity slicing on the market data stream to obtain granular slice data includes: Collect the raw tick sequence from the market data stream; Based on a preset time window, the original tick sequence is divided into high-frequency slices and low-frequency slices; Extract the extreme points in the high-frequency slices and the trend inflection points in the low-frequency slices respectively; Based on the extreme points and the trend inflection points, statistically analyze the multi-level granularity labels corresponding to the market data stream; Based on the multi-level granularity labels, the market data stream is processed into multi-granularity slices to obtain granular slice data.
[0009] Optionally, calculating the time-series correlation index between the dynamic calculation factors includes: The temporal correlation index between the dynamic calculation factors is calculated using the following formula: ; in, This represents the time-series correlation index between the dynamically calculated factors. and These represent the start and end points of the dynamic time interval, respectively. This represents the total number of the dynamically calculated factors. and These represent the quantity indices corresponding to the dynamically calculated factors. Indicates the first The and the first The correlation weight coefficients between the dynamic calculation factors Indicates the first A dynamic calculation factor in time The measured value at time [time]. Indicates the amount of time delay. Indicates the number of interfering factors. Index representing the number of interfering factors. Indicates the first The interference intensity value corresponding to each interference factor.
[0010] Optionally, the composite instruction set obtained by performing composite processing on the time-series correlation index based on a preset weight allocation strategy includes: Extract the dynamic feature parameters from the time-series correlation index; Based on a preset weight allocation strategy, the dynamic feature parameters are weighted and fused to obtain fused feature parameters; Generate the fusion instruction matrix corresponding to the fusion feature parameters; The instructions in the fusion instruction matrix are normalized to obtain a standardized instruction sequence; The standardized instruction sequence is compounded to obtain a compound instruction set.
[0011] Optionally, evaluating the execution path of the composite instruction set in a historical backtesting environment includes: Set the initial parameter configuration in the historical backtesting environment; Based on the initial parameter configuration, the first round of backtesting is performed on the instructions in the composite instruction set to obtain the backtesting path record; Optimize the data acquisition frequency corresponding to the backtest data in the backtest path record; Based on the optimized data acquisition frequency, iterative backtesting is performed on the instructions in the composite instruction set to obtain iterative path records; Extract the path execution nodes from the iterative path record; Based on the execution nodes of the path, evaluate the execution path of the composite instruction set in the historical backtesting environment.
[0012] Optionally, calculating the interference impact coefficient corresponding to the target quantized data based on the execution attenuation characteristics and the fitting risk index includes: The interference impact coefficient corresponding to the target quantized data is calculated using the following formula: ; in, This represents the interference impact coefficient corresponding to the target quantized data. Represents the normalization constant. This represents the total number of features corresponding to the execution attenuation feature. This represents the index of the quantity corresponding to the execution decay feature. This represents the total number of indicators corresponding to the fitted risk index. This represents the quantity index corresponding to the fitted risk index. Indicates the first The feature weight coefficients corresponding to each execution decay feature Indicates the first The weight coefficients of each fitting risk indicator, Indicates the first The execution decay characteristic and the first Positive correlation values between the fitted risk indicators Indicates the first The execution decay characteristic and the first The negative correlation value between the fitted risk indicators Indicates the first The execution decay characteristic and the first Adjustment coefficients between the fitted risk indicators.
[0013] Optionally, the topology reconstruction of the plugin combinations in the full plugin library based on the interference impact coefficient to obtain a reconstructed plugin group includes: Analyze the interference factors corresponding to the interference influence coefficient; Based on the aforementioned interference factors, calculate the interference sensitivity of the plugin combinations in the full plugin library; Based on the interference sensitivity, easily interfered plugins in the plugin combination are screened out to obtain an anti-interference plugin set. The topology of the anti-interference plugin group is reconstructed to obtain the reconstructed plugin group.
[0014] To address the aforementioned problems, the present invention also provides a fully plug-in-based quantitative trading system, the system comprising: The topology construction module is used to configure the full plug-in library corresponding to the target quantization data, parse the function description files corresponding to each plug-in in the full plug-in library, extract the file constraint rules in the function description files, and construct the process topology diagram corresponding to the target quantization data based on the file constraint rules. The feature extraction module is used to generate priority scheduling queues corresponding to each node in the process topology diagram, collect market data streams in the priority scheduling queues in real time, perform multi-granularity slicing on the market data streams to obtain granular slice data, and extract statistical distribution features from the granular slice data. The composite processing module is used to activate the signal plug-in group in the full plug-in library, analyze the dynamic calculation factors in the signal plug-in group, calculate the time-series correlation index between the dynamic calculation factors, and perform composite processing on the time-series correlation index based on a preset weight allocation strategy to obtain a composite instruction set. The interference coefficient module is used to evaluate the execution path of the composite instruction set in the historical backtesting environment, extract the execution decay characteristics and fitting risk index in the execution path, and calculate the interference impact coefficient corresponding to the target quantized data based on the execution decay characteristics and the fitting risk index. The architecture generation module is used to perform topology reconstruction on the plugin combination in the full plugin library based on the interference impact coefficient to obtain a reconstructed plugin group, extract the data feedback loop in the reconstructed plugin group, collect the resource occupation waveform in the data feedback loop, analyze the stack trace pattern corresponding to the resource occupation waveform, and generate the full plugin-based trading architecture corresponding to the target quantitative data based on the stack trace pattern and a preset fault tolerance rule library.
[0015] Compared to the problems described in the background art, this invention, by configuring a full plug-in library corresponding to the target quantitative data, can enhance the collaborative capabilities of each link in the system, optimize processes from data processing and signal generation to order execution, and bring greater flexibility and adaptability to quantitative trading. By generating priority scheduling queues corresponding to each node in the process topology diagram, this invention can significantly improve the overall system response speed, effectively cope with complex and ever-changing trading environments, help investors seize fleeting trading opportunities, and increase trading returns. Furthermore, by activating the signal plug-in group in the full plug-in library and analyzing the dynamic calculation factors in the signal plug-in group, this invention can reveal the market's performance under different time periods and conditions. Key driving factors help investors flexibly adjust their trading strategies to adapt to complex and ever-changing market environments, enhancing the scientific nature and profit potential of trading decisions. Furthermore, by evaluating the execution path of the composite instruction set in a historical backtesting environment, this invention can trace the execution path back to clearly understand the triggering timing and execution effects of instructions in different market scenarios, accurately identifying the strengths and weaknesses of the strategy. Finally, based on the interference impact coefficient, this invention performs topological reconstruction on the plugin combinations in the full plugin library, obtaining a reconstructed plugin group. This allows for targeted optimization of the connections and collaboration between plugins, removing inefficient or conflicting connections, strengthening key correlations, and improving the overall operating efficiency and stability of the plugin group. Therefore, the fully pluggable quantitative trading method and system provided by this invention can improve the collaborative adaptability of quantitative trading systems. Attached Figure Description
[0016] Figure 1 A flowchart illustrating a fully pluggable quantitative trading method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the modules for implementing the fully pluggable quantitative trading system according to an embodiment of the present invention.
[0017] The objectives, features, and advantages of this invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0018] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0019] This application provides a fully pluggable quantitative trading method. The execution entity of the fully pluggable quantitative trading method includes, but is not limited to, at least one of the following electronic devices that can be configured to execute the method provided in this application embodiment: a server, a terminal, etc. In other words, the fully pluggable quantitative trading method can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to, a single server, a server cluster, a cloud server, or a cloud server cluster.
[0020] Example 1: Reference Figure 1 The diagram shown is a flowchart illustrating a fully pluggable quantitative trading method according to an embodiment of the present invention. In this embodiment, the fully pluggable quantitative trading method includes: S1. Configure the full plugin library corresponding to the target quantization data, parse the function description files corresponding to each plugin in the full plugin library, extract the file constraint rules in the function description files, and construct the process topology diagram corresponding to the target quantization data based on the file constraint rules.
[0021] This invention enhances the collaborative capabilities of various aspects of the system by configuring a full plug-in library corresponding to the target quantitative data, optimizing processes from data processing and signal generation to order execution, and bringing greater flexibility and adaptability to quantitative trading.
[0022] The target quantitative data refers to a set of quantitative data focused on specific trading strategies, analytical purposes, or market research within a quantitative trading scenario. This data covers price trends, trading volumes, and macroeconomic indicators in markets such as securities, futures, and foreign exchange, serving as the foundation for analysis, backtesting, and live trading decisions in quantitative trading systems. The full plug-in library refers to a resource library that integrates various functional modules of a quantitative trading system, such as data access, strategy development, backtesting verification, live trading, and risk control management, in the form of plug-ins. Each plug-in has an independent functional description file, clearly defining its functional characteristics and usage rules. By flexibly calling and combining these plug-ins, the architecture of a quantitative trading system can be quickly built or adjusted according to different needs. Optionally, the full plug-in library corresponding to the configured target quantitative data can be implemented through a modular integration framework, such as OSGi (Dynamic Modular System), where different functional modules are encapsulated as independent plug-ins to ultimately build the full plug-in library.
[0023] This invention parses the function description files corresponding to each plugin in the full plugin library and extracts the file constraint rules in the function description files. This helps to accurately determine whether each plugin can be adapted to a specific stage when building a quantitative trading process, and avoids system failures caused by misuse of plugins.
[0024] The functional description file refers to a text file written in a specific format, used to describe in detail the functional characteristics of the plugin in the quantitative trading system. It explains the purpose of the plugin, such as data cleaning, execution of trading strategies, or implementation of risk monitoring, and lists the input data types, data formats, and expected output formats that the plugin depends on. The file constraint rules refer to the set of clauses in the functional description file that define the operating conditions and restrictions of the plugin. These rules cover the range of quantitative data to which the plugin is applicable. For example, some plugins are only applicable to high-frequency trading data in specific markets. They also include requirements for the operating environment, such as the required operating system and memory capacity. Optionally, parsing the functional description files corresponding to each plugin in the full plugin library can be achieved by data parsing tools, such as using YAML or JSON parsing libraries (such as PyYAML or Jackson) to read the plugin metadata and finally extract the functional description file. The extraction of the file constraint rules in the functional description file can be achieved by a rule engine, such as using Drools or Easy Rules to match predefined constraint templates and finally output structured rules.
[0025] Furthermore, based on the file constraint rules, the present invention constructs a process topology diagram corresponding to the target quantitative data, which can clearly and intuitively present the association and running order of each plug-in in the entire quantitative trading process, plan the data flow in advance, effectively avoid plug-in call conflicts, and greatly improve the system construction efficiency.
[0026] The process topology diagram refers to a graphical representation of the processing flow of target quantitative data throughout the quantitative trading system. By presenting process topology nodes in a specific layout and connection method, it intuitively reflects the dependencies, execution order, and data flow between various plug-ins. In the topology diagram, nodes are usually represented by graphic elements (such as rectangles, circles, etc.), and the lines connecting the nodes represent data transmission paths or execution order relationships. Information such as constraint operators can also be marked on the lines.
[0027] As an embodiment of the present invention, the step of constructing the process topology diagram corresponding to the target quantized data based on the file constraint rules includes: parsing the constraint operators in the file constraint rules; identifying the parallel-serial execution domain corresponding to the target quantized data based on the constraint operators; extracting redundant connection points in the parallel-serial execution domain; planning process topology nodes corresponding to the target quantized data based on the redundant connection points; and constructing the process topology diagram corresponding to the target quantized data based on the process topology nodes.
[0028] The constraint operators refer to symbols or markers used to define conditions and relationships in file constraint rules. They determine the logical connections and execution order between plugins and data processing steps, such as common logical operators "AND" and "OR," and conditional operators "IF...THEN...". The parallel execution domains refer to different areas in the target quantification data processing flow divided according to the constraint operators. A series of plugins execute sequentially in a specific order, like a production line, where the output of one plugin becomes the input of the next, and the order cannot be reversed. Parallel execution domains, on the other hand, are areas where multiple plugins can run simultaneously, independently processing different subsets of data or performing different tasks. The final results are then aggregated and processed. Redundant connection points refer to connections in the parallel-serial execution domain that are not essential for achieving the target quantitative data processing. For example, two plugins may have initially established a connection to transmit specific data, but with system optimization, it is found that the output data of one plugin is no longer used by the other plugin in subsequent processes; thus, the connection between them becomes a redundant connection point. Process topology nodes represent key processing units in the target quantitative data processing flow, typically corresponding to various plugins or specific data processing steps in the quantitative trading system. For example, a data acquisition plugin can serve as a topology node; its input can be various data sources, and its output is preliminarily processed quantitative data, which is then passed to nodes that perform subsequent data analysis or strategy calculations.
[0029] Furthermore, the parsing of constraint operators in the file constraint rules can be implemented using symbolic parsing algorithms, such as decomposing the rule expression based on a lexical analyzer (e.g., Lex / Flex) and a syntax parser (e.g., Yacc / Bison) to finally extract operators (e.g., >, =, ∈, etc.); the identification of the parallel-serial execution domain corresponding to the target quantized data can be implemented using data flow analysis tools, such as using LLVM or Soot to analyze the program dependency graph (PDG), dividing parallel and serial code blocks, and finally marking the parallel-serial execution domain; the extraction of redundant connection points in the parallel-serial execution domain can be implemented using graph optimization algorithms, such as applying bridge detection or cut vertex algorithms in graph theory to identify redundant connection points on redundant dependency edges; the planning of the process topology nodes corresponding to the target quantized data can be implemented using topology sorting algorithms, such as generating a sequence of node-free nodes based on the Kahn algorithm or depth-first search (DFS) to finally obtain the process topology nodes; the construction of the process topology graph corresponding to the target quantized data can be implemented using visualization tools, such as using Graphviz or D3.js to automatically render the relationship graph between nodes and edges.
[0030] S2. Generate priority scheduling queues corresponding to each node in the process topology diagram, collect market data streams in the priority scheduling queues in real time, perform multi-granularity slicing on the market data streams to obtain granular slice data, and extract statistical distribution features from the granular slice data.
[0031] This invention generates priority scheduling queues corresponding to each node in the process topology diagram, which can significantly improve the overall system response speed, effectively cope with complex and ever-changing trading environments, help investors seize fleeting trading opportunities, and increase trading returns.
[0032] The priority scheduling queue refers to a queue structure generated according to the scheduling order relationship, which is used to arrange the execution order of each node in the process topology diagram. As quantitative trading proceeds, the system takes out nodes one by one according to the queue order and allocates resources for processing, ensuring that the entire quantitative trading process is executed strictly in accordance with the pre-set priority and order.
[0033] As an embodiment of the present invention, generating the priority scheduling queue corresponding to each node in the process topology diagram includes: parsing the process topology diagram to obtain a node information group; identifying the priority attribute corresponding to each node in the node information group; calculating the scheduling weight value corresponding to each node in the node information group based on the priority attribute; analyzing the scheduling order relationship corresponding to each node in the process topology diagram based on the scheduling weight value; and generating the priority scheduling queue corresponding to each node in the process topology diagram based on the scheduling order relationship.
[0034] The node information group refers to a collection of relevant information obtained after parsing the process topology diagram. This information describes each node in the topology diagram in detail, covering the functional characteristics of the plug-in it represents, such as whether it focuses on data cleaning, strategy calculation, or risk monitoring. It also includes the data types and formats of the node's inputs and outputs, clarifying how the node interacts with other nodes in the quantitative trading process. The priority attribute is an identifier used to define the importance and urgency of a node in the quantitative trading process. Different nodes have different priorities due to their different tasks within the entire trading system. For example, a node responsible for real-time market data collection can be assigned a higher priority because the timeliness of market data is crucial for trading decisions. Nodes with high priority attributes have relatively low priority attributes, while those used for in-depth historical data analysis and having a less significant impact on real-time transactions have relatively low priority attributes. The scheduling weight value refers to a value calculated based on the node's priority attribute. The calculation process takes into account various factors, such as the node's priority, the amount of resources required to process the task, and the degree of impact on the overall transaction strategy result. Nodes with higher priority attributes are usually assigned higher scheduling weight values. The scheduling order relationship refers to the logical relationship describing the execution order of nodes in the process topology diagram, which is analyzed based on the scheduling weight values of each node. By comparing the scheduling weight values of different nodes, it is possible to determine which nodes should be executed first and which nodes need to wait for the preceding nodes to complete their tasks before starting.
[0035] Furthermore, the node parsing of the process topology graph can be implemented using graph traversal algorithms, such as breadth-first search (BFS) or depth-first search (DFS) to traverse the topology and ultimately extract node information groups such as type and dependency relationships of each node; the identification of priority attributes corresponding to each node in the node information group can be implemented using a rule engine, such as using the Drools rule engine to match predefined priority determination rules (such as prioritizing critical path nodes) and ultimately labeling the priority attributes of each node; the calculation of scheduling weight values corresponding to each node in the node information group can be implemented using multi-objective optimization algorithms, such as applying AHP (analytic hierarchy process) or TOPSIS algorithms to comprehensively evaluate indicators such as node latency and resource consumption, and quantify and generate scheduling weight values; the analysis of the scheduling order relationship corresponding to each node in the process topology graph can be implemented using topology sorting algorithms, such as generating a linear scheduling order relationship after eliminating circular dependencies based on the Kahn algorithm; the generation of priority scheduling queues corresponding to each node in the process topology graph can be implemented using a scheduling framework, such as automatically constructing an executable queue based on priority attributes and order relationships using the Kubernetes scheduler.
[0036] This invention ensures that the quantitative trading system keeps abreast of the latest market dynamics by collecting market data streams in the priority scheduling queue in real time. In the ever-changing financial market, this allows the system to respond quickly based on the latest data and adjust trading strategies in a timely manner.
[0037] The market data stream refers to a real-time, continuous, and dynamically updated data sequence in the financial market, covering key information from various trading markets such as securities, futures, and foreign exchange. It includes the real-time prices of underlying assets (such as stocks, futures contracts, and currency pairs), including the latest transaction price, bid price, ask price, and price trend; it also involves trading volume data, showing the trading activity level within a specific time period. Optionally, the real-time collection of the market data stream in the priority scheduling queue can be achieved through message queue middleware, such as using Kafka or RabbitMQ to establish a high-throughput data pipeline, subscribing to queue nodes according to priority, and finally converging into a time-series market data stream.
[0038] Furthermore, by performing multi-granularity slicing on the market data stream, the present invention obtains granular slice data, which can extract data features of different time dimensions according to different analysis needs (such as high-frequency trading and trend prediction). It can retain key data features while reducing redundant storage, and ultimately achieve dynamic matching between computing resources and business needs.
[0039] The granular slice data refers to the data subset obtained by targeted segmentation and organization of market data streams based on multi-level granular labels. For example, high-frequency granular slice data divided according to short-term price fluctuation characteristics can be used for refined analysis of short-term trading strategies; low-frequency granular slice data generated based on long-term trend characteristics can help in the formulation of long-term investment plans.
[0040] As an embodiment of the present invention, the step of performing multi-granularity slicing processing on the market data stream to obtain granular slice data includes: collecting the original tick sequence in the market data stream; dividing the original tick sequence into high-frequency slices and low-frequency slices based on a preset time window; extracting the extreme points in the high-frequency slices and the trend inflection points in the low-frequency slices respectively; statistically analyzing the multi-level granularity labels corresponding to the market data stream based on the extreme points and the trend inflection points; and performing multi-granularity slicing processing on the market data stream based on the multi-level granularity labels to obtain granular slice data.
[0041] The original tick sequence refers to the most basic and minute set of record units in the financial market data stream. Each tick represents a transaction or price change that occurs in a very short instant, including information such as transaction time, transaction price, and trading volume. The high-frequency slice refers to a short-span, high-data-density portion of the original tick sequence divided according to a preset time window. Due to the short time window, this slice can capture rapid changes in the market within a very short time, such as price fluctuations or sudden changes in trading volume within a few seconds or even shorter time intervals. The low-frequency slice, also based on a preset time window, is a relatively long-span, relatively sparse segment of the original tick sequence, such as price trends or changes in trading volume within a time window measured in minutes, hours, or even days. The extreme point refers to the point in the high-frequency slice data where indicators such as price or trading volume reach a local maximum or minimum value. In price trends, extreme points tend to... This reflects extreme changes in buying and selling forces in the market within a very short period of time. For example, prices may reach their highest or lowest point of the day in an instant, or trading volume may experience abnormal peaks or troughs in a very short time. These extreme points often contain important market information. The trend inflection point refers to the point in the price or trading volume trend chart presented in the low-frequency slice data where the trend changes direction. For example, prices that were originally in an upward trend begin to fall, or trading volume that has been sluggish suddenly begins to increase. These inflection points are crucial for judging the reversal of the medium- and long-term trend of the market and are key basis for investors to adjust their investment strategies and seize medium- and long-term investment opportunities. The multi-level granular label refers to the set of labels generated by combining information such as extreme points in high-frequency slices and trend inflection points in low-frequency slices to mark the market data stream in a multi-dimensional and multi-level manner. For example, based on the frequency, amplitude, and interrelationship of extreme points and trend inflection points, labels such as "short-term sharp fluctuations" and "long-term upward trend reversal" are generated.
[0042] Furthermore, the acquisition of the raw tick sequence from the market data stream can be achieved through exchange API interfaces, such as obtaining real-time transaction data through financial data interfaces like CTP and IBKR, ultimately forming a millisecond-level raw tick sequence; the division of the raw tick sequence into high-frequency and low-frequency slices can be achieved through a sliding window algorithm, such as dividing high-frequency slices based on a fixed time window (e.g., 500ms) and generating low-frequency slices through downsampling (e.g., 1-minute aggregation); the extraction of extreme points in the high-frequency slices and trend inflection points in the low-frequency slices can be achieved through extreme value detection algorithms, such as using Z-score peak detection or first-order difference method to identify local extreme points in the high-frequency slices; the statistical multi-level granularity labels corresponding to the market data stream can be achieved through sequence feature engineering, such as using the tsfresh library to automatically extract minute / hour / day-level statistical features (e.g., volatility, trading volume) and generate hierarchical labels; the multi-granularity slicing of the market data stream can be achieved through a streaming processing framework, such as dynamically generating second / minute / hour-level slice data through Flink's TimeWindow mechanism, ultimately obtaining granular slice data.
[0043] This invention, by extracting the statistical distribution characteristics from the granular slice data, can help quantitative trading practitioners accurately understand market patterns, analyze the distribution patterns of data such as prices and trading volumes, and determine the stability and anomalies of market fluctuations.
[0044] The statistical distribution characteristics refer to the properties of the granular slice data in terms of probability distribution. These include the central tendency of the data, such as the mean, median, and mode, reflecting the central location of the data; the dispersion, such as variance and standard deviation, reflecting the magnitude of data fluctuation; the skewness coefficient, used to measure the asymmetry of the data distribution and determine whether the data is left-skewed or right-skewed; and the kurtosis coefficient, describing the peak value of the data distribution, i.e., whether the data distribution is more peaked or flatter compared to the normal distribution. Optionally, the extraction of statistical distribution characteristics from the granular slice data can be achieved through statistical analysis tools, such as using Pandas' describe() function to calculate basic statistics such as mean, standard deviation, and quartiles, ultimately obtaining the data distribution characteristics.
[0045] S3. Activate the signal plugin group in the full plugin library, analyze the dynamic calculation factors in the signal plugin group, calculate the time-series correlation index between the dynamic calculation factors, and perform composite processing on the time-series correlation index based on the preset weight allocation strategy to obtain a composite instruction set.
[0046] This invention, by activating the signal plugin group in the full plugin library and analyzing the dynamic calculation factors in the signal plugin group, can reveal the key driving factors of the market under different time periods and conditions, helping investors to flexibly adjust their trading strategies, adapt to the complex and ever-changing market environment, and improve the scientific nature and profit potential of trading decisions.
[0047] The signal plugin group refers to a collection of plugins with specific functions in the full plugin library. Its core task is to generate various signals in quantitative trading. For example, some plugins are specifically based on technical analysis indicators, such as moving average crossovers and Relative Strength Index (RSI) overbought / oversold conditions, to generate trading signals; others combine macroeconomic data and company financial statement data, using specific models to calculate trading signals related to market trends and company valuation. The dynamic calculation factor refers to the variables or parameters involved in the signal plugin group's calculation process that change continuously with market conditions and time. For example, in a price momentum-based signal plugin, the short-term rate of change of price and the increase or decrease of trading volume are considered. Factors such as amplitude may be dynamically calculated. These factors are updated in real time based on the market data generated at each new trading moment. Optionally, the activation of the signal plugin group in the full plugin library can be achieved through a periodic management framework, such as using OSGi's BundleActivator interface or Spring's @PostConstruct annotation to initialize the specified plugin group in the order of dependencies, ultimately forming an executable signal plugin group. The analysis of the dynamically calculated factors in the signal plugin group can be achieved through factor analysis algorithms, such as applying principal component analysis (PCA) or independent component analysis (ICA) dimensionality reduction techniques to extract key influencing factors from the plugin output.
[0048] Furthermore, by calculating the time-series correlation index between the dynamic calculation factors, this invention not only provides a key basis for constructing a more reasonable and effective trading model and optimizing strategy parameter settings, but also provides early warning of potential market changes, enhances the adaptability of trading strategies to complex and ever-changing market environments, and improves the accuracy of trading decisions and the stability of returns.
[0049] The time-series correlation index is used to measure the degree of correlation and trend of change of multiple dynamic calculation factors in a time series. It comprehensively considers the values of different factors in a specific time period, their interaction relationships, and the influence of external interference.
[0050] As an embodiment of the present invention, the calculation of the time-series correlation index between the dynamic calculation factors includes: The temporal correlation index between the dynamic calculation factors is calculated using the following formula: ; in, This represents the time-series correlation index between the dynamically calculated factors. and These represent the start and end points of the dynamic time interval, respectively. This represents the total number of the dynamically calculated factors. and These represent the quantity indices corresponding to the dynamically calculated factors. Indicates the first The and the first The correlation weight coefficients between the dynamic calculation factors Indicates the first A dynamic calculation factor in time The measured value at time [time]. Indicates the amount of time delay. Indicates the number of interfering factors. Index representing the number of interfering factors. Indicates the first The interference intensity value corresponding to each interference factor.
[0051] In detail, the dynamic time interval refers to a time range selected when analyzing dynamic calculation factors. This range is not fixed but is dynamically adjusted according to actual analytical needs, market changes, etc. Starting point The factor data within this interval, serving as the endpoint, is used to calculate the time-series correlation index to capture the correlation characteristics between factors during this period. The correlation weight coefficient refers to the correlation weight coefficient between the i-th and j-th dynamically calculated factors, reflecting the relative importance of the correlation between different factors. Its value is determined based on factors such as the nature of the factors and their historical correlation performance. The measured value refers to the measured value of the i-th dynamically calculated factor at time t. This value is obtained through actual measurement, statistics, or calculation based on relevant data, and is the fundamental data for calculating the time-series correlation index, reflecting the actual state of the factors at each time point. The time delay refers to the amount used to examine the correlation between different dynamically calculated factors in chronological order. For example, a change in one factor may not immediately trigger a response from another factor, but rather after a delay... The effect only occurs after a certain time. By setting and analyzing this delay, the dynamic transmission mechanism between factors can be grasped more accurately. The interference factors refer to various internal and external factors that affect the real correlation between dynamic calculation factors. These factors can include sudden market news, changes in macroeconomic policies, and data statistical errors. The interference intensity value refers to the interference intensity value corresponding to the k-th interference factor. It quantifies the degree to which each interference factor interferes with the correlation between dynamic calculation factors. The larger the value, the more significant the impact of the interference factor.
[0052] Furthermore, the numerator in the above formula: First, the dynamic calculation factors are combined in pairs, where... It is the correlation weight coefficient between the i-th and j-th dynamically calculated factors, reflecting the importance of their correlation; It is the measured value of the i-th dynamic calculation factor at time t. Is the j-th dynamic calculation factor in Real-time measured values, taking time delay into account. The interaction between factors, and the double summation, comprehensively consider the interaction of all factor combinations at different times; the denominator in the above formula: , It is the interference intensity value of m interference factors. The sum of squares is performed, and the interference intensity value measures the degree of influence of each interfering factor on the factor correlation. Summing the squares is done to comprehensively consider the overall interference effect of all interfering factors. Taking the square root then normalizes the overall influence of the interfering factors, ensuring its magnitude matches the numerator. The denominator eliminates the influence of interfering factors on the true correlation between factors, making the calculated result more accurate. It can better reflect the true temporal correlation between dynamic calculation factors.
[0053] Based on a preset weight allocation strategy, this invention performs composite processing on the time-series correlation index to obtain a composite instruction set, which provides more comprehensive and accurate guidance for quantitative trading decisions, helps to grasp market dynamics in a timely manner, optimize trading strategies, enhance the ability to cope with complex market environments, and improve the stability and reliability of investment returns.
[0054] The composite instruction set refers to the final instruction set obtained by composite processing of standardized instruction sequences. It integrates the processing results of previous steps, incorporates key information in time-series correlation indices, and presents them in the form of standardized instructions, providing direct operational guidance for the formulation and execution of quantitative trading strategies.
[0055] As an embodiment of the present invention, the step of performing composite processing on the time-series correlation index based on a preset weight allocation strategy to obtain a composite instruction set includes: extracting dynamic feature parameters from the time-series correlation index; performing weighted fusion on the dynamic feature parameters based on the preset weight allocation strategy to obtain fused feature parameters; generating a fused instruction matrix corresponding to the fused feature parameters; normalizing the instructions in the fused instruction matrix to obtain a standardized instruction sequence; and performing composite processing on the standardized instruction sequence to obtain a composite instruction set.
[0056] The dynamic feature parameters are extracted from the time-series correlation index and reflect the changes in the correlation characteristics of dynamic calculation factors over time. They encompass information such as the strength, trend, and time delay of the correlation between factors and are key elements after further analysis and deconstruction of the time-series correlation index. The fusion feature parameters are obtained by weighting and fusing the extracted dynamic feature parameters according to their respective weights based on a preset weight allocation strategy. By weighting, the influence of important dynamic feature parameters is highlighted and the influence of secondary parameters is weakened, so that the fused parameters better reflect the key information of the overall correlation characteristics. The fusion instruction matrix is a set of instruction in matrix form generated from the fusion feature parameters. The elements in the matrix correspond to the relevant information of the fusion feature parameters and are arranged according to specific rules, transforming the fusion feature parameters into an instruction matrix form that is easy for computers to process and analyze. The standardized instruction sequence is a sequence obtained by normalizing the instructions in the fusion instruction matrix. The normalization process limits the instruction values to a specific range, eliminates the dimensional differences between different instructions, and makes the instruction sequence more comparable and standardized.
[0057] Furthermore, the extraction of dynamic feature parameters from the time-series correlation index can be achieved through time-series feature engineering, such as using the tsfresh library to automatically extract statistical features (such as mean and variance), time-series features (such as autocorrelation coefficient), and structural features (such as Fourier transform coefficients), ultimately obtaining multi-dimensional dynamic feature parameters; the weighted fusion of the dynamic feature parameters can be achieved through multi-objective optimization algorithms, such as using entropy weighting or AHP (analytic hierarchy process) to calculate the objective weights of each feature parameter and performing linear weighted fusion; the generation of the fusion instruction matrix corresponding to the fused feature parameters can be achieved through matrix operation libraries, such as using NumPy to perform tensor product operations with a preset instruction template to generate an initial instruction matrix; the normalization of instructions in the fused instruction matrix can be achieved through regularization methods, such as using L1 / L2 regularization to constrain the instruction weight distribution, ultimately obtaining a standardized instruction sequence with a unified numerical range; the composite processing of the standardized instruction sequence can be achieved through reinforcement learning methods, such as simulating the effect of instruction combination based on the DQN (Deep Q-Network) model, and outputting the optimal composite instruction set after iterative optimization.
[0058] S4. Evaluate the execution path of the composite instruction set in the historical backtesting environment, extract the execution decay characteristics and fitting risk index in the execution path, and calculate the interference impact coefficient corresponding to the target quantized data based on the execution decay characteristics and the fitting risk index.
[0059] This invention evaluates the execution path of the composite instruction set in a historical backtesting environment, allowing for backtracking of the execution path and providing a clear insight into the triggering timing and execution effect of instructions in different market scenarios, thus accurately identifying the advantages and disadvantages of the strategy.
[0060] The historical backtesting environment refers to a simulated trading scenario that uses historical financial market data to simulate and test quantitative trading strategies (such as strategies represented by composite instruction sets). In this environment, the composite instruction set is executed sequentially according to historical data, generating buy and sell signals and simulating trading operations just like in real trading. Through this simulation, investors can intuitively see the performance of the strategy under different market conditions in the past, including profitability, risk exposure, and trading frequency. The execution path refers to the complete trajectory of the composite instruction set in the historical backtesting environment, starting from the initial state and progressing over time, based on market data, as instructions are triggered and executed sequentially. It connects the execution nodes of each path, demonstrating the operation of the composite instruction set throughout the backtesting period, including when instructions are triggered, how they are executed, and the impact of each execution on trading positions and capital status.
[0061] As an embodiment of the present invention, evaluating the execution path of the composite instruction set in a historical backtesting environment includes: setting an initial parameter configuration in the historical backtesting environment; performing a first round of backtesting on the instructions in the composite instruction set based on the initial parameter configuration to obtain a backtesting path record; optimizing the data acquisition frequency corresponding to the backtesting data in the backtesting path record; performing iterative backtesting on the instructions in the composite instruction set based on the optimized data acquisition frequency to obtain an iterative path record; extracting the path execution nodes in the iterative path record; and evaluating the execution path of the composite instruction set in the historical backtesting environment based on the path execution nodes.
[0062] The initial parameter configuration refers to a series of basic conditions set for simulated trading when building the historical backtesting environment. This includes the start and end times of the trading, determining the historical data time period involved in the backtesting, and the initial capital amount, clarifying the available capital at the start of the simulated trading, which affects the setting of trading positions. The backtesting path record refers to the detailed recording of the instruction execution trajectory and related data during the first round of backtesting on the instructions in the composite instruction set. It records when each instruction is triggered, the market data at the time of triggering (such as asset prices and trading volume), and the trading results after instruction execution, including whether the trade was successful, the transaction price, and changes in position size. These records are arranged chronologically to form a complete instruction execution path. The data acquisition frequency refers to the time interval at which data is acquired from historical market data during the historical backtesting process, such as acquiring data once per second, once per minute, or once per hour. A higher data acquisition frequency indicates a higher level of data acquisition. While it can acquire more detailed market change information, making backtesting results closer to real trading scenarios, it also increases data processing volume and backtesting time. Although a lower data collection frequency results in smaller data processing volumes and faster backtesting speeds, it may miss some important instantaneous market changes, affecting the accuracy of backtesting results. The iterative path record refers to the new instruction execution path record generated by backtesting the instructions in the composite instruction set based on the optimized data collection frequency. The iterative path record also records detailed information such as instruction trigger time, relevant market data, and trading results. The path execution node refers to the key time points and corresponding instruction execution states extracted from the iterative path record. These nodes mark the occurrence of important events in the instruction execution process, such as the first instruction trigger point, position adjustment point, and points where trading profits or losses reach a specific threshold. Each node contains market environment information at that time (such as price, trading volume, etc.) and the specific details of instruction execution (such as transaction price, trading direction, etc.).
[0063] Furthermore, the initial parameter configuration in the historical backtesting environment can be achieved through a parameter optimization framework, such as using Optuna or Hyperopt for Bayesian optimization search to automatically determine the optimal initial parameter combination and ultimately obtain the initial parameter configuration. The first round of backtesting of the instructions in the composite instruction set can be achieved through discrete simulation tools, such as using SimPy to construct a virtual trading environment and ultimately generating backtesting path records containing information such as buy / sell points and transaction prices. Optimizing the data acquisition frequency corresponding to the backtesting data in the backtesting path records can be achieved through wavelet transform, such as using Haar wavelets to analyze market fluctuation characteristics, dynamically adjusting the sampling granularity for different time periods, and ultimately determining the optimal data acquisition. Frequency; the iterative backtesting of instructions in the composite instruction set can be achieved through reinforcement learning, such as: constructing a PPO (Proximal Policy Optimization) agent to learn from the environment, and finally generating an iterative path record containing multiple generations of optimization records; the extraction of path execution nodes in the iterative path record can be achieved through graph pattern mining, such as: using Neo4j's graph query language to locate frequently occurring node combinations, and finally extracting strategically valuable path execution nodes; the evaluation of the execution path of the composite instruction set in the historical backtesting environment can be achieved through spatiotemporal similarity analysis, such as: applying the DTW (Dynamic Time Warping) algorithm to compare the fit between the actual path and the ideal path, and finally generating a quantitative evaluation report and a visualized execution path.
[0064] This invention extracts the execution decay characteristics and fits risk indicators in the execution path to quantify the potential risks faced by the strategy, such as market volatility and capital drawdown risks. Furthermore, it can comprehensively evaluate the stability and reliability of the composite instruction set, accurately locate problems, and provide strong support for optimizing strategies, controlling risks, and improving investment returns.
[0065] The execution decay characteristic refers to a series of characteristics in the execution path of a composite instruction set, where the execution effect gradually deteriorates over time or with an increase in trading rounds. This can be manifested as a decrease in the accuracy of trading signals, with signals that could originally effectively capture profit opportunities triggering fewer profitable trades in subsequent executions; a downward trend in trading returns, with the average profit margin per trade decreasing, and even an increase in the proportion of losing trades; and a weakening of the timeliness of instruction execution, with the time delay from signal generation to actual trade execution gradually lengthening, leading to missed optimal trading opportunities. The fitted risk index refers to a series of numerical indicators that quantify the risk faced by the composite instruction set by mathematical modeling and statistical analysis of various data in the execution path. Common fitted risk indices include, but are not limited to, the maximum drawdown rate, which measures the risk under specific conditions. The decline from the highest to the lowest point of asset value within a given time period reflects the maximum potential loss of the strategy. Volatility measures the degree of fluctuation in asset prices or portfolio returns; higher volatility implies greater uncertainty and risk. Value at Risk (VaR) represents the maximum amount of loss a portfolio will face within a specific future time period at a given confidence level, providing a clear picture of the potential losses of the strategy under different risk tolerance levels. Optionally, the extraction of execution decay features from the execution path can be achieved using time series decomposition algorithms, such as applying STL to decompose the execution path data and extracting the long-term trend decay component as a decay feature. The fitted risk index can be achieved through volatility modeling, such as dynamically estimating the volatility risk index of the execution path using a GARCH (Generalized Autoregressive Conditional Heteroskedasticity) model.
[0066] Based on the execution decay characteristics and the fitted risk index, this invention calculates the interference impact coefficient corresponding to the target quantified data, which can accurately quantify the degree of interference of various factors on the target data, clarify the combined effect of execution decay and risk index, and provide in-depth insight into potential problems in strategy operation and early warning of risks.
[0067] The interference impact coefficient refers to the coefficient that comprehensively considers the weights, correlations, and moderating effects of various factors based on the execution attenuation characteristics and fitting risk indicators. This coefficient is used to accurately measure the degree of interference of these factors on the target quantitative data, and can help analysts clearly understand the level of interference to the target quantitative data.
[0068] As an embodiment of the present invention, the step of calculating the interference impact coefficient corresponding to the target quantized data based on the execution attenuation characteristics and the fitting risk index includes: The interference impact coefficient corresponding to the target quantized data is calculated using the following formula: ; in, This represents the interference impact coefficient corresponding to the target quantized data. Represents the normalization constant. This represents the total number of features corresponding to the execution attenuation feature. This represents the index of the quantity corresponding to the execution decay feature. This represents the total number of indicators corresponding to the fitted risk index. This represents the quantity index corresponding to the fitted risk index. Indicates the first The feature weight coefficients corresponding to each execution decay feature Indicates the first The weight coefficients of each fitting risk indicator, Indicates the first The execution decay characteristic and the first Positive correlation values between the fitted risk indicators Indicates the first The execution decay characteristic and the first The negative correlation value between the fitted risk indicators Indicates the first The execution decay characteristic and the first Adjustment coefficients between the fitted risk indicators.
[0069] In detail, the normalization constant refers to the summation operation of multiple factors in the formula. The value range and magnitude of each factor may vary greatly. By dividing by the normalization constant, the final calculation result can be limited to a suitable and uniform value range. The feature weight coefficient refers to a feature that includes multiple different aspects. Each feature has a different degree of importance in influencing the target quantified data. This weight coefficient is used to reflect the relative importance of the v-th execution decay feature in the overall execution decay feature's interference with the target quantified data. The indicator weight coefficient refers to a risk measurement indicator that covers multiple different types. Their contribution to the interference with the target quantified data varies. This weight coefficient is used to measure the importance of the l-th fitting risk indicator in the overall fitting risk indicator system's influence on the target quantified data. The positive correlation value refers to the quantification of the two factors. The positive correlation value reflects the degree to which factors mutually promote and synergistically enhance the interference effect on the target quantitative data. For example, when the accuracy of trading signals in the execution decay feature decreases simultaneously and the volatility in the fitted risk indicator increases, and they mutually promote and interfere with each other, the positive correlation value reflects the magnitude of this enhancing effect. The negative correlation value reflects the degree to which the two factors mutually inhibit and offset each other, reducing the interference effect on the target quantitative data. For example, if the timeliness of trading deteriorates in the execution decay feature, but the value of risk in the fitted risk indicator decreases, the two may have a mutually inhibiting interference effect, and the negative correlation value measures the degree of this inhibiting effect. The adjustment coefficient refers to the contribution of the correlation between the two factors to the calculation of the interference influence coefficient. The adjustment coefficient can be set according to the specific situation and the complex relationship between the two factors, so that the calculation results are more in line with the actual interference influence.
[0070] S5. Based on the interference impact coefficient, the topology of the plug-in combination in the full plug-in library is reconstructed to obtain the reconstructed plug-in group. The data feedback loop in the reconstructed plug-in group is extracted, and the resource occupation waveform in the data feedback loop is collected. The stack trace pattern corresponding to the resource occupation waveform is analyzed. Based on the stack trace pattern and the preset fault tolerance rule library, the full plug-in trading architecture corresponding to the target quantitative data is generated.
[0071] Based on the interference influence coefficient, this invention performs topology reconstruction on the plugin combinations in the full plugin library to obtain a reconstructed plugin group. This can specifically optimize the connection and collaboration methods between plugins, remove inefficient or conflicting connections, strengthen key associations, and improve the overall operating efficiency and stability of the plugin group.
[0072] The reconstructed plugin group refers to the combination of plugins in the anti-interference plugin set that are rebuilt according to the optimized topology. For example, in quantitative trading of digital currencies, the anti-interference plugin set includes plugins that calculate trading volume trends and plugins that analyze on-chain activity. Through topology reconstruction, the data transmission order and interaction methods between them are adjusted to make the collaboration between plugins more efficient and reduce data redundancy and conflicts.
[0073] As an embodiment of the present invention, the step of performing topological reconstruction on the plugin combinations in the full plugin library based on the interference influence coefficient to obtain a reconstructed plugin group includes: parsing the interference influence factors corresponding to the interference influence coefficient; calculating the interference sensitivity corresponding to the plugin combinations in the full plugin library based on the interference influence factors; filtering out easily interfered plugins in the plugin combinations based on the interference sensitivity to obtain an anti-interference plugin set; and performing topological reconstruction on the plugins in the anti-interference plugin set to obtain a reconstructed plugin group.
[0074] The aforementioned interfering factors refer to various reasons that cause interference to the target quantitative data, covering many aspects related to execution decay characteristics and fitting risk indicators. For example, in quantitative trading, sudden major policy adjustments in the market can reduce the accuracy of trading signals in the execution decay characteristics and increase the volatility in the fitting risk indicators; this is a type of interfering factor. The aforementioned interference sensitivity refers to an indicator that measures the degree to which the combination of plugins in the entire plugin library reacts to interfering factors. Taking a stock quantitative trading plugin combination as an example, if there is a plugin that specifically calculates buy and sell signals based on price trends, and its output signal fluctuates greatly when there are interfering factors such as sharp market fluctuations, it indicates that it is highly sensitive to market volatility. The term "easily interfered plugins" refers to plugins that are easily interfered with in the plugin combination. In the context of plugins, those that are highly susceptible to interference and exhibit poor stability—for example, in a futures trading plugin group, there might be a plugin that calculates short-term arbitrage opportunities based on minute-level price fluctuations—will significantly deviate from normal conditions and frequently issue erroneous signals if there are interference factors such as insufficient market liquidity or abnormally large order impacts. Such plugins are considered easily affected by interference. The anti-interference plugin set, on the other hand, refers to the set of relatively stable plugins that are less affected by interference, retained after filtering out easily affected plugins from the plugin portfolio. For example, in a forex trading plugin portfolio, after filtering out plugins that are sensitive to sudden exchange rate fluctuations and prone to errors, the remaining plugins—those based on long-term trend analysis of macroeconomic indicators and those that calculate exchange rate ranges according to central bank policy rules—form the anti-interference plugin set.
[0075] Furthermore, the analysis of the interference influence factors corresponding to the interference influence coefficient can be achieved through sensitivity analysis tools, such as using the Sobol exponent method to quantify the contribution of each input parameter to the interference coefficient, and finally determining the dominant interference influence factor; the calculation of the interference sensitivity corresponding to the plugin combination in the full plugin library can be achieved through frequency domain analysis methods, such as applying Fourier transform to extract the spectral features of the plugin signal and quantifying the sensitivity through harmonic distortion; the removal of easily interfered plugins in the plugin combination can be achieved through cluster analysis methods, such as using the DBSCAN algorithm to automatically separate abnormal plugins based on sensitivity characteristics, and finally obtaining an anti-interference plugin set; the removal of easily interfered plugins in the plugin combination can be achieved through an adaptive orchestration framework, such as using Kubernetes Operators to dynamically schedule plugin instances and build a refactored plugin group with self-healing capabilities.
[0076] This invention extracts the data feedback loop in the reconstructed plug-in group and collects the resource usage waveform in the data feedback loop. This allows for a clear understanding of the data flow and resource usage within the plug-in group, ensuring its stable and efficient operation in complex trading scenarios. This helps investors seize trading opportunities and improve the quality of trading strategy execution.
[0077] The data feedback loop refers to a closed-loop data flow structure formed within the reconstructed plugin group. In quantitative trading scenarios, after a plugin processes the input data, its output data does not simply pass through unidirectionally and end the process. Instead, some or all of the data flows back to other plugins or the plugin itself for secondary processing, verification, and adjustment. For example, plugin A, used to analyze market trends, generates a trend judgment result based on price and volume data. This result is not only passed to plugin B, which determines trading timing, but also fed back to plugin A itself. It is then combined with the latest market data to correct the previously generated trend judgment, forming a continuously optimized and cyclical data processing flow. The resource usage waveform refers to a curve plotted with time as the horizontal axis and the resource usage (such as CPU utilization, memory consumption, network bandwidth consumption, etc.) of the reconstructed plugin group during operation as the vertical axis, showing how it changes over time. For example, during peak trading periods, the CPU utilization of the reconstructed plugin group may increase sharply, which is represented as a curve on the resource usage waveform. The peaks on the waveform; when the transaction is relatively stable, the memory usage remains at a relatively stable level, and the corresponding waveform shows a relatively flat state. Optionally, the extraction of the data feedback loop in the reconstructed plug-in group can be achieved by dynamic tracking tools, such as: using eBPF technology to capture IPC communication between plug-ins in real time, constructing a feedback loop topology diagram, and finally obtaining a complete data loop containing positive control and reverse feedback; the acquisition of the resource usage waveform in the data feedback loop can be achieved by adaptive sampling technology, such as: the wavelet transform-based dynamic sampling algorithm (WaveletSampler) automatically increases the sampling frequency when resource fluctuations are severe, and finally obtains a high-fidelity resource usage waveform sequence.
[0078] Furthermore, by analyzing the stack trace corresponding to the resource usage waveform, this invention records the order of operations such as function calls and resource allocation by the plugin group. By parsing it, abnormal points in resource usage can be located, such as the root cause of a plugin's recursive call causing a continuous increase in CPU resources.
[0079] The stack trace refers to the traces of function call stack states recorded during program execution. In the refactoring plugin group, it records the plugin call order and resource allocation. For example, when calculating complex indicators in the quantitative trading plugin group, the data reading plugin is called first to obtain price data, and then the algorithm plugin is called to process the data. The stack trace will record these operations in the call order, which facilitates backtracking and analysis of the flow and occupation of resources in each plugin operation. Optionally, the analysis of the stack trace corresponding to the resource occupation waveform can be achieved through call stack sampling technology, such as using Linuxperf's stack sampling mode to capture complete call chain information at resource peaks / troughs and generate time-aligned stack traces.
[0080] Furthermore, based on the stack trace pattern combined with a preset fault-tolerant rule library, the present invention generates a fully pluggable trading architecture corresponding to the target quantitative data. This improves the trading architecture's adaptability to complex market environments, reduces trading errors caused by system failures, provides investors with more stable and reliable quantitative trading support, and helps achieve more efficient investment strategies.
[0081] The pre-built fault-tolerant rule base refers to a pre-constructed set of rules specifically designed to handle various anomalies that may occur during the processing and trading of target quantitative data. For example, when it is detected that a plugin's memory usage is about to exceed the threshold due to excessive data volume, the rule base sets rules to automatically pause some non-critical tasks of that plugin, clean up the data cache, or start an alternative data processing path. In the event of a sudden network interruption, the rule base stipulates switching to local cached data to continue trading calculations, while simultaneously initiating a network repair process and issuing an alarm notification. The fully pluggable trading architecture refers to a modular structure design that breaks down the quantitative trading system into multiple independent pluggables. Each pluggable performs a specific function, such as a data acquisition pluggable responsible for acquiring market data from various data sources, a risk assessment pluggable performing real-time calculations of trading risks, and a trading decision pluggable generating buy and sell orders based on various factors. These pluggables are interconnected and interact through standardized interfaces to collaboratively complete the entire quantitative trading process. Its advantages lie in its high flexibility and scalability. Plugins can be easily added, deleted, or replaced according to market changes and investor needs. For example, when a new trading strategy emerges, the corresponding strategy plugin can be quickly integrated. At the same time, the independence of the plugins ensures that the failure of a single plugin will not have a fatal impact on the entire trading architecture. Fault tolerance mechanisms can isolate or repair faulty plugins, ensuring continuous trading. Optionally, the fully pluggable trading architecture that generates the target quantitative data can be implemented through a microservice orchestration engine, such as using Kubernetes Operators Custom Resource Definitions (CRDs) to declaratively manage the lifecycle of trading plugins, using the Istio service mesh to achieve secure communication between plugins, and finally building an elastically scalable distributed plugin architecture.
[0082] Compared to the problems described in the background art, this invention, by configuring a full plug-in library corresponding to the target quantitative data, can enhance the collaborative capabilities of each link in the system, optimize processes from data processing and signal generation to order execution, and bring greater flexibility and adaptability to quantitative trading. By generating priority scheduling queues corresponding to each node in the process topology diagram, this invention can significantly improve the overall system response speed, effectively cope with complex and ever-changing trading environments, help investors seize fleeting trading opportunities, and increase trading returns. Furthermore, by activating the signal plug-in group in the full plug-in library and analyzing the dynamic calculation factors in the signal plug-in group, this invention can reveal the market's performance under different time periods and conditions. Key driving factors help investors flexibly adjust their trading strategies to adapt to complex and ever-changing market environments, enhancing the scientific nature and profit potential of trading decisions. Furthermore, by evaluating the execution path of the composite instruction set in a historical backtesting environment, this invention can trace the execution path back to clearly understand the triggering timing and execution effects of instructions in different market scenarios, accurately identifying the strengths and weaknesses of the strategy. Finally, based on the interference impact coefficient, this invention performs topological reconstruction on the plugin combinations in the full plugin library, obtaining a reconstructed plugin group. This allows for targeted optimization of the connections and collaboration between plugins, removing inefficient or conflicting connections, strengthening key correlations, and improving the overall operating efficiency and stability of the plugin group. Therefore, the fully pluggable quantitative trading method and system provided by this invention can improve the collaborative adaptability of quantitative trading systems.
[0083] Example 2: like Figure 2 The diagram shown is a functional block diagram of a fully plug-in quantitative trading system according to the present invention.
[0084] The fully pluggable quantitative trading system 200 described in this invention can be installed in an electronic device. Depending on the functions implemented, the fully pluggable quantitative trading system may include a topology graph construction module 201, a feature extraction module 202, a composite processing module 203, an interference coefficient module 204, and an architecture generation module 205. The modules described in this invention can also be referred to as units, which are a series of computer program segments that can be executed by the processor of an electronic device and can perform a fixed function, and are stored in the memory of the electronic device.
[0085] In this embodiment of the invention, the functions of each module / unit are as follows: The topology construction module 201 is used to configure the full plug-in library corresponding to the target quantization data, parse the function description files corresponding to each plug-in in the full plug-in library, extract the file constraint rules in the function description files, and construct the process topology diagram corresponding to the target quantization data based on the file constraint rules. The feature extraction module 202 is used to generate priority scheduling queues corresponding to each node in the process topology diagram, collect market data streams in the priority scheduling queues in real time, perform multi-granularity slicing on the market data streams to obtain granular slice data, and extract statistical distribution features from the granular slice data. The composite processing module 203 is used to activate the signal plug-in group in the full plug-in library, analyze the dynamic calculation factors in the signal plug-in group, calculate the time-series correlation index between the dynamic calculation factors, and perform composite processing on the time-series correlation index based on a preset weight allocation strategy to obtain a composite instruction set. The interference coefficient module 204 is used to evaluate the execution path of the composite instruction set in the historical backtesting environment, extract the execution attenuation characteristics and fitting risk index in the execution path, and calculate the interference impact coefficient corresponding to the target quantized data based on the execution attenuation characteristics and the fitting risk index. The architecture generation module 205 is used to perform topology reconstruction on the plugin combination in the full plugin library based on the interference impact coefficient to obtain a reconstructed plugin group, extract the data feedback loop in the reconstructed plugin group, collect the resource occupation waveform in the data feedback loop, analyze the stack trace pattern corresponding to the resource occupation waveform, and generate a full plugin-based trading architecture corresponding to the target quantitative data based on the stack trace pattern and a preset fault tolerance rule library.
[0086] In detail, the modules in the fully plug-in quantitative trading system 200 described in this embodiment of the invention adopt the same approach as described above when in use. Figure 1 The method uses the same technical means as the fully plug-in quantitative trading method described in the article and can produce the same technical effects, so it will not be repeated here.
[0087] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0088] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A fully plug-in-based quantitative trading method, characterized in that, The method includes: Configure the full plugin library corresponding to the target quantization data, parse the function description files corresponding to each plugin in the full plugin library, extract the file constraint rules in the function description files, and construct the process topology diagram corresponding to the target quantization data based on the file constraint rules. Generate priority scheduling queues corresponding to each node in the process topology diagram, collect market data streams in the priority scheduling queues in real time, perform multi-granularity slicing on the market data streams to obtain granular slice data, and extract statistical distribution features from the granular slice data. Activate the signal plugin group in the full plugin library, analyze the dynamic calculation factors in the signal plugin group, calculate the time correlation index between the dynamic calculation factors, and perform composite processing on the time correlation index based on the preset weight allocation strategy to obtain a composite instruction set. The execution path of the composite instruction set in the historical backtesting environment is evaluated, the execution decay characteristics and fitting risk index in the execution path are extracted, and the interference impact coefficient corresponding to the target quantized data is calculated based on the execution decay characteristics and the fitting risk index. Based on the interference impact coefficient, the topology of the plugin combination in the full plugin library is reconstructed to obtain the reconstructed plugin group. The data feedback loop in the reconstructed plugin group is extracted, and the resource occupation waveform in the data feedback loop is collected. The stack trace pattern corresponding to the resource occupation waveform is analyzed. Based on the stack trace pattern and the preset fault tolerance rule library, the full plugin-based trading architecture corresponding to the target quantitative data is generated.
2. The fully plug-in-based quantitative trading method as described in claim 1, characterized in that, The process topology diagram corresponding to the target quantized data, constructed based on the file constraint rules, includes: Parse the constraint operators in the file constraint rules; Based on the constraint operator, identify the parallel-to-serial execution domain corresponding to the target quantized data; Extract redundant connection points from the parallel-serial execution domain; Based on the redundant connection points, plan the process topology nodes corresponding to the target quantified data; Based on the process topology nodes, construct the process topology diagram corresponding to the target quantification data.
3. The fully plug-in-based quantitative trading method as described in claim 1, characterized in that, The generation of priority scheduling queues corresponding to each node in the process topology diagram includes: The process topology diagram is parsed to obtain node information groups; Identify the priority attribute corresponding to each node in the node information group; Based on the priority attribute, calculate the scheduling weight value corresponding to each node in the node information group; Based on the scheduling weight values, analyze the scheduling order relationship of each node in the process topology diagram; Based on the scheduling order relationship, a priority scheduling queue corresponding to each node in the process topology diagram is generated.
4. The fully plug-in-based quantitative trading method as described in claim 1, characterized in that, The process of performing multi-granularity slicing on the market data stream to obtain granular slice data includes: Collect the raw tick sequence from the market data stream; Based on a preset time window, the original tick sequence is divided into high-frequency slices and low-frequency slices; Extract the extreme points in the high-frequency slices and the trend inflection points in the low-frequency slices respectively; Based on the extreme points and the trend inflection points, statistically analyze the multi-level granularity labels corresponding to the market data stream; Based on the multi-level granularity labels, the market data stream is processed into multi-granularity slices to obtain granular slice data.
5. The fully plug-in-based quantitative trading method as described in claim 1, characterized in that, The calculation of the time-series correlation index between the dynamic calculation factors includes: The temporal correlation index between the dynamic calculation factors is calculated using the following formula: ; in, This represents the time-series correlation index between the dynamically calculated factors. and These represent the start and end points of the dynamic time interval, respectively. This represents the total number of the dynamically calculated factors. and These represent the quantity indices corresponding to the dynamically calculated factors. Indicates the first The and the first The correlation weight coefficients between the dynamic calculation factors Indicates the first A dynamic calculation factor in time The measured value at time [time]. Indicates the amount of time delay. Indicates the number of interfering factors. Index representing the number of interfering factors. Indicates the first The interference intensity value corresponding to each interference factor.
6. The fully plug-in-based quantitative trading method as described in claim 1, characterized in that, The time-series correlation index is composited based on a preset weight allocation strategy to obtain a composite instruction set, including: Extract the dynamic feature parameters from the time-series correlation index; Based on a preset weight allocation strategy, the dynamic feature parameters are weighted and fused to obtain fused feature parameters; Generate the fusion instruction matrix corresponding to the fusion feature parameters; The instructions in the fusion instruction matrix are normalized to obtain a standardized instruction sequence; The standardized instruction sequence is compounded to obtain a compound instruction set.
7. The fully plug-in-based quantitative trading method as described in claim 1, characterized in that, The evaluation of the execution path of the composite instruction set in the historical backtesting environment includes: Set the initial parameter configuration in the historical backtesting environment; Based on the initial parameter configuration, the first round of backtesting is performed on the instructions in the composite instruction set to obtain the backtesting path record; Optimize the data acquisition frequency corresponding to the backtest data in the backtest path record; Based on the optimized data acquisition frequency, iterative backtesting is performed on the instructions in the composite instruction set to obtain iterative path records; Extract the path execution nodes from the iterative path record; Based on the execution nodes of the path, evaluate the execution path of the composite instruction set in the historical backtesting environment.
8. The fully plug-in-based quantitative trading method as described in claim 1, characterized in that, The step of calculating the interference impact coefficient corresponding to the target quantized data based on the execution attenuation characteristics and the fitting risk index includes: The interference impact coefficient corresponding to the target quantized data is calculated using the following formula: ; in, This represents the interference impact coefficient corresponding to the target quantized data. Represents the normalization constant. This represents the total number of features corresponding to the execution attenuation feature. This represents the index of the quantity corresponding to the execution decay feature. This represents the total number of indicators corresponding to the fitted risk index. This represents the quantity index corresponding to the fitted risk index. Indicates the first The feature weight coefficients corresponding to each execution decay feature Indicates the first The weight coefficients of each fitting risk indicator, Indicates the first The execution decay characteristic and the first Positive correlation values between the fitted risk indicators Indicates the first The execution decay characteristic and the first The negative correlation value between the fitted risk indicators Indicates the first The execution decay characteristic and the first Adjustment coefficients between the fitted risk indicators.
9. The fully plug-in-based quantitative trading method as described in claim 1, characterized in that, Based on the interference impact coefficient, the topology of the plugin combinations in the full plugin library is reconstructed to obtain a reconstructed plugin group, including: Analyze the interference factors corresponding to the interference influence coefficient; Based on the aforementioned interference factors, calculate the interference sensitivity of the plugin combinations in the full plugin library; Based on the interference sensitivity, easily interfered plugins in the plugin combination are screened out to obtain an anti-interference plugin set. The topology of the anti-interference plugin group is reconstructed to obtain the reconstructed plugin group.
10. A fully plug-in-based quantitative trading system, characterized in that, The system includes: The topology construction module is used to configure the full plug-in library corresponding to the target quantization data, parse the function description files corresponding to each plug-in in the full plug-in library, extract the file constraint rules in the function description files, and construct the process topology diagram corresponding to the target quantization data based on the file constraint rules. The feature extraction module is used to generate priority scheduling queues corresponding to each node in the process topology diagram, collect market data streams in the priority scheduling queues in real time, perform multi-granularity slicing on the market data streams to obtain granular slice data, and extract statistical distribution features from the granular slice data. The composite processing module is used to activate the signal plug-in group in the full plug-in library, analyze the dynamic calculation factors in the signal plug-in group, calculate the time-series correlation index between the dynamic calculation factors, and perform composite processing on the time-series correlation index based on a preset weight allocation strategy to obtain a composite instruction set. The interference coefficient module is used to evaluate the execution path of the composite instruction set in the historical backtesting environment, extract the execution decay characteristics and fitting risk index in the execution path, and calculate the interference impact coefficient corresponding to the target quantized data based on the execution decay characteristics and the fitting risk index. The architecture generation module is used to perform topology reconstruction on the plugin combination in the full plugin library based on the interference impact coefficient to obtain a reconstructed plugin group, extract the data feedback loop in the reconstructed plugin group, collect the resource occupation waveform in the data feedback loop, analyze the stack trace pattern corresponding to the resource occupation waveform, and generate the full plugin-based trading architecture corresponding to the target quantitative data based on the stack trace pattern and a preset fault tolerance rule library.