Artificial intelligence decision support method and system for high-frequency transaction
By dynamically adjusting the window size and detecting data change blocks, combined with DPCM and dictionary compression algorithms, the problem of data integrity loss in high-frequency trading is solved, achieving faster compression speed and more comprehensive data retention.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-03-31
AI Technical Summary
In high-frequency trading, static compression leads to the loss of data integrity, and existing technologies are unable to effectively handle the complex changes in high-frequency trading data, resulting in a decline in data accuracy and integrity.
By dynamically adjusting the window size and data change block detection, combined with DPCM and dictionary compression algorithms, the quantization step size and dictionary update frequency are dynamically adjusted to achieve dynamic compression of high-frequency trading data.
It improves data compression speed and accuracy, ensures data integrity, adapts to the complex changes in high-frequency trading data, and reduces network bandwidth requirements and latency.
Smart Images

Figure CN121767092A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information technology, specifically to an artificial intelligence decision support method and system for high-frequency trading. Background Technology
[0002] High-frequency trading (HFT) refers to computerized trading that utilizes large computers and advanced technologies to profit from extremely short-lived market fluctuations that are inaccessible to humans. HFT requires rapid processing and analysis of each transaction's data to capture minute market changes in a timely manner. Through frequent trading, capital is turned over multiple times in a short period to accumulate profits.
[0003] In AI-powered decision-making systems for high-frequency trading, the sheer volume of data generated—such as data from multiple exchanges simultaneously—requires extensive data collection, necessitating data compression. Existing patent CN118075144A, "A High-Frequency Data Compression Management System and Method Based on Artificial Intelligence," addresses this by collecting historical high-frequency data, constructing a dataset, calculating the compression ratio, and determining compression speed, transmission speed, and information transmission efficiency at different compression ratios based on historical data. This comprehensive approach generates a compression transmission quality function, enabling a quantitative evaluation of the compression effect. Finally, a convolutional neural network algorithm is used to construct an early warning model, which monitors compression transmission quality in real time. When the compression ratio exceeds the effective range or the quality falls below a threshold, an automatic warning is triggered, prompting retransmission to ensure data integrity and transmission efficiency.
[0004] In high-frequency trading scenarios, rapid response is required, which necessitates dynamic compression. Static compression results in low data compression rates, and since high-frequency trading data contains key price and volume information, static compression can lead to a decrease in accuracy and completeness. Summary of the Invention
[0005] To address the technical problem of data integrity loss caused by static compression in high-frequency trading, this application provides an artificial intelligence decision support method and system for high-frequency trading. The specific technical solution adopted is as follows: Firstly, this application proposes an artificial intelligence decision support method for high-frequency trading, which includes the following steps: Collect order book data from multiple time points, and calculate the volatility and bid-ask spread for the current time based on the order book data from the previous preset minutes. For the preset window of the order book data, the window size for the next time moment is obtained by adjusting the window size based on the volatility of the current time moment; the changes in window data are detected based on the hash value of the data in the window at adjacent time moments; data in the window that has not changed is deleted, and data in the window that has changed is compressed. Within the data change window, multiple buy and sell prices at a given moment are statistically analyzed, and the best buy price, best sell price, second-best buy price, and second-best sell price are recorded as key price levels. The data change rate is obtained based on the difference in the number of orders at the key price levels at the current moment and the adjacent moments, as well as the number of orders at the key price levels at adjacent moments. The dynamic compression rate is obtained based on the data change rate and the difference between the current buy and sell price difference and the maximum buy and sell price difference within a day. Based on the dynamic compression ratio, the quantization step size in the DPCM algorithm and the dictionary update frequency in the dictionary compression algorithm are adjusted respectively, and the order book data is compressed based on the two adjusted algorithms. The compressed data transmission is decompressed and input into the Transformer model to generate decision signals, thus completing decision support.
[0006] In the above scheme, this application detects changes in the data within a preset window, first distinguishing between critical and non-critical data, avoiding complex calculations of the compression quality function, effectively reducing data volume, and accelerating compression speed. Then, it obtains a dynamic adjustment coefficient, i.e., a dynamic compression ratio, based on the characteristics of different collected data. Based on this dynamic compression ratio, the compression algorithm is improved, enabling it to dynamically compress relevant data. This allows it to better cope with the complex changes in high-frequency trading data, not only accelerating compression speed but also more comprehensively preserving data information, improving data accuracy and integrity.
[0007] In one embodiment, the volatility at the current moment is based on data from the previous 5 minutes using... The value obtained from the model; the bid-ask spread at the current moment is the difference between the optimal bid price and the optimal ask price at the current moment.
[0008] In one embodiment, the window size is calculated as follows: , This represents the window size at time t. This represents the volatility at time t. This represents the window size at time t+1. Represents the normalization function. It is a very small positive number.
[0009] In one embodiment, the method for detecting window data changes based on the data hash values within adjacent time windows is as follows: Calculate the hash values of the current time window and the previous time window, and perform an XOR operation on the two hash values. If the XOR operation result is not 0, it means that the data in the current time window has changed.
[0010] In one embodiment, the data change rate is positively correlated with the difference in the number of orders at the key price level at the current time and the adjacent time, and negatively correlated with the number of orders at the key price level at the adjacent time.
[0011] In one embodiment, the dynamic compression ratio is positively correlated with the difference between the bid-ask spread and the maximum bid-ask spread within a day, and negatively correlated with the rate of change of data.
[0012] In one embodiment, the expression for the quantization step size adjustment is: , This represents the adjustment coefficient. Indicates the basic quantization step size. Let represent the dynamic compression ratio at time t. This represents the quantization step size at time t; The range of values is The range of values is .
[0013] In one embodiment, the expression for the dictionary update frequency is: , and Indicates an adjustable parameter. Let represent the dynamic compression ratio at time t. Indicates the dictionary update frequency; The range of values is , The range of values is .
[0014] In one embodiment, the method for compressing order book data based on the adjusted two algorithms is as follows: The collected order book data is first processed through DPCM to obtain the quantitative differential encoding of high-frequency trading data, and then the matching pattern is found through dictionary compression for index replacement, further compressing the data.
[0015] Secondly, embodiments of this application also provide an artificial intelligence decision support system for high-frequency trading, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-described artificial intelligence decision support methods for high-frequency trading.
[0016] The beneficial effects of this application are as follows: By using dynamic windows and data change block detection, this application avoids the complex calculation of the compression quality function, effectively reducing the data volume and accelerating the compression speed. Improving the compression algorithm based on the characteristics of the collected data can better cope with the complex changes in high-frequency trading data, not only accelerating the compression speed but also more comprehensively preserving data information, thus improving the accuracy and integrity of the data. Attached Figure Description
[0017] To more clearly illustrate the technical solutions and advantages in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 A flowchart illustrating an artificial intelligence decision support method for high-frequency trading provided in one embodiment of this application; Figure 2 This is a flowchart of an AI-powered decision support system for high-frequency trading. Detailed Implementation
[0019] To further illustrate the technical means and effects adopted by this application to achieve the intended inventive purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of the artificial intelligence decision support method and system for high-frequency trading proposed in this application. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0021] Examples of AI-powered decision support methods and systems for high-frequency trading: The following description, in conjunction with the accompanying drawings, details the specific scheme of the artificial intelligence decision support method and system for high-frequency trading provided in this application.
[0022] Please see Figure 1 The document illustrates a flowchart of an artificial intelligence decision support method and system for high-frequency trading according to an embodiment of this application. The method includes the following steps: Step S001: Collect order book data and obtain volatility and bid-ask spread based on it.
[0023] AI-powered decision support systems for high-frequency trading require the collection of Level 2 order book data. Order book data consists of detailed order information provided by the exchange, which includes various core information. In this embodiment, buy and sell quotes, order volume, and timestamps are used as examples. Each order book data is a numerical sequence, characterized by high-frequency updates, high redundancy, and time sensitivity.
[0024] Level 2 order book data is retrieved from the exchange API at preset time intervals. In this embodiment, the preset time interval is 100 microseconds. First, invalid orders need to be filtered out. The order book data may contain erroneous prices due to system failures, human error, or other reasons, such as orders with negative prices. Besides erroneous prices, there may also be other types of invalid orders, such as orders with zero quantity or abnormal order status. These invalid data need to be filtered according to appropriate rules.
[0025] Different data sources or trading systems within an exchange may use different time standards. To ensure data consistency and accuracy, all data timestamps need to be aligned to the exchange's UTC time. This avoids data corruption caused by time differences and ensures that subsequent time-series analysis and processing can proceed correctly. This can be achieved by synchronizing with the exchange's time server to obtain accurate UTC time and adjusting the timestamps of the collected data.
[0026] For the collected order book data, feature extraction is performed, extracting data up to a preset time period before the current moment, and calculating the volatility at the current moment based on the order book data for the preset time period; in this embodiment, the preset time period is 5 minutes; using The model calculates the volatility at the current moment. The generalized autoregressive conditional heteroscedasticity (GHP) model is a commonly used model for describing the volatility of financial time series. It considers the impact of past volatility and past residuals on current volatility, and can effectively capture the clustering and time-varying nature of financial market volatility. Specifically, by fitting data over a predetermined period of time, the values of the model parameters can be estimated, and then the volatility at the current moment can be calculated.
[0027] Volatility is an important indicator for measuring market risk and uncertainty. In high-frequency trading, changes in volatility can reflect the level of market activity and the severity of price fluctuations, which is of great significance for adjusting trading strategies, controlling risk, and adjusting compression strategies.
[0028] In addition, based on all the collected order book data, the current best bid price and best ask price are obtained, and the difference between the current best bid price and best ask price is calculated as the bid-ask spread at the current moment.
[0029] The bid-ask spread reflects market liquidity and transaction costs. A smaller bid-ask spread generally indicates better market liquidity and lower transaction costs, while a larger bid-ask spread may indicate poorer market liquidity and higher transaction costs. In high-frequency trading, the bid-ask spread is an important reference indicator, playing a crucial role in judging the market trading environment, formulating trading strategies, and adjusting compression strategies.
[0030] At this point, we have obtained the order book data for each moment, the volatility at the current moment, and the bid-ask spread.
[0031] Step S002: Adjust the window at the current moment based on volatility to obtain the window at the next moment, and complete the window detection through the hash value.
[0032] The core of this application lies in achieving efficient data compression based on market dynamics. First, the window size is dynamically adjusted according to market characteristics to balance capturing data changes with computational load. Next, by detecting changes within the window, only windows that have changed are processed, effectively avoiding repetitive operations on large amounts of unchanged data and improving processing efficiency. For the detected windows, a compression rate is dynamically selected to balance compression ratio and data integrity. Finally, by adjusting the compression strategy, data quality and the accuracy of subsequent trading decisions are guaranteed.
[0033] In high-frequency trading data processing, the window size needs to be dynamically adjusted based on data characteristics to improve compression efficiency. Different window sizes help capture data features at different time scales. Small windows can capture short-term changes and detailed information, suitable for tracking rapidly changing market conditions; large windows smooth the data, highlighting long-term trends and overall characteristics, which is helpful when market volatility is low or when analyzing long-term trends is required. Adjusting the window size to detect data change blocks affects the sensitivity and accuracy of data change detection. An appropriate window size can more accurately identify the truly changed parts of the data, allowing for targeted compression of these change blocks.
[0034] Therefore, the window size for the current moment is adjusted based on the volatility at the current moment to obtain the window size for the next moment, and the window size for the next moment is negatively correlated with the volatility.
[0035] It should be noted that negative correlation means that when one variable increases, the other variable decreases accordingly, and the two variables change in opposite directions. When one variable changes from large to small or from small to large, the other variable also changes from small to large or from large to small. The specific relationship is determined by practical application, and this application does not impose any special restrictions.
[0036] The window size for the next moment is calculated as follows: , This represents the window size at time t. This represents the volatility at time t. This represents the window size at time t+1. Represents the normalization function. It is a very small positive number, and its function is to prevent the denominator from being 0.
[0037] The window for the next time step is calculated based on the window at the current time step, therefore an initial window needs to be set. In this embodiment, the initial window size is set to 5 minutes. When volatility is high, market changes are drastic, and the window size needs to be reduced to capture data changes more promptly; when volatility is low, the market is relatively stable, and the window size can be appropriately increased to reduce the amount of computation.
[0038] In dynamic compression, it's necessary to detect data changes and process and compress only the data that has changed, thereby improving compression efficiency. The choice of window size affects the accuracy of data change detection; a suitable window size can more accurately identify data changes. When the window is too large, multiple different change blocks may be merged together, making it impossible to detect subtle local changes in a timely manner; while when the window is too small, some normal fluctuations may be misjudged as change blocks, increasing unnecessary processing. By adjusting the window size according to market volatility, change blocks in the data can be accurately captured in different market environments, improving the accuracy and efficiency of compression.
[0039] Order book data contains a large amount of relatively stable data as well as occasional rapidly changing data. These changes are often crucial for subsequent analysis and decision-making models. Only by accurately capturing and processing these blocks of change can accurate and effective data support be provided to the decision-making models, helping to make more rational trading decisions.
[0040] By inspecting the data within a window, only the changed data can be processed and compressed, significantly improving compression efficiency and reducing unnecessary waste of computational and storage resources. If the entire data window is compressed uniformly without inspecting it, a large amount of time and resources will be wasted on unchanged data, whereas processing only the changed parts achieves the same information preservation effect.
[0041] In the transmission of financial data, detecting changes in data within a window and compressing and transmitting only the changed window can significantly reduce the amount of data transmitted, lower the demand for network bandwidth, improve the speed and efficiency of data transmission, reduce latency and error rates during data transmission, and ensure that data can reach its destination for processing and analysis in a timely and accurate manner.
[0042] In this embodiment, the window where the data has changed is checked by hash verification. The hash values of the current window and the previous window are calculated, and the two hash values are XORed. If the value of the XOR operation is not 0, it means that the data in the window has changed.
[0043] Hash algorithms map data to fixed-length hash values. By performing hash calculations on the data within a window, it's possible to quickly determine whether data in adjacent windows has changed. Compared to comparing data elements one by one, hash verification can complete the checking of large amounts of data in a shorter time, significantly improving data processing speed. Hash algorithms are well-known technologies, and the specific steps will not be elaborated further.
[0044] The above steps complete the detection of changes in window data. When the data in adjacent windows changes, normal compression processing is performed. When the data in adjacent windows does not change, the data in the current window can be discarded to reduce the amount of data compression and transmission. Furthermore, data loss is avoided by copying the data from the previous window during decompression.
[0045] This completes the detection of changes in window data.
[0046] Step S003: Statistically analyze the difference in the number of orders at key price levels between the current time and adjacent times, as well as the difference between the current bid-ask spread and the maximum bid-ask spread, and obtain the dynamic compression rate based on these two differences.
[0047] For windows where data changes, the compression ratio needs to be dynamically selected, as different compression ratios will have varying impacts on the compression effect and quality. Higher compression ratios can significantly reduce data storage space and transmission bandwidth, but may lead to some degree of data distortion; while lower compression ratios, although better preserving the original information of the data, have less noticeable compression effects and cannot fully utilize limited resources. By selecting an appropriate compression ratio, a balance can be achieved between maximizing compression effectiveness while ensuring data quality meets the needs of subsequent analysis and decision-making.
[0048] Since multiple buy and sell prices exist simultaneously, the best buy price, best sell price, second-best buy price, and second-best sell price are designated as key price levels. The number of orders at these key price levels is then tallied. The number of orders at different price levels in the order book represents the market's buying and selling depth at different price levels. Since key price levels are the most representative, the rate of change in the current timeframe is obtained based on the difference in the number of orders at key price levels between adjacent timeframes.
[0049] The rate of change of data is positively correlated with the difference in the number of orders at the current time and the key price level in adjacent time periods, and negatively correlated with the number of orders at the key price level in adjacent time periods.
[0050] It should be noted that positive correlation means that when one variable increases, the other variable also increases, and the two variables change in the same direction. When one variable changes from large to small or from small to large, the other variable also changes from large to small or from small to large. The specific relationship is determined by the actual application, and this application does not impose any special restrictions.
[0051] The expression for the rate of change of data is: , Let represent the number of orders at the i-th key price level at time t. Let represent the number of orders at the i-th key price level at time t. Indicates the quantity at key price levels. This represents the rate of change of the data at time t.
[0052] In high-frequency trading, the data change rate reflects the market's activity and volatility. A high data change rate indicates an active market with frequent and dramatic data changes. In this case, the compression rate needs to be reduced to ensure that the details of data changes are captured and to avoid losing important information. Conversely, when the data change rate is low, the market is relatively stable with smaller data changes, and the compression rate can be appropriately increased to save storage and transmission resources.
[0053] The dynamic compression ratio at the current moment is calculated based on the difference between the current bid-ask spread and the maximum bid-ask spread within a day, as well as the data change rate, within a preset compression ratio range. In this embodiment, the compression ratio range is 0.4-0.95.
[0054] The dynamic compression ratio is positively correlated with the difference between the bid-ask spread and the maximum bid-ask spread within a day, and negatively correlated with the rate of change of data.
[0055] The expression for dynamic compression ratio is: , This represents the rate of change of the data at time t. This represents an exponential function with the natural constant as its base. This represents the bid-ask spread at time t. This indicates the largest bid-ask spread within a day at the current moment. Indicates the maximum compression ratio. Indicates the minimum compression ratio. This represents the dynamic compression ratio at time t.
[0056] The higher the dynamic compression ratio, the better the market liquidity and the lower the data change rate, so a higher compression ratio can be selected to improve compression efficiency; conversely, the lower the dynamic compression ratio, the worse the market liquidity and the higher the data change rate, so a lower compression ratio needs to be selected to ensure the integrity and accuracy of the data.
[0057] At this point, the dynamic compression ratio at each moment has been obtained.
[0058] Step S004: Adjust the DPCM algorithm and dictionary compression algorithm based on the dynamic compression ratio, and then perform compression.
[0059] DPCM (Differential Pulse Code Modulation) is a lossless data compression technique that compresses data by calculating the difference between adjacent data points and encoding that difference. Dictionary compression is a lossless data compression method based on a dictionary. It reduces data storage space by creating a dictionary and representing recurring data patterns using indices.
[0060] Both DPCM and dictionary compression have their own drawbacks. DPCM is a local encoding method that only considers the relationships between adjacent data points, ignoring the global characteristics of the data. In high-frequency trading data, there may be recurring patterns or trends, which are valuable for data compression, but DPCM cannot utilize this global information to further improve compression efficiency. Dictionary compression requires pre-constructing a dictionary to store common data patterns. In high-frequency trading data, due to the dynamic nature and complexity of the data, it is difficult to build a dictionary that can cover all possible data patterns from the outset. If the dictionary is not constructed properly, many data patterns may not find a match in the dictionary, thus reducing compression efficiency.
[0061] DPCM (Data Flow Compression) can quickly respond to local changes in data, while dictionary compression can adapt to global changes by updating the dictionary. Using them together can better handle the complex changes in high-frequency trading data. When sudden market events cause drastic local changes in the data, DPCM can promptly address these changes; and when new recurring patterns emerge in the market, dictionary compression can capture these patterns by updating the dictionary. When major market events cause sharp price fluctuations, DPCM can effectively handle rapid price changes, while dictionary compression, by updating the dictionary over time, incorporates newly emerging price fluctuation patterns, improving compression effectiveness.
[0062] In this application, the DPCM and dictionary compression combination strategy is further improved through dynamic compression ratio to achieve the purpose of dynamic adjustment.
[0063] Traditional DPCM quantization parameters are usually fixed or adjusted according to simple empirical rules, while traditional dictionary compression methods also use a fixed dictionary update frequency or update it according to simple time intervals. However, in this application, the dynamic compression ratio calculated above is used to dynamically adjust the DPCM quantization step size and dictionary update frequency.
[0064] First, set the base quantization step size, then adjust it based on the dynamic compression ratio; the quantization step size and the dynamic compression ratio are negatively correlated. The expression for the quantization step size is: , This represents the adjustment coefficient. Indicates the basic quantization step size. Let represent the dynamic compression ratio at time t. This represents the quantization step size at time t.
[0065] in, The range of values is Adjustments are made based on price fluctuations; in this embodiment, the value is 0.05. The range of values is This is used to control the degree to which the quantization step size changes with the dynamic compression rate; in this embodiment, it is set to 0.5. When market liquidity is good and the data change rate is low, At higher levels, increasing the quantization step size will not have a significant impact on data quality; however, when market liquidity is poor and the data change rate is high, Lower, reduce the quantization step size to retain more data details.
[0066] The dictionary update frequency is calculated based on the dynamic compression ratio, and there is a positive correlation between the dictionary update frequency and the dynamic compression ratio. The expression for the dictionary update frequency is: , and Indicates an adjustable parameter. Let represent the dynamic compression ratio at time t. Indicates the dictionary update frequency.
[0067] in, The frequency of dictionary updates is determined by... The slope of the change, with a range of values. In this embodiment, the value is 0.8. It is a basic update frequency offset, with a value range of [value range missing]. In this embodiment, the value is 0.05. When A higher frequency indicates a relatively stable market and many repetitive data patterns, allowing for a reduction in dictionary update frequency to minimize computational overhead. At lower frequencies, market fluctuations are drastic, and new data patterns constantly emerge, necessitating a higher dictionary update frequency to capture more effective patterns and improve compression efficiency. The dictionary update operation involves first updating the dictionary based on the current update frequency, then calculating a new update frequency after the dictionary is updated, and finally using the new update frequency for the next dictionary update.
[0068] In this application, the quantitative differential encoding of high-frequency trading data is first obtained through DPCM, and then the matching pattern is found through dictionary compression to replace the index and further compress the data. Both DPCM and dictionary compression are well-known technologies. The quantization step size and dictionary update frequency calculated above are used to replace the contents of the original DPCM and dictionary compression algorithms, and the data compression is completed based on this.
[0069] This completes the compression of the order book data.
[0070] Step S005: Generate a decision signal based on the compressed data.
[0071] To ensure data security and prevent data tampering, the compressed data is encrypted using AES-256-GCM, with the key dynamically rotated every 5 minutes. The encrypted data is then transmitted. Upon receiving the data on another server, it is decompressed and stored in a buffer, followed by error checking. If the error is significant, the data is retransmitted. Finally, the reconstructed data is input into the Transformer model to generate decision signals. The generation of decision signals is existing technology and its details will not be elaborated further.
[0072] This concludes the development of an AI-powered decision support method and system for high-frequency trading.
[0073] Based on the same inventive concept as the above method, this embodiment of the invention also provides an artificial intelligence decision support system for high-frequency trading, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-described artificial intelligence decision support methods for high-frequency trading.
[0074] In an AI-powered decision support system for high-frequency trading, data is collected from Exchange 1 via a data acquisition module. This data is then compressed by a dynamic data compression module, and the compressed data is transmitted to a strategy generation module. The strategy generation module then generates decision signals from multiple exchanges. The system flowchart is shown below. Figure 2 As shown. The data acquisition module and dynamic data compression module focus on... The data acquisition module and dynamic data compression module are deployed on one server, while the strategy generation module is deployed on another server. The data acquisition module and dynamic data compression module rely on deep learning models and focus more on the logical operations of the CPU and the acceleration capabilities of the GPU.
[0075] It should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
[0076] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. An artificial intelligence decision support method for high-frequency trading, characterized in that, The method includes the following steps: Collect order book data from multiple time points, and calculate the volatility and bid-ask spread for the current time based on the order book data from the previous preset minutes. For the preset window of the order book data, the window size for the next time moment is obtained by adjusting the window size based on the volatility of the current time moment; the changes in window data are detected based on the hash value of the data in the window at adjacent time moments; data in the window that has not changed is deleted, and data in the window that has changed is compressed. Within the data change window, multiple buy and sell prices at a given moment are statistically analyzed, and the best buy price, best sell price, second-best buy price, and second-best sell price are recorded as key price levels. The data change rate is obtained based on the difference in the number of orders at the key price levels at the current moment and the adjacent moments, as well as the number of orders at the key price levels at adjacent moments. The dynamic compression rate is obtained based on the data change rate and the difference between the current buy and sell price difference and the maximum buy and sell price difference within a day. Based on the dynamic compression ratio, the quantization step size in the DPCM algorithm and the dictionary update frequency in the dictionary compression algorithm are adjusted respectively, and the order book data is compressed based on the two adjusted algorithms. The compressed data transmission is decompressed and input into the Transformer model to generate decision signals, thus completing decision support.
2. The artificial intelligence decision support method for high-frequency trading as described in claim 1, characterized in that, The volatility at the current moment is based on data from the previous 5 minutes. The value obtained from the model; the bid-ask spread at the current moment is the difference between the optimal bid price and the optimal ask price at the current moment.
3. The artificial intelligence decision support method for high-frequency trading as described in claim 1, characterized in that, The method for calculating the window size is as follows: , This represents the window size at time t. This represents the volatility at time t. This represents the window size at time t+1. Represents the normalization function. It is a very small positive number.
4. The artificial intelligence decision support method for high-frequency trading as described in claim 1, characterized in that, The method for detecting changes in window data based on the hash values of data within adjacent time windows is as follows: Calculate the hash values of the current time window and the previous time window, and perform an XOR operation on the two hash values. If the XOR operation result is not 0, it means that the data in the current time window has changed.
5. The artificial intelligence decision support method for high-frequency trading as described in claim 1, characterized in that, The rate of change of the data is positively correlated with the difference in the number of orders at the key price level at the current time and the next key price level, and negatively correlated with the number of orders at the next key price level.
6. The artificial intelligence decision support method for high-frequency trading as described in claim 1, characterized in that, The dynamic compression ratio is positively correlated with the difference between the bid-ask spread and the maximum bid-ask spread within a day, and negatively correlated with the data change rate.
7. The artificial intelligence decision support method for high-frequency trading as described in claim 1, characterized in that, The expression for adjusting the quantization step size is: , This represents the adjustment coefficient. This indicates the preset base quantization step size. Let represent the dynamic compression ratio at time t. This represents the quantization step size at time t; The range of values is , The range of values is .
8. The artificial intelligence decision support method for high-frequency trading as described in claim 1, characterized in that, The expression for the dictionary update frequency is: , and Indicates an adjustable parameter. Let represent the dynamic compression ratio at time t. Indicates the dictionary update frequency; The range of values is , The range of values is .
9. The artificial intelligence decision support method for high-frequency trading as described in claim 1, characterized in that, The method for compressing order book data based on the two adjusted algorithms is as follows: The collected order book data is first processed through DPCM to obtain the quantitative differential encoding of high-frequency trading data, and then the matching pattern is found through dictionary compression for index replacement, further compressing the data.
10. An artificial intelligence decision support system for high-frequency trading, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the artificial intelligence decision support method for high-frequency trading as described in any one of claims 1-9.