Quantization factor mining method and system based on deep sequence model

By acquiring and analyzing the price, transaction behavior, and capital flow characteristics of stock trading data, a transaction pattern migration judgment sequence and evolution path are constructed. The learning process of the deep sequence model is adjusted, which solves the problem of inaccurate generation of quantitative factors in the case of transaction pattern migration in the deep sequence model. This enables the quantitative factors to accurately represent and dynamically update the current market changes.

CN123181124APending Publication Date: 2026-11-27SHANGHAI FEICONVEX INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611332982.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-31
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In the context of stock trading pattern migration, existing technologies fail to accurately extract the hidden features of the current trading pattern using deep sequence models, resulting in the generated quantitative factors failing to accurately reflect market change characteristics.

Method used

By acquiring historical and current trading data of the target stock, extracting price changes, trading behavior and capital flow characteristics, generating a trading pattern migration judgment sequence, constructing a trading pattern evolution path, and using sequence migration control parameters to adjust the learning process of the deep sequence model, generating quantitative factors that contain the characteristics of the current trading pattern.

Benefits of technology

It improves the ability of quantitative factors to represent the current changes in the stock market, and can dynamically update the quantitative factor mining process to adapt to changes in stock trading patterns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181124A_ABST
    Figure CN123181124A_ABST
Patent Text Reader

Abstract

The application discloses a quantitative factor mining method and system based on a deep sequence model, relates to the technical field of quantitative factor mining, and specifically comprises the following steps: obtaining historical transaction data and current transaction data of a target stock, performing time sequence division on the historical transaction data and the current transaction data, extracting price change characteristics, transaction behavior characteristics and fund flow characteristics, and generating a transaction mode migration judgment sequence to determine whether the stock transaction mode is migrated; in the case that the stock transaction mode is migrated, change information between the price change characteristics, the transaction behavior characteristics and the fund flow characteristics before and after the transaction mode migration is extracted, and transaction mode change characteristics are generated. The application solves the problems of invalidation of historical transaction characteristics and insufficient quantitative factor representation ability caused by stock transaction mode migration, realizes dynamic adjustment of a deep sequence model learning process based on transaction mode change, and improves the adaptability and accuracy of quantitative factors to the current market state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quantitative factor mining technology, specifically to a quantitative factor mining method and system based on deep sequence models. Background Technology

[0002] Quantitative factor mining based on deep sequence models is a method that uses deep learning sequence modeling techniques to analyze and process financial time-series data, extracting quantitative features that reflect changes in the financial market. Existing techniques typically involve collecting financial data such as stock prices, trading volumes, and market indicators; cleaning, standardizing, and constructing time series data to form multi-dimensional time-series input; then, inputting the constructed time series into a deep sequence model; and learning the correlation between different time points through the model's feature extraction structure to obtain hidden feature representations containing time-varying patterns. Further, based on the high-dimensional feature information output by the model, candidate quantitative factors are generated through feature mapping, combinatorial calculations, etc., and the generated quantitative factors are analyzed and evaluated in conjunction with historical data to achieve quantitative factor mining. This type of technology typically involves financial data collection, time series construction, deep model training, feature representation learning, and quantitative factor generation.

[0003] The existing technology has the following shortcomings:

[0004] In the context of stock trading model migration, changes in listed companies' business structure, main business transformation, or market positioning alter investor focus, capital flow patterns, and trading behavior patterns. Consequently, the price change patterns, transaction behavior patterns, and capital flow patterns formed by historical stock trading data cannot fully reflect the market changes in the current trading phase. Existing technologies typically construct time series inputs based on historical stock trading data and learn the changing patterns in continuous trading data through deep sequence models. However, they cannot adjust the feature learning process of deep sequence models on historical trading data according to the changing characteristics of trading models in the context of stock trading model migration. This causes deep sequence models to still extract hidden features and generate quantitative factors according to the original trading model. As a result, the generated quantitative factors contain outdated historical trading model information and cannot accurately reflect the current trading status of the stock, thus reducing the ability of quantitative factors to represent the current market changes of the stock.

[0005] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] The purpose of this invention is to provide a method and system for quantization factor mining based on deep sequence models to solve the problems mentioned in the background art.

[0007] To achieve the above objectives, the present invention provides the following technical solution: a quantization factor mining method based on deep sequence models, specifically including the following steps: S1. Obtain historical and current trading data of the target stock, divide it into time series, extract price change characteristics, transaction behavior characteristics and capital flow characteristics, and generate a trading pattern migration judgment sequence to determine whether the stock trading pattern has migrated. S2. In the case of stock trading mode migration, extract the change information between price change characteristics, transaction behavior characteristics and capital flow characteristics before and after the trading mode migration, generate trading mode change characteristics, and use the trading mode change characteristics to construct the trading mode evolution path. S3. Generate sequence migration control parameters based on the transaction pattern evolution path, load the sequence migration control parameters into the deep sequence model, learn and adjust the transaction features in the historical transaction data, and generate sequence learning data containing the features of the current transaction pattern. S4. Input the sequence learning data into the deep sequence model, extract hidden trading features, quantify the hidden trading features to generate quantitative factor codes, and generate quantitative factors for the target stock based on the quantitative factor codes. S5. Collect new trading data of the target stock, update the trading mode migration judgment sequence, and adjust the sequence migration control parameters using the updated trading mode migration judgment sequence.

[0008] Preferably, S1 includes the following sub-steps: S11. Obtain historical trading data of the target stock during the historical trading phase and current trading data during the current trading phase. Arrange the historical and current trading data according to trading time, divide the historical trading time range and the current trading time range, and generate a set of historical trading data and a set of current trading data. S12. Extract features from the historical transaction data set and the current transaction data set to obtain price change features, transaction behavior features and capital flow features. Among them, the price change features are determined based on the stock price change trend, the transaction behavior features are determined based on the change in the stock transaction volume, and the capital flow features are determined based on the change in stock capital inflow and outflow. S13. Compare the price change characteristics, transaction behavior characteristics, and capital flow characteristics in the historical transaction data set with the price change characteristics, transaction behavior characteristics, and capital flow characteristics in the current transaction data set to generate a transaction pattern migration judgment sequence, and determine whether the stock trading pattern has migrated based on the transaction pattern migration judgment sequence.

[0009] Preferably, S13 is as follows: The price change characteristics, transaction behavior characteristics, and capital flow characteristics in the historical transaction data set are compared with the price change characteristics, transaction behavior characteristics, and capital flow characteristics in the current transaction data set to obtain the differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics. The differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics are numerically normalized. The normalized differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics are arranged according to the transaction time. A migration judgment value is generated based on the weighted calculation of the three types of characteristic differences. The migration judgment values ​​corresponding to multiple transaction time nodes are combined to generate a transaction mode migration judgment sequence. The migration judgment value corresponding to each trading time node is extracted from the trading pattern migration judgment sequence. The migration judgment value is compared with the preset migration judgment threshold. When the migration judgment value corresponding to multiple consecutive trading time nodes is greater than the preset migration judgment threshold, it is determined that the stock trading pattern has migrated.

[0010] Preferably, S2 is as follows: In the case of stock trading mode migration, obtain the historical trading data set before and after the trading mode migration and the current trading data set, extract price change characteristics, transaction behavior characteristics and capital flow characteristics respectively, compare the price change characteristics, transaction behavior characteristics and capital flow characteristics before and after the trading mode migration, and obtain information on changes in price change characteristics, transaction behavior characteristics and capital flow characteristics. The degree of change in price change characteristics, transaction behavior characteristics, and capital flow characteristics is analyzed to obtain the degree of change in these characteristics. The degree of change in price change characteristics, transaction behavior characteristics, and capital flow characteristics is then combined according to the transaction time to generate transaction pattern change characteristics. Arrange the change states corresponding to different transaction time nodes in the characteristics of transaction pattern change, obtain the continuous change process before and after the transaction pattern migration, connect the characteristics of transaction pattern change in the continuous change process according to the transaction time sequence, and generate the transaction pattern evolution path.

[0011] Preferably, S3 includes the following sub-steps: S31. Read the change features of the trading mode corresponding to each trading time node in the evolution path of the trading mode, extract the degree of change of price change features, the degree of change of trading behavior features, and the degree of change of capital flow features from the change features of the trading mode, determine the direction of change of the trading mode according to the direction of change of the degree of change corresponding to different trading time nodes, and determine the degree of change of the trading mode according to the magnitude of change of the degree of change, and generate sequence migration control parameters based on the direction of change of the trading mode and the degree of change of the trading mode. S32. Load the sequence migration control parameters into the deep sequence model, match the direction and degree of change of the transaction pattern in the sequence migration control parameters with the transaction features in the historical transaction data, adjust the learning weights of the deep sequence model for the transaction features corresponding to different transaction time nodes, and recombine the transaction features in the historical transaction data based on the adjusted learning weights to generate the adjusted historical transaction data features. S33. Input the adjusted historical transaction data features into the deep sequence model, learn and adjust the transaction features in the adjusted historical transaction data, extract sequence feature information containing the current transaction pattern features, and generate sequence learning data containing the current transaction pattern features based on the sequence feature information.

[0012] Preferably, S33 is as follows: The adjusted historical transaction data features are arranged according to transaction time and input into a deep sequence model to obtain transaction feature information corresponding to different transaction time nodes in the adjusted historical transaction data features; Based on sequence migration control parameters, the transaction feature information in the deep sequence model is learned and adjusted. By adjusting the feature weights of the transaction feature information corresponding to different transaction time nodes, the transaction feature learning process in the deep sequence model is updated, and sequence feature information containing the current transaction mode change information is generated. The transaction time node features in the sequence feature information are filtered and combined to extract sequence feature information containing price change features, transaction behavior features and capital flow features. The sequence feature information corresponding to multiple transaction time nodes is integrated to generate sequence learning data containing the features of the current trading pattern.

[0013] Preferably, S4 is as follows: The sequence learning data is arranged according to the transaction time nodes and input into the deep sequence model. The deep sequence model is used to calculate the time features of the sequence learning data corresponding to each transaction time node, obtain the hidden state information corresponding to each transaction time node, and combine the hidden state information according to the transaction time nodes to generate hidden transaction features corresponding to different transaction time nodes. Feature decomposition is performed on the hidden transaction features corresponding to different transaction time points. Price change information, transaction behavior information and capital flow information are extracted from the hidden transaction features. The price change information, transaction behavior information and capital flow information are combined according to the transaction time point to generate a set of hidden transaction features. The price change information, transaction behavior information and capital flow information in the hidden transaction feature set are quantified. The quantified numerical information is determined according to the degree of change of the corresponding numerical information of price change information, transaction behavior information and capital flow information. The quantified numerical information corresponding to different transaction time nodes is arranged according to the transaction time node, and the quantified numerical information corresponding to consecutive transaction time nodes is encoded to generate a quantified factor code containing continuous transaction change information. The quantitative numerical information in the quantitative factor encoding is feature-mapped to convert the quantitative numerical information into quantitative factor feature information, and the quantitative factor corresponding to the target stock is generated based on the quantitative factor feature information.

[0014] Preferably, S5 is as follows: Collect new trading data of the target stock, arrange the new trading data according to the trading time, extract the price change characteristics, transaction behavior characteristics and capital flow characteristics from the new trading data, compare the price change characteristics, transaction behavior characteristics and capital flow characteristics from the new trading data with the historical trading characteristics in the trading pattern migration judgment sequence, and generate new trading pattern change information. Add new transaction mode change information to the transaction mode migration judgment sequence, update the migration judgment value corresponding to the transaction time node in the transaction mode migration judgment sequence, obtain the updated transaction mode migration judgment sequence, and adjust the transaction mode change direction and transaction mode change degree in the sequence migration control parameters according to the migration judgment value in the updated transaction mode migration judgment sequence.

[0015] Preferably, the quantitative factor mining system based on deep sequence models includes a migration determination module, an evolution construction module, a migration regulation module, a factor mining module, and a dynamic update module. The migration determination module acquires the historical and current trading data of the target stock, divides it into time series, extracts price change characteristics, transaction behavior characteristics, and capital flow characteristics, and generates a trading pattern migration determination sequence to determine whether the stock trading pattern has migrated. The evolution construction module extracts information on the changes in price change characteristics, transaction behavior characteristics, and capital flow characteristics before and after the migration of stock trading patterns, generates trading pattern change characteristics, and constructs the trading pattern evolution path using these characteristics. The migration control module generates sequence migration control parameters based on the evolution path of the trading pattern, loads the sequence migration control parameters into the deep sequence model, learns and adjusts the trading features in the historical trading data, and generates sequence learning data containing the features of the current trading pattern. The factor mining module inputs sequence learning data into a deep sequence model, extracts hidden trading features, quantifies the hidden trading features to generate quantitative factor codes, and generates quantitative factors for the target stock based on the quantitative factor codes. The dynamic update module collects new trading data for the target stock, updates the trading mode migration judgment sequence, and uses the updated trading mode migration judgment sequence to adjust the sequence migration control parameters.

[0016] The technical effects and advantages provided by the present invention in the above technical solution are as follows: 1. This invention acquires historical and current trading data of a target stock, extracts price change features, transaction behavior features, and capital flow features, and generates a trading pattern migration judgment sequence to identify the state of stock trading pattern migration. When a stock trading pattern migrates, it analyzes the changes in trading characteristics before and after the migration to generate trading pattern change features and constructs a trading pattern evolution path, thereby obtaining the evolution process of the stock trading state over time. Furthermore, it generates sequence migration control parameters based on the trading pattern evolution path and uses these parameters to adjust the deep sequence model's learning process of trading features from historical trading data. This enables the deep sequence model to relearn effective features from historical trading data based on current trading pattern changes, reducing the impact of outdated historical trading pattern information on the quantitative factor generation process and improving the adaptability of the sequence learning data to the current stock trading state.

[0017] 2. This invention inputs adjusted sequence learning data into a deep sequence model to extract hidden trading features, quantifies these features to generate quantitative factor codes, and further generates quantitative factors corresponding to the target stock. Simultaneously, by collecting new trading data for the target stock, the invention updates the trading pattern migration judgment sequence and adjusts the sequence migration control parameters using the updated sequence, enabling the quantitative factor mining process to dynamically update as the stock trading status changes. Compared to technical solutions that mine quantitative factors based on fixed historical trading data, this invention can dynamically adjust the deep sequence model learning process according to changes in stock trading patterns, making the generated quantitative factors more accurately reflect current market changes and improving the quantitative factors' ability to represent and adapt to stock trading status. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0019] Figure 1 This is a schematic diagram of the quantization factor mining method based on deep sequence models of the present invention.

[0020] Figure 2 This is a schematic diagram illustrating the specific steps of the present invention.

[0021] Figure 3 This is a schematic diagram of the modules of the present invention. Detailed Implementation

[0022] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.

[0023] This invention provides, for example Figure 1 and Figure 2 The quantization factor mining method based on deep sequence models shown includes the following steps: S1. Obtain historical and current trading data of the target stock, divide it into time series, extract price change characteristics, transaction behavior characteristics and capital flow characteristics, and generate a trading pattern migration judgment sequence to determine whether the stock trading pattern has migrated. In this embodiment, S1 includes the following sub-steps: S11. Obtain historical trading data of the target stock during the historical trading phase and current trading data during the current trading phase. Arrange the historical and current trading data according to trading time, divide the historical trading time range and the current trading time range, and generate a set of historical trading data and a set of current trading data. When obtaining historical trading data for a target stock during its historical trading phases and current trading data during the current trading phase, trading information generated by the target stock within different trading timeframes can be obtained from a securities trading database. The historical trading phase represents the trading timeframe before the change in trading pattern, while the current trading phase represents the trading timeframe after the change in trading pattern. For example, using a listed company's stock as the target stock, historical trading data for the trading period before the change in trading pattern and current trading data for the trading period after the change in trading pattern can be obtained. Both historical and current trading data include stock price, trading volume, and capital flow information. The obtained trading data is arranged according to trading date and divided according to the timeframes corresponding to the historical and current trading phases. Trading data within the historical trading phases is stored in a historical trading data set, and trading data within the current trading phase is stored in a current trading data set, thus completing the classification and organization of historical and current trading data.

[0024] The target stock refers to the listed company stock for quantitative factor mining; historical trading data refers to the price change data, transaction behavior data, and capital flow data of the target stock during the historical trading period; current trading data refers to the price change data, transaction behavior data, and capital flow data of the target stock during the current trading period; historical trading time range refers to the time interval used to limit the acquisition time of historical trading data; current trading time range refers to the time interval used to limit the acquisition time of current trading data; historical trading data set refers to the data set composed of historical trading data corresponding to multiple trading time points within the historical trading time range; current trading data set refers to the data set composed of current trading data corresponding to multiple trading time points within the current trading time range. By dividing the data sets into different trading periods, a data foundation is provided for subsequent comparison of changes in trading characteristics between historical and current trading periods.

[0025] S12. Extract features from the historical transaction data set and the current transaction data set to obtain price change features, transaction behavior features and capital flow features. Among them, the price change features are determined based on the stock price change trend, the transaction behavior features are determined based on the change in the stock transaction volume, and the capital flow features are determined based on the change in stock capital inflow and outflow. When extracting features from historical and current trading datasets, financial time series analysis can be employed to process stock price, trading volume, and capital flow data across different trading phases, thereby acquiring price change characteristics, trading behavior characteristics, and capital flow characteristics. Specifically, this involves retrieving stock price, trading volume, and capital inflow / outflow data for each trading time point from the historical and current datasets. Price change characteristics can be determined by analyzing the direction and magnitude of price changes across consecutive trading time points; trading behavior characteristics can be determined by analyzing the trend of trading volume changes at different trading time points; and capital flow characteristics can be determined by analyzing changes in capital inflows and outflows at different trading time points. For example, if the closing price of a target stock changes from 1900 yuan to 1950 yuan at a certain trading time during continuous trading, and the stock price continues to rise throughout the trading period, then the price change characteristic of an upward trend is extracted based on the price change trend. When the trading volume increases from 500,000 shares to 800,000 shares, the trading behavior characteristic of increased trading activity is extracted based on the increase in trading volume. When the net capital inflow increases from 200 million yuan to 500 million yuan, the capital flow characteristic of increased capital inflow is extracted based on the change in capital inflow. By extracting these three types of characteristics respectively, trading characteristic information is formed to describe market changes at different trading stages.

[0026] Feature extraction refers to the process of extracting information reflecting changes in stock trading status from historical and current trading data sets, transforming raw trading data into analyzable trading features. Price change features represent characteristic information generated based on stock price change trends, describing the rise, fall, or magnitude of stock price changes over continuous trading time. Trading behavior features represent characteristic information generated based on changes in stock trading volume, describing market trading activity and changes in trading scale. Fund flow features represent characteristic information generated based on changes in stock fund inflows and outflows, describing the degree of market fund participation and changes in fund direction. Stock price change trends represent the direction and process of stock price changes across different trading time points, which can be determined by the opening price, closing price, and price change magnitude. Stock trading volume changes represent the changes in trading volume over trading time, which can be determined by changes in trading volume at different trading time points. Stock fund inflow and outflow changes represent the changes in funds entering and leaving the stock market during stock trading, which can be determined by net fund inflows, net fund outflows, and the direction of fund changes. By extracting characteristics of price changes, transaction behavior, and capital flows, a data foundation can be provided for generating a transaction pattern migration judgment sequence.

[0027] S13. Compare the price change characteristics, transaction behavior characteristics, and capital flow characteristics in the historical transaction data set with the price change characteristics, transaction behavior characteristics, and capital flow characteristics in the current transaction data set to generate a transaction pattern migration judgment sequence, and determine whether the stock trading pattern has migrated based on the transaction pattern migration judgment sequence.

[0028] In this embodiment, S13 specifically refers to: The price change characteristics, transaction behavior characteristics, and capital flow characteristics in the historical transaction data set are compared with the price change characteristics, transaction behavior characteristics, and capital flow characteristics in the current transaction data set to obtain the differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics. The differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics are numerically normalized. The normalized differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics are arranged according to the transaction time. A migration judgment value is generated based on the weighted calculation of the three types of characteristic differences. The migration judgment values ​​corresponding to multiple transaction time nodes are combined to generate a transaction mode migration judgment sequence. The migration judgment value corresponding to each trading time node is extracted from the trading pattern migration judgment sequence. The migration judgment value is compared with the preset migration judgment threshold. When the migration judgment value corresponding to multiple consecutive trading time nodes is greater than the preset migration judgment threshold, it is determined that the stock trading pattern has migrated.

[0029] After obtaining the price change characteristics, transaction behavior characteristics, and capital flow characteristics from the historical transaction dataset and the current transaction dataset, the differences for the same type of transaction characteristics are calculated. Specifically, the price change characteristics in the historical transaction dataset are compared with those in the current transaction dataset to obtain the price change difference between the two transaction stages; the transaction behavior characteristics in the historical transaction dataset are compared with those in the current transaction dataset to obtain the transaction behavior change difference; and the capital flow characteristics in the historical transaction dataset are compared with those in the current transaction dataset to obtain the capital flow change difference. By calculating the differences for the same type of transaction characteristics in different transaction stages, price change characteristic differences, transaction behavior characteristic differences, and capital flow characteristic differences are generated.

[0030] When normalizing the differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics, numerical transformation is performed based on the data range of different types of characteristic differences, converting them into characteristics within a unified data range. Specifically, the data values ​​corresponding to these differences are read separately, their ranges are adjusted, and the changing trends across different trading time points are maintained. After normalization, the normalized differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics are arranged according to trading time, ensuring temporal continuity of the characteristic differences across different trading time points.

[0031] When generating migration judgment values ​​based on the differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics after normalization, a feature-weighted calculation method can be used to comprehensively calculate the differences in different types of characteristics. Specifically, calculation weights are assigned to the differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics. The three types of characteristic differences corresponding to different trading time points are weighted and processed to generate migration judgment values ​​for the corresponding trading time points. Furthermore, the migration judgment values ​​corresponding to multiple trading time points are combined in chronological order to generate a trading pattern migration judgment sequence, which describes the change in trading characteristics between historical trading stages and the current trading stage.

[0032] The price change characteristics, trading behavior characteristics, and capital flow characteristics in the historical trading dataset represent the trading status information of the target stock within the historical trading period. The price change characteristics, trading behavior characteristics, and capital flow characteristics in the current trading dataset represent the trading status information of the target stock within the current trading period. Difference calculation represents the process of comparing the same type of trading characteristics between the historical and current trading periods. Price change characteristic differences represent the degree of change in the stock price trend between the two trading periods; trading behavior characteristic differences represent the degree of change in the stock's trading volume between the two trading periods; and capital flow characteristic differences represent the degree of change in stock capital inflows and outflows between the two trading periods. Numerical normalization represents the process of converting the characteristic differences from different data ranges into a unified data range.

[0033] The migration judgment value represents a data value calculated based on differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics to determine the degree of change in trading patterns. The trading pattern migration judgment sequence represents a set of migration judgment values ​​corresponding to multiple trading time nodes arranged according to trading time. The preset migration judgment threshold represents a comparison standard used to determine whether a stock trading pattern has migrated, and can be set according to the historical trading status of the target stock. When the migration judgment values ​​corresponding to multiple consecutive trading time nodes extracted from the trading pattern migration judgment sequence are all greater than the preset migration judgment threshold, it is determined that a stock trading pattern has migrated; when the migration judgment values ​​do not meet the preset migration judgment threshold, it is determined that a stock trading pattern has not migrated.

[0034] S2. In the case of stock trading mode migration, extract the change information between price change characteristics, transaction behavior characteristics and capital flow characteristics before and after the trading mode migration, generate trading mode change characteristics, and use the trading mode change characteristics to construct the trading mode evolution path. In this embodiment, S2 specifically refers to: In the case of stock trading mode migration, obtain the historical trading data set before and after the trading mode migration and the current trading data set, extract price change characteristics, transaction behavior characteristics and capital flow characteristics respectively, compare the price change characteristics, transaction behavior characteristics and capital flow characteristics before and after the trading mode migration, and obtain information on changes in price change characteristics, transaction behavior characteristics and capital flow characteristics. The degree of change in price change characteristics, transaction behavior characteristics, and capital flow characteristics is analyzed to obtain the degree of change in these characteristics. The degree of change in price change characteristics, transaction behavior characteristics, and capital flow characteristics is then combined according to the transaction time to generate transaction pattern change characteristics. Arrange the change states corresponding to different transaction time nodes in the characteristics of transaction pattern change, obtain the continuous change process before and after the transaction pattern migration, connect the characteristics of transaction pattern change in the continuous change process according to the transaction time sequence, and generate the transaction pattern evolution path.

[0035] In the case of stock trading mode migration, the first step is to determine the trading time range before and after the migration based on the migration determination results, and then obtain historical and current trading data sets from the corresponding trading time ranges. For the price change characteristics, transaction behavior characteristics, and capital flow characteristics in the historical and current trading data sets, they are matched and compared according to the same trading type to obtain characteristic change information before and after the migration. Specifically, the price change characteristics in the historical trading data set are compared with those in the current trading data set to determine the changes in stock price trends; the transaction behavior characteristics in the historical trading data set are compared with those in the current trading data set to determine the changes in trading volume; and the capital flow characteristics in the historical trading data set are compared with those in the current trading data set to determine the changes in capital inflows and outflows, thereby generating information on changes in price change characteristics, transaction behavior characteristics, and capital flow characteristics.

[0036] When analyzing the degree of change in price change characteristics, transaction behavior characteristics, and capital flow characteristics, the degree of change for different types of characteristics can be determined by analyzing the direction, magnitude, and persistence of characteristic changes before and after the migration of trading patterns. Specifically, the price trend changes in price change characteristics, the changes in transaction volume in transaction behavior characteristics, and the changes in capital flow characteristics are processed separately to obtain the degree of change in price change characteristics, transaction behavior characteristics, and capital flow characteristics. Furthermore, the three types of degree of change are arranged according to trading time for different time points, and the degree of change in price change characteristics, transaction behavior characteristics, and capital flow characteristics at the same trading time point are combined to form the trading pattern change characteristics for that time point.

[0037] After generating the characteristics of changes in trading patterns, an evolution path for the trading pattern can be constructed based on the changing states of these characteristics at different trading time points. Specifically, the consecutive trading time points before and after the trading pattern migration are sorted, and the trading pattern change characteristics corresponding to each time point are obtained. These characteristics are then connected according to the chronological order of the trading times, allowing the trading pattern change characteristics to gradually change from the pre-migration state to the post-migration state, forming a continuous process of change before and after the trading pattern migration. Furthermore, the trading pattern change characteristics corresponding to each trading time point in this continuous process are correlated and arranged to generate a trading pattern evolution path, which describes the process of the stock trading pattern changing from its original state to its current state.

[0038] The historical and current trading data sets before and after the trading model migration represent trading data from different stages, divided according to the time of the stock trading model migration. The historical trading data set stores trading data generated before the migration, while the current trading data set stores trading data generated after the migration. Price change characteristics represent changes in stock prices over trading time; trading behavior characteristics represent changes in stock trading volume over trading time; and capital flow characteristics represent changes in stock capital inflows and outflows over trading time. These changes in price, trading behavior, and capital flow characteristics respectively represent the changes in corresponding trading characteristics before and after the trading model migration. The degree of change analysis represents the process of processing different types of change information and determining the strength of the changes. The degree of change in price, trading behavior, and capital flow characteristics represents the extent of change in different trading characteristics before and after the trading model migration.

[0039] Trading pattern change characteristics represent descriptive information about changes in trading patterns, formed by a combination of changes in price change characteristics, changes in trading behavior characteristics, and changes in capital flow characteristics. This information reflects the changing state of stock trading patterns at different trading time points. The continuous change process before and after trading pattern migration represents the chronological change process of trading pattern change characteristics corresponding to multiple trading time points. The trading pattern evolution path represents a continuous trajectory constructed based on trading pattern change characteristics, used to describe the development process of stock trading patterns from their pre-migration state to their post-migration state. Generating trading pattern evolution paths provides a data basis for subsequently adjusting the feature learning process of deep sequence models on historical trading data using trading pattern change information.

[0040] S3. Generate sequence migration control parameters based on the transaction pattern evolution path, load the sequence migration control parameters into the deep sequence model, learn and adjust the transaction features in the historical transaction data, and generate sequence learning data containing the features of the current transaction pattern. In this embodiment, S3 includes the following sub-steps: S31. Read the change features of the trading mode corresponding to each trading time node in the evolution path of the trading mode, extract the degree of change of price change features, the degree of change of trading behavior features, and the degree of change of capital flow features from the change features of the trading mode, determine the direction of change of the trading mode according to the direction of change of the degree of change corresponding to different trading time nodes, and determine the degree of change of the trading mode according to the magnitude of change of the degree of change, and generate sequence migration control parameters based on the direction of change of the trading mode and the degree of change of the trading mode. When generating sequence migration control parameters based on the trading pattern evolution path, the trading pattern change characteristics corresponding to each trading time node in the evolution path can be read, and the degree of change in price change characteristics, the degree of change in trading behavior characteristics, and the degree of change in capital flow characteristics can be extracted from these characteristics. Specifically, the direction of change in the degree of change can be determined based on the changing trends of these three types of changes at different trading time nodes. For example, if the degree of change in price change characteristics gradually changes from decreasing to increasing, the direction of price change is determined to be increasing; if the degree of change in trading behavior characteristics changes from stable to continuously increasing, the direction of trading behavior change is determined to be increasing activity; and if the degree of change in capital flow characteristics changes from stable to continuously expanding, the direction of capital flow change is determined to be increasing capital inflow. Furthermore, the degree of change in the trading pattern is determined based on the magnitude of changes in the degree of change corresponding to multiple trading time nodes, and the direction and degree of change in the trading pattern are combined to generate the sequence migration control parameters. For example, during the migration of trading patterns for a target stock, if the evolution path of the trading pattern shows that the degree of price volatility continues to increase, the level of trading activity continues to rise, and the scale of capital inflow continues to expand, then the direction of change in the trading pattern is determined to be the direction of enhancement. Based on the magnitude of the changes in the three types of changes, the degree of change in the trading pattern is determined, and sequence migration control parameters are generated to adjust the feature learning process of the deep sequence model.

[0041] The trading pattern evolution path, with each trading time node representing the trading pattern change characteristics, indicates the status information of the trading pattern change at different time nodes arranged according to trading time. This describes the characteristic changes that occur during the transition of a stock trading pattern from its pre-migration state to its post-migration state. The degree of change in price change characteristics represents the magnitude of change in stock price change characteristics during the trading pattern migration process, describing the strength of the price change state. The degree of change in trading behavior characteristics represents the magnitude of change in stock trading behavior characteristics during the trading pattern migration process, describing the changes in trading volume. The degree of change in capital flow characteristics represents the magnitude of change in stock capital flow characteristics during the trading pattern migration process, describing the changes in capital inflow and outflow. The direction of change in degree of change indicates the trend of change in the degree of change in price change characteristics, trading behavior characteristics, and capital flow characteristics over trading time. The direction of change in trading pattern indicates the overall direction of change in the stock trading pattern determined based on the directions of change in these three types of degree of change, while the degree of change in trading pattern indicates the strength of the change in the stock trading pattern determined based on the magnitude of change in these three types of degree of change. Sequence migration control parameters represent control data generated based on the direction and degree of change in trading patterns. These parameters are used to adjust the feature learning process of deep sequence models, thereby changing the learning weights of trading features in historical trading data and enabling the deep sequence model to adjust the feature learning process of historical trading data according to changes in stock trading patterns.

[0042] S32. Load the sequence migration control parameters into the deep sequence model, match the direction and degree of change of the transaction pattern in the sequence migration control parameters with the transaction features in the historical transaction data, adjust the learning weights of the deep sequence model for the transaction features corresponding to different transaction time nodes, and recombine the transaction features in the historical transaction data based on the adjusted learning weights to generate the adjusted historical transaction data features. When loading sequence migration control parameters into a deep sequence model, the direction and degree of trading pattern change within these parameters can be used as adjustment criteria to reprocess trading features in historical trading data. Specifically, price change features, trading behavior features, and capital flow features corresponding to different trading time points in historical trading data are input into the deep sequence model. The adjustment direction for different trading features is determined based on the direction of trading pattern change, and the adjustment magnitude for trading features corresponding to different trading time points is determined based on the degree of trading pattern change. This further adjusts the learning weights of the deep sequence model for trading features corresponding to different trading time points. For example, if, during the trading pattern migration of a target stock, the direction of trading pattern change shows increased price volatility, higher trading activity, and expanded capital flow, then the learning weights of the deep sequence model for the changed price change features, trading behavior features, and capital flow features in historical trading data are increased, while the learning weights for historical trading features inconsistent with the current direction of trading pattern change are decreased. Based on the adjusted learning weights, the trading features in the historical trading data are recombined to generate adjusted historical trading data features. By adjusting the feature learning process in historical trading data, the deep sequence model learns trading feature information that conforms to the current state of trading pattern change.

[0043] A deep sequence model (DSM) is a deep learning model used to learn features from time-continuous trading data. It can be implemented using recurrent neural networks (RNNs), long short-term memory (LSTM) networks, or other deep learning models with time-series processing capabilities. It learns the changes in information between different trading time points in historical trading data. The direction of trading pattern change represents the trend of price change features, trading behavior features, and capital flow features obtained from the evolution path of the trading pattern, used to determine the direction of feature adjustment in historical trading data. The degree of trading pattern change represents the magnitude of the change in the trading pattern from its pre-migration state to its post-migration state, used to determine the magnitude of feature adjustment in historical trading data. Trading features in historical trading data represent the price change features, trading behavior features, and capital flow features extracted from historical trading data, used as input for the DSM. Learning weights represent the importance of features assigned by the DSM when learning trading features corresponding to different trading time points, used to control the influence of different trading features on the sequence learning process. The adjusted historical transaction data features represent the historical transaction data features that are recombined after adjusting the learning weights based on the sequence migration control parameters. These features include transaction feature information adjusted according to the direction and degree of change in the current transaction pattern, and are used to generate sequence learning data containing the features of the current transaction pattern.

[0044] S33. Input the adjusted historical transaction data features into the deep sequence model, learn and adjust the transaction features in the adjusted historical transaction data, extract sequence feature information containing the current transaction pattern features, and generate sequence learning data containing the current transaction pattern features based on the sequence feature information.

[0045] In this embodiment, S33 specifically refers to: The adjusted historical transaction data features are arranged according to transaction time and input into a deep sequence model to obtain transaction feature information corresponding to different transaction time nodes in the adjusted historical transaction data features; Based on sequence migration control parameters, the transaction feature information in the deep sequence model is learned and adjusted. By adjusting the feature weights of the transaction feature information corresponding to different transaction time nodes, the transaction feature learning process in the deep sequence model is updated, and sequence feature information containing the current transaction mode change information is generated. The transaction time node features in the sequence feature information are filtered and combined to extract sequence feature information containing price change features, transaction behavior features and capital flow features. The sequence feature information corresponding to multiple transaction time nodes is integrated to generate sequence learning data containing the features of the current trading pattern.

[0046] When arranging the adjusted historical transaction data features by transaction time, the price change features, transaction behavior features, and capital flow features corresponding to each transaction time node in the adjusted historical transaction data features are first read and sorted according to the transaction occurrence time to form transaction feature information corresponding to consecutive transaction time periods. The sorted transaction feature information is then input into a deep sequence model, which reads the transaction feature information corresponding to different transaction time nodes in chronological order. The deep sequence model can employ a deep learning model with time series processing capabilities, progressively learning from the transaction feature information in consecutive transaction time nodes to obtain the feature change process in historical transaction data.

[0047] When learning and adjusting trading feature information in a deep sequence model based on sequence transfer control parameters, the direction and degree of change in trading patterns within the sequence transfer control parameters are used as adjustment criteria to adjust the learning weights of the deep sequence model when processing trading feature information corresponding to different trading time points. Specifically, the direction of change in trading patterns is compared with the direction of change in price change features, transaction behavior features, and capital flow features within the trading feature information. When the direction of change in trading features aligns with the direction of change in trading patterns, the learning weight of the corresponding trading feature information is increased; when there is a difference, the learning weight of the corresponding trading feature information is decreased. Simultaneously, the magnitude of the learning weight change is adjusted according to the degree of change in trading patterns, allowing the deep sequence model to redistribute the influence of trading feature information corresponding to different trading time points during the learning process. After adjusting the learning weights, the trading feature information corresponding to different trading time points is recombined to generate adjusted historical trading data features.

[0048] When generating sequence feature information containing information about changes in the current trading pattern, the deep sequence model relearns features based on adjusted historical trading data features, reads the changes in trading features at different trading time points, and extracts sequence feature information corresponding to the direction and degree of change in the trading pattern. Specifically, the deep sequence model analyzes price change features, transaction behavior features, and capital flow features in consecutive trading time points, and combines the learned, weighted trading feature information to form sequence feature information containing information about changes in the current trading pattern. This sequence feature information retains the trend of change after the trading pattern migration and also includes time-varying features from historical trading data.

[0049] When filtering and combining transaction time node features in sequence feature information, the sequence feature information corresponding to different transaction time nodes can be selected based on price change features, transaction behavior features, and capital flow features in the current trading pattern features. Specifically, the transaction feature information corresponding to each transaction time node is read from the sequence feature information, and transaction time node features containing price change features, transaction behavior features, and capital flow features are extracted and combined according to the transaction time sequence, so that the sequence feature information corresponding to multiple transaction time nodes forms a continuous dataset. By integrating the sequence feature information corresponding to different transaction time nodes, sequence learning data containing the features of the current trading pattern is generated.

[0050] The adjusted historical transaction data features represent the characteristic information of historical transaction data after adjustment by sequence transfer control parameters. This includes price change features, trading behavior features, and capital flow features after reallocating learning weights. Transaction feature information represents the price change information, trading behavior information, and capital flow information contained in the corresponding transaction time nodes during the input and processing of the deep sequence model. Learning adjustment refers to using sequence transfer control parameters to change the deep sequence model's learning process for transaction feature information at different transaction time nodes, redetermining the degree of influence of different transaction feature information by adjusting the learning weights. Feature weights represent the learning proportions allocated by the deep sequence model when processing transaction feature information, used to control the degree to which different transaction feature information participates in the sequence learning process. Sequence feature information containing current trading pattern change information represents the continuous-time feature information generated by the deep sequence model based on the adjusted historical transaction data features, including transaction features reflecting the current state of trading pattern changes.

[0051] Transaction time node features represent a set of information consisting of price change features, trading behavior features, and capital flow features corresponding to a single transaction time node, used to describe the trading status of a target stock at that specific time node. Filtering and combining refer to the process of extracting target trading features from the sequence feature information corresponding to multiple transaction time nodes and forming continuous feature information in chronological order. Sequence feature information containing price change features, trading behavior features, and capital flow features represents data content formed by multiple types of trading features in chronological order, used to describe the process of changing stock trading patterns. Sequence learning data containing current trading pattern features represents a dataset generated after adjustment through deep sequence model learning, containing trading feature information adjusted according to the trading pattern migration, used as input data in the subsequent quantitative factor generation process.

[0052] S4. Input the sequence learning data into the deep sequence model, extract hidden trading features, quantify the hidden trading features to generate quantitative factor codes, and generate quantitative factors for the target stock based on the quantitative factor codes. In this embodiment, S4 specifically refers to: The sequence learning data is arranged according to the transaction time nodes and input into the deep sequence model. The deep sequence model is used to calculate the time features of the sequence learning data corresponding to each transaction time node, obtain the hidden state information corresponding to each transaction time node, and combine the hidden state information according to the transaction time nodes to generate hidden transaction features corresponding to different transaction time nodes. Feature decomposition is performed on the hidden transaction features corresponding to different transaction time points. Price change information, transaction behavior information and capital flow information are extracted from the hidden transaction features. The price change information, transaction behavior information and capital flow information are combined according to the transaction time point to generate a set of hidden transaction features. The price change information, transaction behavior information and capital flow information in the hidden transaction feature set are quantified. The quantified numerical information is determined according to the degree of change of the corresponding numerical information of price change information, transaction behavior information and capital flow information. The quantified numerical information corresponding to different transaction time nodes is arranged according to the transaction time node, and the quantified numerical information corresponding to consecutive transaction time nodes is encoded to generate a quantified factor code containing continuous transaction change information. The quantitative numerical information in the quantitative factor encoding is feature-mapped to convert the quantitative numerical information into quantitative factor feature information, and the quantitative factor corresponding to the target stock is generated based on the quantitative factor feature information.

[0053] When sequence learning data is input into a deep sequence model after being arranged according to trading time nodes, the model first reads the price change features, trading behavior features, and capital flow features corresponding to each trading time node in the sequence learning data, and forms continuous trading features input in chronological order. The deep sequence model performs time feature calculations on the sequence learning data corresponding to the continuous trading time nodes. By analyzing the changes in trading features between the current trading time node and the preceding and following trading time nodes, it obtains hidden state information reflecting the process of changes in trading time. In specific implementation, the deep sequence model encodes the trading features input at each trading time node and updates the hidden state information by combining the changes in trading features in adjacent trading time nodes. The hidden state information corresponding to different trading time nodes is combined in chronological order to generate hidden trading features corresponding to different trading time nodes. The hidden trading features contain information on price changes, trading behavior, and capital flow changes learned by the deep sequence model, which are used to describe the changes in the stock trading status over time.

[0054] When performing feature decomposition on hidden trading features corresponding to different trading time points, the features can be split according to the types of trading change information contained within them. Specifically, the different feature dimensions of the hidden trading features are read and categorized based on information features corresponding to price changes, trading behavior, and capital flows. Information reflecting stock price trends is extracted as price change information; information reflecting changes in stock trading volume is extracted as trading behavior information; and information reflecting changes in capital inflows and outflows is extracted as capital flow information. After information extraction, the price change information, trading behavior information, and capital flow information corresponding to the same trading time point are combined, and the combined information corresponding to different trading time points is arranged in chronological order to generate a set of hidden trading features.

[0055] When quantifying the set of hidden trading features, the process first involves reading the data changes corresponding to price changes, transaction behavior, and capital flows. The degree of change in trading information across different trading time points is analyzed, and the corresponding quantitative values ​​are determined based on this degree of change. Specifically, the price trend changes in the price change information are analyzed to determine the corresponding quantitative values; the changes in transaction volume in the transaction behavior information are analyzed to determine the corresponding quantitative values; and the changes in capital flows in the capital flow information are analyzed to determine the corresponding quantitative values. The quantitative values ​​corresponding to different trading time points are then arranged in chronological order, and the quantitative values ​​in consecutive trading time points are encoded to create continuously changing data content, generating a quantitative factor code containing continuous trading change information.

[0056] When performing feature mapping on the quantitative numerical information in the quantitative factor encoding, the quantitative numerical information corresponding to different trading time points in the quantitative factor encoding can be transformed to convert data describing price changes, trading behavior, and capital flow changes into quantitative factor feature information. Specifically, continuous trading change information is read from the quantitative factor encoding, and the quantitative numerical information corresponding to different trading time points is combined and transformed to form quantitative factor feature information describing changes in the trading status of the target stock. Furthermore, based on the quantitative factor feature information, a quantitative factor corresponding to the target stock is generated, converting the quantitative factor feature information into quantitative data representing changes in the target stock's trading activity.

[0057] Temporal feature calculation represents the process by which deep sequence models analyze and process changes between different trading time points in sequence learning data. It obtains time-varying information from the trading feature information corresponding to consecutive trading time points. Hidden state information represents the intermediate feature information generated by the deep sequence model during sequence learning data processing, including information on price change features, trading behavior features, and capital flow features that change over trading time. Hidden trading features corresponding to different trading time points represent trading feature information composed of hidden state information for each trading time point, used to describe the changes in stock trading status over a continuous time range. Feature decomposition represents the process of extracting different types of trading information from the hidden trading features. Price change information represents information on how stock prices change over trading time; trading behavior information represents information on how stock trading volume changes over trading time; and capital flow information represents information on how stock capital inflows and outflows change over trading time. The hidden trading feature set represents a data set formed by combining price change information, trading behavior information, and capital flow information corresponding to multiple trading time points.

[0058] Quantitative processing refers to the process of converting transaction change information in a hidden set of transaction features into quantified numerical information. The degree of numerical change corresponding to price change information, transaction behavior information, and capital flow information represents the magnitude of change in different transaction information across consecutive trading time points, used to determine the quantified numerical information. Quantified numerical information represents the data content describing the state of transaction changes after quantification. Encoding refers to the process of arranging and transforming quantified numerical information corresponding to multiple trading time points according to transaction time sequence. Quantitative factor encoding containing continuous transaction change information represents the data encoding content formed by quantified numerical information corresponding to multiple trading time points, used to retain information about the changes in stock trading status over time. Feature mapping refers to the data processing process of converting the quantified numerical information in the quantified factor encoding into quantified factor feature information. Quantified factor feature information represents information generated based on the quantified factor encoding to describe the changes in the target stock's trading status. The quantified factor corresponding to the target stock represents data generated based on the quantified factor feature information to quantitatively describe the characteristics of the target stock's trading changes.

[0059] S5. Collect new trading data of the target stock, update the trading mode migration judgment sequence, and adjust the sequence migration control parameters using the updated trading mode migration judgment sequence.

[0060] In this embodiment, S5 specifically refers to: Collect new trading data of the target stock, arrange the new trading data according to the trading time, extract the price change characteristics, transaction behavior characteristics and capital flow characteristics from the new trading data, compare the price change characteristics, transaction behavior characteristics and capital flow characteristics from the new trading data with the historical trading characteristics in the trading pattern migration judgment sequence, and generate new trading pattern change information. Add new transaction mode change information to the transaction mode migration judgment sequence, update the migration judgment value corresponding to the transaction time node in the transaction mode migration judgment sequence, obtain the updated transaction mode migration judgment sequence, and adjust the transaction mode change direction and transaction mode change degree in the sequence migration control parameters according to the migration judgment value in the updated transaction mode migration judgment sequence.

[0061] When collecting new trading data for a target stock, the system continuously acquires newly generated stock trading data based on the current trading phase of the target stock, and extracts information on trading time, stock price changes, changes in trading behavior, and changes in capital flow from this new trading data. Specifically, the new trading data is arranged according to trading time, forming a dataset that maintains temporal continuity with historical trading data. Feature extraction is then performed on the new trading data to obtain price change features, trading behavior features, and capital flow features. Price change features describe the trend of stock price changes within the new trading phase; trading behavior features describe the changes in the number of shares traded within the new trading phase; and capital flow features describe the changes in capital inflows and outflows within the new trading phase. After acquiring these three types of trading features from the new trading data, the price change features, trading behavior features, and capital flow features are compared with the historical trading features corresponding to existing trading time nodes in the trading pattern migration judgment sequence. This analysis examines the changes in trading status between the new trading phase and historical trading phases, generating information on changes in the new trading pattern.

[0062] When adding new trading pattern change information to the trading pattern migration judgment sequence, the insertion position of the new trading pattern change information in the sequence can be determined based on the trading time node corresponding to the new trading data. The new trading pattern change information is then combined with the historical trading pattern change information in the original trading pattern migration judgment sequence. Specifically, based on the changes in price change characteristics, trading behavior characteristics, and capital flow characteristics in the new trading pattern change information, the migration judgment value corresponding to the new trading time node is re-determined. This new migration judgment value is then used to update the arrangement of migration judgment values ​​in the trading pattern migration judgment sequence, ensuring that the updated sequence includes the trading pattern change information corresponding to the new trading phase. For example, when a target stock generates new price change trends, trading behavior trends, and capital flow trends during a new trading phase, the trading pattern migration judgment sequence is updated with the new trading pattern change information, enabling the sequence to reflect the trading pattern changes occurring in the current trading phase of the target stock.

[0063] When adjusting the sequence migration control parameters using the updated trading pattern migration judgment sequence, the migration judgment values ​​corresponding to each trading time node in the updated sequence can be read, and the changes in the migration judgment values ​​corresponding to newly added trading time nodes relative to the historical trading time nodes can be analyzed. Specifically, the adjustment content for the trading pattern change direction in the sequence migration control parameters is determined based on the direction of change of the migration judgment values, and the adjustment content for the degree of change of the trading pattern in the sequence migration control parameters is determined based on the degree of change of the migration judgment values. The sequence migration control parameters are then updated using the adjusted direction and degree of change of the trading pattern. The updated sequence migration control parameters are used to subsequently adjust the deep sequence model's learning process of trading features from historical trading data, enabling the sequence migration control parameters to be updated as new trading data for the target stock changes.

[0064] The newly added trading data for the target stock represents the trading data generated after the initial trading pattern migration determination is completed. This includes price data, transaction data, and capital flow data generated during the new trading phase. The trading pattern migration determination sequence represents a data set formed by arranging migration determination values ​​corresponding to multiple trading time points in chronological order. It describes the changes in the stock's trading pattern over time. The newly added trading pattern change information represents the changes in price change characteristics, transaction behavior characteristics, and capital flow characteristics in the newly added trading data compared to historical trading characteristics in the trading pattern migration determination sequence. The migration determination value represents the data content determined based on the changes in trading characteristics corresponding to the trading time points, used to indicate the degree of trading pattern change. The updated trading pattern migration determination sequence represents the trading pattern migration determination sequence after incorporating the newly added trading pattern change information and readjusting the migration determination values. The sequence migration control parameters represent data generated based on the trading pattern migration determination sequence used to adjust the feature learning process of the deep sequence model. The direction of trading pattern change indicates the trend of stock trading pattern change, and the degree of trading pattern change indicates the magnitude of stock trading pattern change. By adjusting the sequence migration control parameters using the updated trading pattern migration determination sequence, the sequence migration control parameters can continuously reflect the current trading pattern change status of the target stock.

[0065] like Figure 3 The quantitative factor mining system based on deep sequence models shown includes a migration determination module, an evolution construction module, a migration regulation module, a factor mining module, and a dynamic update module. The migration determination module acquires the historical and current trading data of the target stock, divides it into time series, extracts price change characteristics, transaction behavior characteristics, and capital flow characteristics, and generates a trading pattern migration determination sequence to determine whether the stock trading pattern has migrated. The evolution construction module extracts information on the changes in price change characteristics, transaction behavior characteristics, and capital flow characteristics before and after the migration of stock trading patterns, generates trading pattern change characteristics, and constructs the trading pattern evolution path using these characteristics. The migration control module generates sequence migration control parameters based on the evolution path of the trading pattern, loads the sequence migration control parameters into the deep sequence model, learns and adjusts the trading features in the historical trading data, and generates sequence learning data containing the features of the current trading pattern. The factor mining module inputs sequence learning data into a deep sequence model, extracts hidden trading features, quantifies the hidden trading features to generate quantitative factor codes, and generates quantitative factors for the target stock based on the quantitative factor codes. The dynamic update module collects new trading data for the target stock, updates the trading mode migration judgment sequence, and uses the updated trading mode migration judgment sequence to adjust the sequence migration control parameters.

[0066] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0067] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0068] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0069] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0070] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0071] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0072] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A quantization factor mining method based on deep sequence models, characterized in that, Specifically, the following steps are included: S1. Obtain historical and current trading data of the target stock, divide it into time series, extract price change characteristics, transaction behavior characteristics and capital flow characteristics, and generate a trading pattern migration judgment sequence to determine whether the stock trading pattern has migrated. S2. In the case of stock trading mode migration, extract the change information between price change characteristics, transaction behavior characteristics and capital flow characteristics before and after the trading mode migration, generate trading mode change characteristics, and use the trading mode change characteristics to construct the trading mode evolution path. S3. Generate sequence migration control parameters based on the transaction pattern evolution path, load the sequence migration control parameters into the deep sequence model, learn and adjust the transaction features in the historical transaction data, and generate sequence learning data containing the features of the current transaction pattern. S3 includes the following sub-steps: S31. Read the change features of the trading mode corresponding to each trading time node in the evolution path of the trading mode, extract the degree of change of price change features, the degree of change of trading behavior features, and the degree of change of capital flow features from the change features of the trading mode, determine the direction of change of the trading mode according to the direction of change of the degree of change corresponding to different trading time nodes, and determine the degree of change of the trading mode according to the magnitude of change of the degree of change, and generate sequence migration control parameters based on the direction of change of the trading mode and the degree of change of the trading mode. S32. Load the sequence migration control parameters into the deep sequence model, match the direction and degree of change of the transaction pattern in the sequence migration control parameters with the transaction features in the historical transaction data, adjust the learning weights of the deep sequence model for the transaction features corresponding to different transaction time nodes, and recombine the transaction features in the historical transaction data based on the adjusted learning weights to generate the adjusted historical transaction data features. S33. Input the adjusted historical transaction data features into the deep sequence model, learn and adjust the transaction features in the adjusted historical transaction data, extract sequence feature information containing the current transaction pattern features, and generate sequence learning data containing the current transaction pattern features based on the sequence feature information. S4. Input the sequence learning data into the deep sequence model, extract hidden trading features, quantify the hidden trading features to generate quantitative factor codes, and generate quantitative factors for the target stock based on the quantitative factor codes. S5. Collect new trading data of the target stock, update the trading mode migration judgment sequence, and adjust the sequence migration control parameters using the updated trading mode migration judgment sequence.

2. The quantization factor mining method based on deep sequence models according to claim 1, characterized in that, S1 includes the following sub-steps: S11. Obtain historical trading data of the target stock during the historical trading phase and current trading data during the current trading phase. Arrange the historical and current trading data according to trading time, divide the historical trading time range and the current trading time range, and generate a set of historical trading data and a set of current trading data. S12. Extract features from the historical transaction data set and the current transaction data set to obtain price change features, transaction behavior features and capital flow features. Among them, the price change features are determined based on the stock price change trend, the transaction behavior features are determined based on the change in the stock transaction volume, and the capital flow features are determined based on the change in stock capital inflow and outflow. S13. Compare the price change characteristics, transaction behavior characteristics, and capital flow characteristics in the historical transaction data set with the price change characteristics, transaction behavior characteristics, and capital flow characteristics in the current transaction data set to generate a transaction pattern migration judgment sequence, and determine whether the stock trading pattern has migrated based on the transaction pattern migration judgment sequence.

3. The quantization factor mining method based on deep sequence models according to claim 2, characterized in that, S13 specifically refers to: The price change characteristics, transaction behavior characteristics, and capital flow characteristics in the historical transaction data set are compared with the price change characteristics, transaction behavior characteristics, and capital flow characteristics in the current transaction data set to obtain the differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics. The differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics are numerically normalized. The normalized differences in price change characteristics, transaction behavior characteristics, and capital flow characteristics are arranged according to the transaction time. A migration judgment value is generated based on the weighted calculation of the three types of characteristic differences. The migration judgment values ​​corresponding to multiple transaction time nodes are combined to generate a transaction mode migration judgment sequence. The migration judgment value corresponding to each trading time node is extracted from the trading pattern migration judgment sequence. The migration judgment value is compared with the preset migration judgment threshold. When the migration judgment value corresponding to multiple consecutive trading time nodes is greater than the preset migration judgment threshold, it is determined that the stock trading pattern has migrated.

4. The quantization factor mining method based on deep sequence models according to claim 1, characterized in that, S2 specifically refers to: In the case of stock trading mode migration, obtain the historical trading data set before and after the trading mode migration and the current trading data set, extract price change characteristics, transaction behavior characteristics and capital flow characteristics respectively, compare the price change characteristics, transaction behavior characteristics and capital flow characteristics before and after the trading mode migration, and obtain information on changes in price change characteristics, transaction behavior characteristics and capital flow characteristics. The degree of change in price change characteristics, transaction behavior characteristics, and capital flow characteristics is analyzed to obtain the degree of change in these characteristics. The degree of change in price change characteristics, transaction behavior characteristics, and capital flow characteristics is then combined according to the transaction time to generate transaction pattern change characteristics. Arrange the change states corresponding to different transaction time nodes in the characteristics of transaction pattern change, obtain the continuous change process before and after the transaction pattern migration, connect the characteristics of transaction pattern change in the continuous change process according to the transaction time sequence, and generate the transaction pattern evolution path.

5. The quantization factor mining method based on deep sequence models according to claim 1, characterized in that, S33 specifically refers to: The adjusted historical transaction data features are arranged according to transaction time and input into a deep sequence model to obtain transaction feature information corresponding to different transaction time nodes in the adjusted historical transaction data features; Based on sequence migration control parameters, the transaction feature information in the deep sequence model is learned and adjusted. By adjusting the feature weights of the transaction feature information corresponding to different transaction time nodes, the transaction feature learning process in the deep sequence model is updated, and sequence feature information containing the current transaction mode change information is generated. The transaction time node features in the sequence feature information are filtered and combined to extract sequence feature information containing price change features, transaction behavior features and capital flow features. The sequence feature information corresponding to multiple transaction time nodes is integrated to generate sequence learning data containing the features of the current trading pattern.

6. The quantization factor mining method based on deep sequence models according to claim 1, characterized in that, S4 specifically refers to: The sequence learning data is arranged according to the transaction time nodes and input into the deep sequence model. The deep sequence model is used to calculate the time features of the sequence learning data corresponding to each transaction time node, obtain the hidden state information corresponding to each transaction time node, and combine the hidden state information according to the transaction time nodes to generate hidden transaction features corresponding to different transaction time nodes. Feature decomposition is performed on the hidden transaction features corresponding to different transaction time points. Price change information, transaction behavior information and capital flow information are extracted from the hidden transaction features. The price change information, transaction behavior information and capital flow information are combined according to the transaction time point to generate a set of hidden transaction features. The price change information, transaction behavior information and capital flow information in the hidden transaction feature set are quantified. The quantified numerical information is determined according to the degree of change of the corresponding numerical information of price change information, transaction behavior information and capital flow information. The quantified numerical information corresponding to different transaction time nodes is arranged according to the transaction time node, and the quantified numerical information corresponding to consecutive transaction time nodes is encoded to generate a quantified factor code containing continuous transaction change information. The quantitative numerical information in the quantitative factor encoding is feature-mapped to convert the quantitative numerical information into quantitative factor feature information, and the quantitative factor corresponding to the target stock is generated based on the quantitative factor feature information.

7. The quantization factor mining method based on deep sequence models according to claim 1, characterized in that, S5 specifically refers to: Collect new trading data of the target stock, arrange the new trading data according to the trading time, extract the price change characteristics, transaction behavior characteristics and capital flow characteristics from the new trading data, compare the price change characteristics, transaction behavior characteristics and capital flow characteristics from the new trading data with the historical trading characteristics in the trading pattern migration judgment sequence, and generate new trading pattern change information. Add new transaction mode change information to the transaction mode migration judgment sequence, update the migration judgment value corresponding to the transaction time node in the transaction mode migration judgment sequence, obtain the updated transaction mode migration judgment sequence, and adjust the transaction mode change direction and transaction mode change degree in the sequence migration control parameters according to the migration judgment value in the updated transaction mode migration judgment sequence.

8. A quantization factor mining system based on deep sequence models, used to implement the quantization factor mining method based on deep sequence models as described in any one of claims 1-7, characterized in that, It includes a migration determination module, an evolution construction module, a migration regulation module, a factor mining module, and a dynamic update module; The migration determination module acquires the historical and current trading data of the target stock, divides it into time series, extracts price change characteristics, transaction behavior characteristics, and capital flow characteristics, and generates a trading pattern migration determination sequence to determine whether the stock trading pattern has migrated. The evolution construction module extracts information on the changes in price change characteristics, transaction behavior characteristics, and capital flow characteristics before and after the migration of stock trading patterns, generates trading pattern change characteristics, and constructs the trading pattern evolution path using these characteristics. The migration control module generates sequence migration control parameters based on the evolution path of the trading pattern, loads the sequence migration control parameters into the deep sequence model, learns and adjusts the trading features in the historical trading data, and generates sequence learning data containing the features of the current trading pattern. The factor mining module inputs sequence learning data into a deep sequence model, extracts hidden trading features, quantifies the hidden trading features to generate quantitative factor codes, and generates quantitative factors for the target stock based on the quantitative factor codes. The dynamic update module collects new trading data for the target stock, updates the trading mode migration judgment sequence, and uses the updated trading mode migration judgment sequence to adjust the sequence migration control parameters.