Data analysis method, device, equipment and storage medium
By obtaining the data processing time and order success rate of multiple components during the transaction process, and conducting comprehensive analysis based on the order book change cycle, the problem of low accuracy of transaction market analysis in the financial market in the existing technology is solved, and the problem of low accuracy of transaction market analysis in the financial market is realized. More efficient identification of trading opportunities.
Patent Information
- Application Number
- CN202411323968.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-09-23
AI Technical Summary
When the prior art backtesting and analyzing high-frequency data in the historical day based on the order book change cycle in the financial market, there is a problem of low accuracy, especially when there are large differences between future market conditions and historical conditions.
By obtaining the data processing time and order success rate of multiple components during the transaction process, and conducting a comprehensive analysis based on the order book change cycle, we determine the dependence relationship between transaction execution and data processing time in different periods.
It improves the accuracy of trading market analysis and can more effectively identify market volatility and liquidity changes, thereby improving the acquisition of trading opportunities.
Smart Images

Figure CN118863972B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data analysis, and in particular to a data analysis method, device, equipment and storage medium. Background Art
[0002] Traditional low-frequency data is cross-sectional data with equal time intervals, while intraday high-frequency data arrives randomly in a very short period of time, and its time interval is irregular. This irregularity provides financial traders with a lot of information that cannot be obtained from low-frequency data. The time interval between two transactions may imply changes in market volatility, liquidity and many other factors, and trading opportunities depend largely on the accuracy of data that identifies these changes.
[0003] In summary, how to identify the speed requirements of transaction execution through intraday high-frequency data has become one of the factors affecting the acquisition of trading opportunities. The current solution is to backtest and analyze the historical intraday high-frequency data of the market based on the order book change cycle. However, due to the high complexity and uncertainty of the financial market, the future market conditions may be quite different from the historical conditions. Backtesting and analyzing historical data based only on the order book change cycle will result in certain deviations in actual applications, resulting in low accuracy in trading market analysis. Summary of the invention
[0004] The embodiments of the present application provide a data analysis method, apparatus, device and storage medium, which obtain the time required for order processing and the order success rate, and then take the time required for order processing and the order success rate into consideration on the basis of the order book change cycle to perform a comprehensive analysis of the transaction market to obtain the result, which is beneficial to improving the accuracy of the transaction market analysis.
[0005] In a first aspect, an embodiment of the present application provides a data analysis method, comprising:
[0006] Obtain the data processing time of multiple components during a transaction; construct an order book segmented by day based on historical transaction records; determine the order success rate based on the arrival time of the first order in the order book and the data processing time of the multiple components; determine a data analysis result based on the order success rate, the data processing time, and the change cycle of the order book, wherein the data analysis result is the dependency relationship between transaction execution status and data processing time in different periods.
[0007] In a second aspect, an embodiment of the present application provides a data analysis device, including:
[0008] The acquisition module is used to obtain the data processing time of multiple components in the transaction process;
[0009] Construction module for building daily segmented order books based on historical trading records;
[0010] A determination module is used to determine an order success rate based on the arrival time of the first order in the order book and the data processing time of the multiple components; and to determine a data analysis result based on the order success rate, the data processing time and the change cycle of the order book, wherein the data analysis result is a dependency relationship between transaction execution status in different periods and data processing time.
[0011] In a third aspect, an embodiment of the present application provides a data analysis device, the device comprising:
[0012] A memory, a processor, and a data processing program stored in the memory and executable on the processor, wherein the data processing program is configured to implement part or all of the steps described in any method in the first aspect.
[0013] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a data processing program is stored. When the data processing program is executed by a processor, some or all of the steps described in any method in the first aspect are implemented.
[0014] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program is operable to cause a computer to execute some or all of the steps described in any method of the first aspect of the embodiment of the present application. The computer program product can be a software installation package.
[0015] By implementing the embodiment of the present application, the server of the transaction analysis system first obtains the data processing time of multiple components in the transaction process; then builds an order book divided by day based on historical transaction records; then determines the order success rate based on the arrival time of the first order in the order book and the data processing time of multiple components; finally, determines the data analysis result based on the order success rate, data processing time and the change cycle of the order book, and the data analysis result is the dependency relationship between the transaction execution status and the data processing time in different periods. By obtaining the time required for order processing and the order success rate, and then taking the time required for order processing and the order success rate into account on the basis of the change cycle of the order book, a comprehensive analysis of the transaction market is obtained, which is conducive to improving the accuracy of the transaction market analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.
[0017] Figure 1 It is a schematic diagram of the architecture of a data analysis system provided in an embodiment of the present application;
[0018] Figure 2is a flow chart of a data analysis method provided in an embodiment of the present application;
[0019] Figure 3 is a flowchart of component data processing provided by an embodiment of the present application;
[0020] Figure 4 This is a flow chart of data processing of a market gateway component provided in an embodiment of the present application;
[0021] Figure 5 is a schematic diagram of a first prompt information provided in an embodiment of the present application;
[0022] Figure 6 is a structural schematic diagram of a data analysis device provided in an embodiment of the present application;
[0023] Figure 7 It is a structural schematic diagram of a data analysis device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. According to the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.
[0025] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0026] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0027] Traditional low-frequency data is cross-sectional data with equal time intervals, while intraday high-frequency data arrives randomly in a very short period of time, and its time interval is irregular. This irregularity provides financial traders with a lot of information that cannot be obtained from low-frequency data. The time interval between two transactions may imply changes in many other factors such as market volatility and liquidity, and trading opportunities depend to a large extent on the accuracy of data that identifies these changes. In summary, how to identify the speed requirements of transaction execution through intraday high-frequency data has become one of the factors affecting the acquisition of trading opportunities. The current solution is to backtest and analyze the historical intraday high-frequency data of the market based on the order book change cycle. However, due to the high complexity and uncertainty of the financial market, the future market conditions may be quite different from the historical conditions. Backtesting and analyzing historical data based only on the order book change cycle will result in certain deviations in actual applications, resulting in low accuracy in the analysis of trading conditions.
[0028] In response to the above problems, the embodiments of the present application provide a data analysis method, device, equipment and storage medium. The server of the transaction analysis system first obtains the data processing time of multiple components in the transaction process; then builds an order book divided by day based on historical transaction records; then determines the order success rate based on the arrival time of the first order in the order book and the data processing time of multiple components; finally, determines the data analysis result based on the order success rate, data processing time and the change cycle of the order book, and the data analysis result is the dependency relationship between the transaction execution status and the data processing time in different periods. By obtaining the time required for order processing and the order success rate, and then taking the time required for order processing and the order success rate into account on the basis of the change cycle of the order book, a comprehensive analysis of the transaction market is obtained, which is conducive to improving the accuracy of the transaction market analysis.
[0029] The data analysis method, device, equipment and storage medium provided in the embodiments of the present application can be applied to Figure 1 In the data analysis system shown, see Figure 1 , Figure 1 It is an architectural diagram of a data analysis system provided in an embodiment of the present application. The data analysis system 100 includes a terminal 101 and a server 102. The terminal 101 can communicate with the server 102 through a network. The terminal 101 refers to a device used by a user, such as a smart phone, a computer, etc.
[0030] In this solution, the terminal 101 is provided with a user interface, which is mainly responsible for interacting with the server 102, so that users can easily input trading instructions, query market conditions and other operations. The server 102 refers to a remote computer used to process a large number of computing tasks and store data. In this solution, a transaction execution speed measurement model and a transaction execution on transaction speed dependence analysis model are deployed on the server 102 to perform transaction execution speed measurement and transaction execution on transaction speed dependence analysis. The server 102 can also be used to collect data during the use of the model, so as to facilitate the subsequent optimization of the transaction execution speed measurement model and the transaction execution on transaction speed dependence analysis model. The server 102 can send prompt information to the terminal 101.
[0031] Based on this, the present application provides a data analysis method, device, equipment and storage medium, and the present application is described in detail below in conjunction with the accompanying drawings.
[0032] See also Figure 2 , Figure 2 is a flow chart of a data analysis method provided in an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:
[0033] S201, obtaining data processing time of multiple components during a transaction.
[0034] Among them, the transaction order execution process flows through a total of 7 types of components, of which this solution involves 6 types of components, including the market gateway component, market forwarding component, counter component, quotation component, exchange matching front-end component and exchange market front-end component.
[0035] Specifically, the market gateway component is the core component in the process of executing trading orders. It is responsible for receiving trading orders from users and verifying and processing the orders. It sends the orders to the market forwarding component. The market forwarding component receives the trading orders sent by the market gateway component, and the market forwarding component forwards the trading orders to the strategy component, which determines whether the transaction needs to be carried out. The counter component is a bridge between the exchange and investors. It is responsible for processing the trading requests submitted by investors and providing relevant information and services to investors. The counter component sends the qualified trading requests to the offer component. The offer component is responsible for docking with the exchange and forwarding the orders submitted by the counter component to the exchange. The offer component receives the trading requests from the counter and passes them to the exchange. At the same time, the execution results returned by the exchange will be fed back to the counter. The exchange matching front-end component is responsible for managing the matching engine and processing matching rules. When the offer submits the trading instruction, the front-end component will match the buyer and seller according to certain rules and generate transaction data. The exchange market front-end component is responsible for acquiring and providing users with real-time market data, in-depth information and other content. The exchange market front-end component pushes the market data to the market gateway component and forwards it to the market forwarding component, which pushes it to investors for their reference when making decisions.
[0036] Among them, since the data processing rules of various components are different, different methods need to be adopted for different categories of components to determine the speed at which the components process orders, that is, the data processing time of the components.
[0037] In a possible implementation, the multiple components include a first type of components and a second type of components, the first type of components include a market gateway component, a counter component, a quotation component, and an exchange matching front-end component, the second type of components include a market forwarding component and an exchange market front-end component, and the data processing time of the multiple components in the acquisition of the transaction process includes:
[0038] Determine the data processing time of the first category component according to the difference between the order output time and the order input time of the first category component under the same order; determine the target subcomponent among the multiple subcomponents of the second category component; and determine the data processing time of the second category component according to the difference between the order output time and the order input time of the target subcomponent under the same order.
[0039] Among them, the input and output of the first type of components correspond one to one, while the input and output of the second type of components do not correspond one to one.
[0040] Among them, see Figure 3 , Figure 3 is a flowchart of a component data processing provided by an embodiment of the present application, such as Figure 3As shown, when measuring the market gateway component, counter component, quotation component and exchange matching front-end component, the order data before entering the component and the order data output by the component can be captured, and the same order can be matched according to the order number. Then, the difference between the order output component time and the order input component time of the same component can be calculated as the time for the component to process a single order, that is, the data processing time of the component.
[0041] For example, please refer again to Figure 3 , the time for the same order to enter the market gateway component is T1, and the time to output the market gateway component and enter the market forwarding component is T2. At this time, the uplink processing speed of the market gateway component, that is, the data processing time of the market gateway component, can be obtained by T2-T1. Similarly, the time for the same order to enter the market forwarding component is T2, and the time to output the market forwarding component and enter the strategy component is T3. At this time, the uplink processing speed of the market forwarding component, that is, the data processing time of the market forwarding component, can be obtained by T3-T2. The uplink data processing time of the counter component is T5-T4, and the downlink data processing time is T9-T8. The uplink data processing time of the quotation component is T6-T5, and the downlink data processing time is T8-T7.
[0042] Among them, since the exchange market pre-component belongs to the internal structure of the exchange and does not form an interactive closed loop with other components, it is not possible to directly obtain the data flowing through the exchange market pre-component before and after for matching measurement on the existing architecture, so the exchange market pre-component measurement is different from other components. In addition, the input and output of the exchange market pre-component are in a 1:n relationship, that is, one order data is input into the exchange market pre-component, and the exchange market pre-component will output n pieces of the same order data to n market gateway components. Therefore, when measuring the data processing time of the second type of component, it is necessary to first find the target component from the n order processing data components, and then determine the time for the exchange market pre-component to process a single order by calculating the order output time of the target component and the order input time of the exchange market pre-component, that is, the data processing time of the component.
[0043] It can be seen that in this example, multiple components are divided into first-category components and second-category components through the correspondence between the input and output of the components, and then different order speed measurement methods are used for different types of components. This is beneficial to improving the accuracy of the order speed measurement of the components and facilitates the subsequent direct use of the measured component data processing time.
[0044] In a possible implementation, the second-type component includes multiple sub-components, and determining a target sub-component among the multiple sub-components of the second-type component includes:
[0045] Obtain order output times of multiple subcomponents in the second-category component under the same order; determine the subcomponent with the earliest order output time among the multiple subcomponents as the target subcomponent.
[0046] For example, see Figure 4 , Figure 4 This is a flow chart of data processing of a market gateway component provided in an embodiment of the present application, such as Figure 4 As shown in the figure, after order A is input into the market gateway component, since the input and output of the market forwarding component are in an n:1 relationship, that is, the output of the same order A will be input by multiple market gateway sub-components, and then only one order A data will be output, so for the same order A, the market forwarding component selects the earliest data as the input data of the market forwarding component of order A, and then calculates the difference between the output time and input time of the market forwarding component as the speed of the market forwarding component processing a single order.
[0047] The formula for data processing time of the market forwarding component is as follows:
[0048] ;
[0049] in, The data processing time of the market forwarding component. It is the output time of the same order in the market forwarding component. It is the earliest output time of the same order in all gateway subcomponents, that is, the earliest input time of the same order in the market forwarding component.
[0050] Please refer again to Figure 3 In this solution, the exchange matching front-end component is superimposed on the exchange market front-end component for combined measurement to measure the processing delay of the exchange market front-end component. We capture the order data before the exchange matching front-end component is input and the order data of the market gateway component, and match the same order according to the order number. Due to the 1:n input and output characteristics of the exchange market front-end component, there will be multiple orders for the market gateway component with only different input times but the same other information.
[0051] Specifically, this solution selects the earliest time (T1 min ) as the input data of the market gateway component of this order, and then calculate the time of entering the order exchange matching front-end component (T6) and the time of entering the market gateway component (T1 min ) is used as the speed of processing a single order by the exchange matching front-end component and the exchange market front-end component. According to the above method, the component data processing time T at time point x can be obtained as follows:
[0052]
[0053] It can be seen that in this scheme, when the input and output of a component do not correspond one to one, the earliest data is selected as the input data or output data of the component, and then the order processing speed of the component is determined by the difference between the component output time and the input time. This can avoid inconsistent results due to the use of data from different sources and improve the accuracy of evaluating the data processing time of the component.
[0054] S202, constructing an order book divided by day based on historical transaction records.
[0055] Among them, the steps to build an order book divided by day are as follows: Data acquisition, first of all, it is necessary to obtain the corresponding data from the market history tick data source, which usually includes key information such as transaction time, underlying code, buying and selling direction (buy or sell), transaction price and market depth. Data cleaning and sorting, clean and sort the acquired raw data, remove invalid or erroneous data, and classify them according to transaction dates. Programming languages or tools can be used to process large amounts of data and ensure the accuracy and consistency of the data. Build an order book, according to each transaction date, aggregate orders with the same buying and selling direction and similar prices under the same underlying code to form a complete order book. The order book should include elements such as time, underlying code, buying and selling direction, price and market depth.
[0056] For example, August 26, 2024 is selected as the sample date. The following is a partial order book for the buy direction of a certain stock (the underlying code is ABC) on that date as shown in Table 1:
[0057] Table 1
[0058]
[0059] Among them, in the above table example, on August 26, 2024, multiple buy operations occurred for stock ABC at different time points. Each record includes the timestamp, target code, buy / sell direction, transaction price and market depth.
[0060] S203: Determine the order success rate according to the arrival time of the first order in the order book and the data processing time of the multiple components.
[0061] Among them, the server can use the transaction execution dependence on transaction speed analysis model to determine the order success rate. The transaction execution dependence on transaction speed analysis model has two inputs, one is the constructed daily dynamically changing order book, and the other is the transaction execution speed, that is, the data processing time.
[0062] In a possible implementation, determining the order success rate according to the arrival time of the first order in the order book and the data processing time of the multiple components includes:
[0063] Obtain the arrival time of the first order in the order book, the first order being any order in the order book; determine the order processing time according to the data processing time of the multiple components; obtain the sum of the arrival time of the first order and the order processing time, the sum being the end time of the first order; obtain the first price corresponding to the arrival time of the first order in the order book and the second price corresponding to the end time of the first order; determine whether the first order is successfully traded according to the transaction type of the first order, the first price and the second price; repeat the above steps until it is determined whether all orders in the order book are successfully traded; determine the order success rate according to the number of successfully traded orders in the order book and the total number of transactions in the order book.
[0064] Specifically, the transaction type of the first order includes a buy order and a sell order, and determining whether the first order is successfully traded according to the transaction type of the first order, the first price and the second price includes: when it is detected that the first order is a buy order and the second price is not less than the first price, determining that the first order transaction is successful; when it is detected that the first order is a buy order and the second price is greater than the first price, determining that the first order transaction fails; when it is detected that the first order is a sell order and the second price is not greater than the first price, determining that the first order transaction is successful; when it is detected that the first order is a sell order and the second price is greater than the first price, determining that the first order transaction fails.
[0065] Among them, the time point x at which each tick in the historical tick market arrives is used as a sample to form a time sample set For the sample set For each sample in the model, this model will virtualize two orders in both directions, one of which uses the buy-one price The order direction is to sell, recorded as , used to calculate the price hit rate of the sell order; the other one uses the sell price The order for buying is recorded as , used to calculate the price hit rate of buy orders.
[0066] Among them, it is assumed that the transaction execution delay at time point x is , then the order Whether the transaction is completed or not is determined by comparing the buy price at the order book time point x+E Is it better than ,like ,but ,otherwise .
[0067] On the contrary, the order Whether the transaction is completed or not is determined by comparing the ask price at the order book time point x+E Is it better than ,like ,but ,otherwise .
[0068] Among them, the completed sample set After counting all virtual orders in , we get two sets of transaction order numbers divided by buying and selling directions and time, recorded as and .
[0069] ;
[0070] ;
[0071] Among them, n is the sample set Finally, the order success rate under different entrustment directions is calculated to measure the price hit rate Hit presented after the transaction execution processing under the entrustment direction.
[0072] ;
[0073] ;
[0074] Among them, n is the sample set The number of .
[0075] Among them, if the sample set If the time range covered is y seconds, the statistical results are Indicates the hit rate of the buy price within the time range [x,x+y], statistical results It indicates the hit rate of the selling price within the time range [x,x+y].
[0076] It can be seen that in the embodiment of this solution, by means of two virtual orders in both directions, the price hit rate of the selling order and the price hit rate of the buying order are respectively counted. In this way, it can be evaluated whether the model can accurately predict the price trend for orders in different directions, and at the same time, the model can comprehensively analyze and evaluate the performance of trading strategies in different directions in the actual market.
[0077] In a possible implementation, determining the order processing time according to the data processing time of the multiple components includes:
[0078] Obtain a first data processing time set for each component among the multiple components to process a first order set; sort the first data processing time set of each component in chronological order to obtain a second data processing time set; obtain the sum of the medians of the second data processing time sets of the multiple components, and the sum is the order processing time.
[0079] Among them, by traversing the order data of the whole day, the processing speed of each order of each component is measured to obtain a set of order processing speeds. Since the distribution of orders for transaction execution throughout the day is not uniform, the input of each order is a random event. In order to more accurately measure the processing speed of the counter components in the whole day, this model is aggregated according to the input time t of the order to obtain the set of order processing speeds at a certain time point x. , and calculate the median of the order processing speed set divided by the time dimension, which is used as the component processing speed T at a certain time point x.
[0080]
[0081] Specifically, when determining the order processing speed of a component, that is, the data processing time of the component based on the median, you can first obtain the data processing time of each component in turn, and then add up the data processing times of different components to get the order processing time. You can also first add up the data processing times of different components under each order to get the order processing time under the order, and then obtain all order processing times under different orders throughout the day, and finally determine the order processing time through the median.
[0082] Exemplarily, when processing orders for the whole day, the data processing time set of the market gateway component is [2, 3, 3, 5, 3, 6, 8]. After sorting the data processing time set of the market gateway component from small to large, the result is [2, 3, 3, 3, 5, 6, 8], and the median is 3. Therefore, the data processing time of the market gateway component on that day is determined to be 3; or, after processing orders for the whole day, the data processing time of all components under each order is summed to obtain a data set. There are 7 orders in total for the whole day, and the order processing time set is as follows [6, 9, 4, 6, 8, 6, 5]. After sorting the order processing time set from small to large, the result is [4, 5, 6, 6, 6, 8, 9], and the median is 6. Therefore, the order processing time for the day is determined to be 6.
[0083] Among them, since the data set itself is discontinuous, measuring the processing speed of the component in the above way will result in missing data in some time dimensions. Therefore, in terms of the data completion mechanism, this solution uses the middle time point of the missing time period to cut the front and back segments. For the front segment, the median component processing delay of the time period before the missing time period is used to complete the data. For the latter segment, the median component processing delay of the time period after the missing time period is used to complete the data.
[0084] Among them, the data completion method can also be linear interpolation, proportional distribution, weighted average and regression model fitting, etc. Specifically, linear interpolation infers the value in the missing time period through the known linear relationship between adjacent data points. For example, within a period of time, an indicator increases from 10 to 20, and then increases to 25. If the value of the middle time point from 10 to 20 is missing, the value of the missing time point can be inferred to be 15 based on the linear relationship.
[0085] Among them, for a interval or time period to be completed, the data points in the known interval or time period are allocated to each data point in the interval to be completed according to a certain ratio. For example, 8 hours of data are collected in one day, of which 2 hours are complete and continuous, and the other 6 hours are missing. The data points in these 2 hours can be allocated to the remaining 6 hours according to the ratio, and the missing parts can be completed in this way.
[0086] Among them, weighted average calculates missing data points based on the possible correlation or weight information between existing data points. For example, in stock trading, if the opening price, highest price, lowest price and closing price of a stock on the previous day are all known, the weighted average method can be used to estimate the opening price of the day. Assuming that the opening price accounts for 0.4 weight, the highest price accounts for 0.3 weight, the lowest price accounts for 0.2 weight, and the closing price accounts for 0.1 weight, the opening price of the day can be calculated.
[0087] Among them, regression model fitting uses existing data to build a regression model, and uses the model to predict and fill in missing values. For example, in the sales field, a regression model can be built based on historical sales records to predict future sales, and the model can be used to fill in the sales during the missing period.
[0088] It can be seen that in this solution, by aggregating the orders according to their input time and using the median of the order processing speed set after the time dimension segmentation as the component processing speed, the impact of extreme values or abnormal situations on the results can be effectively eliminated, providing a more reliable and stable indicator. At the same time, using the data completion method to fill in the missing data can ensure that the data set has a high degree of integrity, help avoid the deviation of the evaluation results caused by missing data, and provide a more accurate evaluation of the component processing speed.
[0089] S204: Determine a data analysis result according to the order success rate, the data processing time, and a change cycle of the order book.
[0090] The data analysis result is the dependency relationship between transaction execution status in different periods and data processing time.
[0091] Among them, data processing time is equivalent to the delay of transaction execution. According to the order book, it is distinguished according to different targets and different buying and selling directions. The cycle of order book changes is counted to measure the change of market liquidity. If the order book change cycle is shortened, we believe that market liquidity is enhanced; conversely, if the order book change cycle is increased, we believe that market liquidity is weakened.
[0092] Among them, when the data processing time and order success rate that affect the data analysis results do not change, the market liquidity in the data analysis results can be determined according to the order book change cycle. When the order book change cycle becomes shorter, the market liquidity becomes stronger. When the order book change cycle becomes longer, the market liquidity weakens. When the order book change cycle remains unchanged, the market liquidity is relatively stable. When the order book change cycle that affects the data analysis results remains unchanged, only the impact of the data processing time on transaction execution is considered. When the data processing time decreases, the transaction speed becomes faster and the order success rate increases. When the data processing time increases, the transaction speed slows down and the order success rate decreases.
[0093] Specifically, please refer to Table 2 below, which specifically presents the data analysis results under different data processing times, order book change cycles, and order success rates:
[0094] Table 2
[0095]
[0096] The data processing time in the table can also be the average processing time of the order, order execution speed, transaction speed and other parameters. The order book is an important indicator reflecting the market's willingness to buy and sell and the supply and demand situation. It describes the number and depth of buy and sell orders at different price levels. By observing the changes in the order book over a period of time, we can indirectly infer possible changes in market liquidity.
[0097] For example, if the order book changes frequently and experiences large increases or decreases in a short period of time, it means that there is high trading activity and rapid capital flow in the market, which may indicate high market liquidity.
[0098] In addition, by analyzing the number and size of buy and sell orders at the same price level in the order book, it is possible to estimate how much money the market can absorb or consume at a specific price range. If the value is large and easy to be satisfied, it means that the market liquidity is good; on the contrary, if the value is small or requires a large number of transactions to be satisfied, it may indicate poor market liquidity.
[0099] It can be seen that in this example, by obtaining the time required for order processing and the order success rate, and then taking the time required for order processing and the order success rate into account on the basis of the order book change cycle, a comprehensive analysis of the trading market is performed to obtain the results, which is conducive to improving the accuracy of the trading market analysis.
[0100] In a possible implementation, the method further includes:
[0101] After determining the data analysis result according to the order success rate, the data processing time and the change cycle of the order book, a first prompt message is sent, wherein the first prompt message is used to inform the user of the constraint relationship between the current transaction and the processing time required for the transaction.
[0102] Among them, see Figure 5 , Figure 5 is a schematic diagram of a first prompt information provided in an embodiment of the present application, such as Figure 5 As shown, after obtaining the data analysis results, the server can send a first prompt message to the client, wherein the first prompt message can prompt the transaction execution time delay, market fluctuations and real-time market analysis results, etc.
[0103] For example, data analysis is performed between 9:00 and 10:00 a.m. on a certain day, and the following conclusions are drawn:
[0104] The order success rate is 80%, that is, 80% of the submitted orders can eventually be successfully executed; the average data processing time is 5 seconds, and it takes an average of 5 seconds in the system to complete a submitted order; the order book changes over time and presents a complete cycle of 10 minutes, that is, the market demand and supply will change significantly every 10 minutes or so.
[0105] Based on the above data analysis results, the system will send the first prompt message to the user's mobile phone between 9 and 10 in the morning. The first prompt message is the following text: "Dear user, the current market activity is very high, and transactions may be delayed. Please wait patiently or consider choosing non-peak hours for operations."
[0106] It can be seen that in this example, by sending the first prompt information, the user can timely understand the constraint relationship between the current transaction time and the processing time required for the transaction, which is conducive to the user to better plan and arrange their own transaction operations, and make corresponding decisions in advance, thereby improving the user experience.
[0107] In one possible implementation, this solution adopts a broadcast computing architecture, which uses time-series broadcasting to launch a distributed computing process. First, the administrator counts the time of all orders in a day in seconds, and then starts to broadcast the time of each second. At the same time, the administrator counts the stock codes that have been ordered in that second, and broadcasts the stock codes in order from large to small according to the number of orders. While the broadcast is in progress, multiple executor instances in the system will queue up to grab the handle. After the executor grabs the handle, it will filter out the orders of the time to which the stock code in the handle belongs, and calculate the corresponding delay and other results component by component. When all stock codes in one second are captured (including the case where they are captured but not calculated), the next second will be broadcast until all the time is broadcast.
[0108] Among them, based on the broadcast computing architecture, this solution arranges the computing tasks of each stage through pipeline computing. The calculation results of each stage are used as the calculation parameters of the next stage for calculation, and the downstream execution is automatically triggered after the upstream task of the pipeline is completed until all entrusted computing tasks of the day are completed.
[0109] It can be seen that in this example, by using the broadcast computing architecture and pipeline computing, the computing tasks at each stage can be executed in parallel, reducing the time overhead of serial processing. This can effectively improve the overall computing speed and system responsiveness.
[0110] See also Figure 6 , Figure 6 is a schematic diagram of the structure of a data analysis device provided in an embodiment of the present application, such as Figure 6 As shown, the data analysis device 600 includes:
[0111] Acquisition module 601, used to acquire data processing time of multiple components in a transaction process;
[0112] A construction module 602 is used to construct an order book divided by day according to historical transaction records;
[0113] Determination module 603 is used to determine the order success rate according to the arrival time of the first order in the order book and the data processing time of the multiple components; and to determine the data analysis result according to the order success rate, the data processing time and the change cycle of the order book, and the data analysis result is the dependency relationship between the transaction execution status and the data processing time in different periods.
[0114] In a possible implementation, the multiple components include a first type of components and a second type of components, the first type of components include a market gateway component, a counter component, a quotation component and an exchange matching front-end component, the second type of components include a market forwarding component and an exchange market front-end component, and in terms of obtaining the data processing time of multiple components during the transaction, the acquisition module 601 is specifically used to: determine the data processing time of the first type of components according to the difference between the order output time and the order input time of the first type of components under the same order; determine the target subcomponent among the multiple subcomponents of the second type of components; determine the data processing time of the second type of components according to the difference between the order output time and the order input time of the target subcomponent under the same order.
[0115] In one possible implementation, the second category component includes multiple sub-components. In determining the target sub-component among the multiple sub-components of the second category component, the determination module 603 is specifically used to: obtain the order output time of the multiple sub-components in the second category component under the same order; and determine the sub-component with the earliest order output time among the multiple sub-components as the target sub-component.
[0116] In a possible implementation, in terms of determining the order success rate based on the arrival time of the first order in the order book and the data processing time of the multiple components, the determination module 603 is specifically used to: obtain the arrival time of the first order in the order book, the first order being any order in the order book; determine the order processing time based on the data processing time of the multiple components; obtain the sum of the arrival time of the first order and the order processing time, the sum being the end time of the first order; obtain a first price corresponding to the arrival time of the first order in the order book and a second price corresponding to the end time of the first order; determine whether the first order is successfully traded based on the transaction type of the first order, the first price and the second price; repeat the above steps until it is determined whether all orders in the order book are successfully traded; determine the order success rate based on the number of successfully traded orders in the order book and the total number of transactions in the order book.
[0117] In one possible implementation, in terms of determining the order processing time based on the data processing time of the multiple components, the determination module 603 is specifically used to: obtain a first data processing time set for each component of the multiple components to process a first order set; sort the first data processing time set of each component in chronological order to obtain a second data processing time set; obtain the sum of the medians of the second data processing time sets of the multiple components, and the sum is the order processing time.
[0118] In a possible implementation, the transaction type of the first order includes a buy order and a sell order. In determining whether the first order is successfully traded according to the transaction type of the first order, the first price and the second price, the determination module 603 is specifically used to: when it is detected that the first order is a buy order and the second price is not less than the first price, determine that the first order is successfully traded; when it is detected that the first order is a buy order and the second price is greater than the first price, determine that the first order fails to trade; when it is detected that the first order is a sell order and the second price is not greater than the first price, determine that the first order is successfully traded; when it is detected that the first order is a sell order and the second price is greater than the first price, determine that the first order fails to trade.
[0119] In a possible implementation, the determination module 603 is further used to: after determining the data analysis result based on the order success rate, the data processing time, and the change cycle of the order book, send a first prompt message, wherein the first prompt message is used to inform the user of the constraint relationship between the current transaction and the processing time required for the transaction.
[0120] It is worth noting that the specific functional implementation of the data analysis device 600 is shown in the above Figure 2 The description of the data analysis method shown in the figure, for example, the acquisition module 601 is used to implement the relevant content of executing S201, the construction module 602 is used to implement the relevant content of executing S202, and the determination module 603 is used to implement the relevant content of executing S203-S204. The various units or modules in the data analysis device 600 can be respectively or completely combined into one or several other units or modules to constitute, or one (some) of the units or modules can be further divided into multiple functionally smaller units or modules to constitute, which can achieve the same operation without affecting the realization of the technical effects of the embodiments of the present invention. The above-mentioned units or modules are divided according to logical functions. In actual applications, the function of one unit (or module) is implemented by multiple units (or modules), or the functions of multiple units (or modules) are implemented by one unit (or module).
[0121] According to the description of the above method embodiment and related device embodiment, please refer to Figure 7 , an embodiment of the present invention also provides a structural schematic diagram of a data analysis device 700. Figure 7 The data analysis device 700 shown includes a processor 701 , a memory 702 , a communication interface 703 and a bus 704 . The processor 701 , the memory 702 , and the communication interface 703 are connected to each other through the bus 704 .
[0122] Optionally, the memory 702 is a ROM, a static storage device, a dynamic storage device or a RAM.
[0123] The memory 702 can store executable program codes. When the executable program codes stored in the memory 702 are executed by the processor 701, the processor 701 and the communication interface 703 are used to execute Figure 2 The various steps of the data analysis method of the illustrated embodiment.
[0124] The processor 701 uses a general-purpose CPU, a microprocessor, an application-specific integrated circuit ASIC, a GPU or one or more integrated circuits to execute relevant programs to perform the data analysis method of the method embodiment of the present application.
[0125] The processor 701 can also be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the data analysis method of the present application can be completed by the hardware integrated logic circuit or software instructions in the processor 701. Optionally, the processor 701 is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, discrete hardware component. The processor can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor is a microprocessor or the processor is any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or a combination of hardware and software modules in the decoding processor to execute. The optional software module is located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register or other mature storage medium in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702, and combines its hardware to complete the functions required to be executed by the modules included in the data analysis device 600 of the embodiment of the present application, or executes the data analysis method of the method embodiment of the present application.
[0126] The communication interface 703 uses a transceiver or other related device such as, but not limited to, a transceiver.
[0127] The bus 704 may include a path for transmitting information between various components of the data analysis device 700 (eg, the memory 702 , the processor 701 , and the communication interface 703 ).
[0128] It should be noted that although Figure 7The data analysis device 700 shown only shows a memory, a processor, and a communication interface, but in the specific implementation process, those skilled in the art should understand that the data analysis device 700 also includes other devices necessary for normal operation. At the same time, according to specific needs, those skilled in the art should understand that the data analysis device 700 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the data analysis device 700 may also include only the devices necessary to implement the embodiments of the present application, and does not necessarily include Figure 7 All devices shown in .
[0129] An embodiment of the present application provides a computer-readable storage medium, in which a computer program for electronic data exchange is stored. The computer program includes execution instructions, and the execution instructions are used to execute part or all of the steps of any one of the data analysis methods recorded in the above-mentioned data analysis method embodiments. The above-mentioned computer includes an electronic terminal device.
[0130] An embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and the computer program can be operated to enable a computer to perform part or all of the steps of any data analysis method recorded in the above method embodiments. The computer program product can be a software installation package.
[0131] It should be noted that, for the sake of simplicity, the embodiments of any of the aforementioned data analysis methods are all described as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the present application.
[0132] The above is a detailed introduction to the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of a data analysis method, device, equipment and storage medium of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the idea of a data analysis method, device, equipment and storage medium of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
[0133] The present application is described with reference to the flowcharts and / or block diagrams of the methods, hardware products, and computer program products of the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data analysis device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data analysis device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0134] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data analysis device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0135] Although the present application is described herein in conjunction with various embodiments, in the process of implementing the claimed application, those skilled in the art may understand and implement other variations of the disclosed embodiments by viewing the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "one" does not exclude multiple situations. Certain measures are recorded in different dependent claims, but this does not mean that these measures cannot be combined to produce good results.
[0136] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the method embodiments of any of the above-mentioned data analysis methods can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a disk or an optical disk, etc.
[0137] It can be understood that any product that is controlled or configured to execute the processing method of the flowchart described in an embodiment of a data analysis method of the present application, such as the device and computer program product of the above flowchart, falls within the scope of the related products described in the present application.
[0138] Obviously, those skilled in the art can make various changes and modifications to the data analysis method, device, equipment and storage medium provided by the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data analysis method, characterized in that: Applied to a server of a data analysis system, the method comprises: Get the data processing time of multiple components in the transaction process; Build a daily order book based on historical trading records; Acquire the arrival time of the first order in the order book, where the first order is any order in the order book, and the transaction type of the first order includes a buy order and a sell order; determining an order processing time based on the data processing time of the plurality of components; Obtaining a sum of the arrival time of the first order and the order processing time, where the sum is the end time of the first order; Obtaining a first price corresponding to the arrival time of the first order and a second price corresponding to the end time of the first order in the order book; When it is detected that the first order is a buy order and the second price is not less than the first price, it is determined that the first order transaction is successful; when it is detected that the first order is a buy order and the second price is greater than the first price, it is determined that the first order transaction fails; when it is detected that the first order is a sell order and the second price is not greater than the first price, it is determined that the first order transaction is successful; when it is detected that the first order is a sell order and the second price is greater than the first price, it is determined that the first order transaction fails; Repeat the above steps until it is determined whether all orders in the order book are successfully traded; Determine the order success rate according to the number of orders successfully traded in the order book and the total transaction volume in the order book; The data analysis result is determined according to the order success rate, the data processing time and the change cycle of the order book, and the data analysis result is the dependency relationship between the transaction execution status and the data processing time in different periods.
2. The method according to claim 1, characterized in that The multiple components include first-type components and second-type components. The first-type components include market gateway components, counter components, quotation components, and exchange matching front-end components. The second-type components include market forwarding components and exchange market front-end components. The data processing time of multiple components in the acquisition transaction process includes: Determine the data processing time of the first-category component according to the difference between the order output time and the order input time of the first-category component under the same order; determining a target subcomponent among the plurality of subcomponents of the second type of components; The data processing time of the second-type component is determined according to the difference between the order output time and the order input time of the target subcomponent under the same order.
3. The method according to claim 2, characterized in that The second type of component includes a plurality of sub-components, and determining a target sub-component among the plurality of sub-components of the second type of component includes: Obtaining order output times of multiple subcomponents in the second-category component under the same order; The subcomponent with the earliest order output time among the multiple subcomponents is determined as the target subcomponent.
4. The method according to claim 1, characterized in that Determining the order processing time according to the data processing time of the multiple components includes: Obtain a first data processing time set for each component in the plurality of components to process a first order set; Sorting the first data processing time set of each component in chronological order to obtain a second data processing time set; A sum of medians of a second data processing time set of the plurality of components is obtained, where the sum is the order processing time.
5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: After determining the data analysis result according to the order success rate, the data processing time and the change cycle of the order book, a first prompt message is sent, wherein the first prompt message is used to inform the user of the constraint relationship between the current transaction and the processing time required for the transaction.
6. A data analysis device, characterized in that: The device comprises: The acquisition module is used to obtain the data processing time of multiple components in the transaction process; Construction module for building daily segmented order books based on historical trading records; a determination module, for obtaining the arrival time of the first order in the order book, the first order being any order in the order book, the transaction type of the first order including a buy order and a sell order; and for determining the order processing time according to the data processing time of the multiple components; and for obtaining the sum of the arrival time of the first order and the order processing time, the sum being the end time of the first order; and for obtaining the first price corresponding to the arrival time of the first order in the order book and the second price corresponding to the end time of the first order; and for determining that the first order transaction is successful when it is detected that the first order is a buy order and the second price is not less than the first price; and for determining that the first order transaction is successful when it is detected that the first order is a buy order and the second price is greater than the first price. When the first price is less than the first price, it is determined that the first order transaction has failed; when it is detected that the first order is a sell order and the second price is not greater than the first price, it is determined that the first order transaction has been successful; when it is detected that the first order is a sell order and the second price is greater than the first price, it is determined that the first order transaction has failed; and it is used to repeat the above steps until it is determined whether all orders in the order book are successfully traded; and it is used to determine the order success rate according to the number of orders that are successfully traded in the order book and the total amount of transactions in the order book; and it is used to determine the data analysis result according to the order success rate, the data processing time and the change cycle of the order book, and the data analysis result is the dependency relationship between the transaction execution status and the data processing time in different periods.
7. A data analysis device, characterized in that: The device comprises: A memory, a processor, and an executable program code stored in the memory and executable on the processor, wherein the processor executes the steps of the data analysis method according to any one of claims 1 to 5 when executing the executable program code.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores executable program code, wherein the executable program code includes execution instructions, and the execution instructions are used to execute the steps of the data analysis method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Transaction based on transaction rate
CN114677219A
City market quotation analysis method and device
CN116188051A