Quantitative trading strategy testing method and device

By obtaining real market data and using statistical verification models, the existing quantitative trading strategy testing methods are solved, and more efficient and accurate strategy testing is achieved, ensuring the reliability of the strategy.

CN114387110BActive Publication Date: 2025-06-13INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210064370.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-20
Publication Date
2025-06-13
Estimated Expiration
2042-01-20

AI Technical Summary

Technical Problem

The existing quantitative trading strategy testing methods are inefficient and have poor accuracy, and cannot effectively measure the accuracy of the overall logic of the strategy, resulting in high labor costs and long testing time.

Method used

A quantitative trading strategy testing method is proposed, which can obtain real market data, generate a strategy operation report, and use a deviation measurement algorithm or a chi-square distribution algorithm to verify the information of each indicator to ensure the accuracy of the overall operation of the strategy.

Benefits of technology

It improves the accuracy and efficiency of quantitative trading strategy testing, saves labor costs and testing time, and ensures the reliability of the strategy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114387110B_ABST
    Figure CN114387110B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for testing quantitative trading strategies, which can be used in the financial field or other fields. The method includes: obtaining real market quotation data; obtaining a strategy operation report according to the real market quotation data and the quantitative trading strategy to be tested, where the strategy operation report includes: a plurality of index information; determining a regression strategy verification model corresponding to the index information according to the index type of each index information; testing the index information according to the regression strategy verification model corresponding to each index information respectively. If all the index information passes the test, it is determined that the quantitative trading strategy to be tested is normal. The regression strategy verification model includes: a deviation measurement algorithm or a chi-square distribution algorithm. The present application can improve the accuracy and efficiency of quantitative trading strategy testing, and thus ensure the reliability of quantitative trading strategies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and in particular, to a method and device for testing quantitative trading strategies. Background Art

[0002] Quantitative trading refers to replacing human subjective judgment with advanced mathematical models, and using computer technology to select multiple "high-probability" events that can bring excess returns from a large amount of historical data to formulate strategies, which greatly reduces the impact of investors' emotional fluctuations and avoids making irrational investment decisions in extremely enthusiastic or pessimistic market conditions.

[0003] In the field of quantitative trading, each trading strategy will be iteratively updated with multiple versions. To ensure the accuracy of the strategy logic, a large amount of effort from testers is required for precise testing during each version update. However, automated testing mostly focuses on logical testing at the unit test level and cannot ensure whether the overall operation of the strategy is normal; the existing testing mode focuses on logical testing of the unit test type, and for existing quantitative strategies, a large amount of human cost is required, and the accuracy of the overall logic of the strategy cannot be measured. Summary of the Invention

[0004] In view of the problems of low testing efficiency and poor accuracy of existing quantitative trading strategy testing, this application proposes a method and device for testing quantitative trading strategies.

[0005] To solve the above technical problems, this application provides the following technical solutions:

[0006] In a first aspect, this application provides a method for testing a quantitative trading strategy, including:

[0007] Obtain real market condition data;

[0008] According to the real market condition data and the quantitative trading strategy to be tested, obtain a strategy operation report, where the strategy operation report includes: multiple index information;

[0009] According to the index type of each index information, determine the regression strategy verification model corresponding to the index information;

[0010] According to the regression strategy verification model corresponding to each index information, test the index information. If all index information passes the test, it is determined that the quantitative trading strategy to be tested is normal. The regression strategy verification model includes: a deviation degree measurement algorithm or a chi-square distribution algorithm.

[0011] Further, the determining the regression strategy verification model corresponding to the index information according to the index type of each index information includes:

[0012] If the index type of the index information is a general index type, the regression strategy verification model for determining the index information includes: a deviation measurement algorithm;

[0013] If the index type of the index information is an individual index type, the regression strategy verification model for determining the index information includes: a chi-square distribution algorithm.

[0014] Furthermore, the testing of the index information according to the regression strategy verification model corresponding to each index information includes:

[0015] Applying the deviation measurement algorithm to test the index information with a general index type;

[0016] Applying the chi-square distribution algorithm to test the index information with an individual index type.

[0017] Furthermore, the application of the deviation measurement algorithm to test the index information with a general index type includes:

[0018] Obtaining the production objective value corresponding to the index information with a general index type;

[0019] Applying the index information, the production objective value, and the deviation formula to determine the deviation of the index information;

[0020] Testing whether the deviation of the index information is less than or equal to the deviation threshold corresponding to the index information. If so, it is determined that the index information passes the test.

[0021] Furthermore, the application of the chi-square distribution algorithm to test the index information with an individual index type includes:

[0022] Obtaining the historical index information corresponding to the index information with an individual index type;

[0023] Applying the historical index information and the chi-square distribution algorithm to obtain the chi-square statistic corresponding to the index information;

[0024] Testing whether the chi-square statistic corresponding to the index information is less than or equal to the chi-square statistic threshold corresponding to the index information. If so, it is determined that the index information passes the test.

[0025] Furthermore, after the testing of the index information according to the regression strategy verification model corresponding to each index information, it further includes:

[0026] If there is index information that fails the test, it is determined that the quantifiable trading strategy to be tested is abnormal.

[0027] In a second aspect, the present application provides a quantitative trading strategy testing device, including:

[0028] An acquisition module, configured to acquire real market condition data;

[0029] A report generation module, configured to obtain a strategy operation report according to the real market condition data and the quantitative trading strategy to be tested, where the strategy operation report includes: a plurality of index information;

[0030] A determination module, configured to determine a regression strategy verification model corresponding to the index information according to the index type of each index information;

[0031] A testing module, configured to test each index information according to the regression strategy verification model corresponding to each index information. If all index information passes the test, it is determined that the quantitative trading strategy to be tested is normal. The regression strategy verification model includes: a deviation measure algorithm or a chi-square distribution algorithm.

[0032] Further, the determination module includes:

[0033] A first determination unit, configured to determine that the regression strategy verification model corresponding to the index information includes a deviation measure algorithm if the index type of the index information is a global index type;

[0034] A second determination unit, configured to determine that the regression strategy verification model corresponding to the index information includes a chi-square distribution algorithm if the index type of the index information is an individual index type.

[0035] In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the quantitative trading strategy testing method described above is implemented.

[0036] In a fourth aspect, the present application provides a computer-readable storage medium, on which computer instructions are stored. When the instructions are executed, the quantitative trading strategy testing method described above is implemented.

[0037] As can be seen from the above technical solutions, the present application provides a method and device for testing quantitative trading strategies. Among them, the method includes: obtaining real market quotation data; obtaining a strategy operation report according to the real market quotation data and the quantitative trading strategy to be tested, and the strategy operation report includes: a plurality of index information; determining a regression strategy verification model corresponding to the index information according to the index type of each index information; testing the index information according to the regression strategy verification model corresponding to each index information respectively. If all the index information passes the test, it is determined that the quantitative trading strategy to be tested is normal. The regression strategy verification model includes: a deviation measurement algorithm or a chi-square distribution algorithm, which can improve the accuracy and efficiency of quantitative trading strategy testing, and further ensure the reliability of quantitative trading strategies; specifically, the regression strategy verification model based on statistical thinking is used for the overall verification after the quantitative trading strategy is revised, which can ensure that there will be no excessive deviation in the overall operation of the strategy; according to the formed strategy operation report, targeted traditional tests can be continued; only relying on real market quotation data, the drive is relatively simple, which can save labor costs and a large amount of testing time. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0039] Figure 1 is a schematic flowchart of the method for testing a quantitative trading strategy in an embodiment of the present application;

[0040] Figure 2 is a schematic flowchart of steps 301 and 302 of the method for testing a quantitative trading strategy in an embodiment of the present application;

[0041] Figure 3 is a schematic flowchart of steps 411 to 413 of the method for testing a quantitative trading strategy in an embodiment of the present application;

[0042] Figure 4 is a schematic flowchart of steps 421 to 423 of the method for testing a quantitative trading strategy in an embodiment of the present application;

[0043] Figure 5 is a schematic structural diagram of the device for testing a quantitative trading strategy in an embodiment of the present application;

[0044] Figure 6 is a schematic block diagram of the system composition of the electronic device in an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0045] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

[0046] To solve the problems existing in the above-mentioned prior art, this application proposes a method and device for testing quantitative trading strategies. Considering a regression strategy verification model based on statistical thinking, for event-driven quantitative trading strategies, historical market conditions are simulated and played back, and a report on the overall operation of the strategy is issued, including indicators such as the number of single strategy placement and cancellation operations, response time (chi-square test), order placement volume, and price. By comparing with the actual operation results, when the deviation meets a certain confidence level, it indicates that there is sufficient confidence to consider the overall operation of the strategy normal; otherwise, the reasons for the strategy problems can be specifically analyzed, which can save a large amount of testing time. This application can achieve overall testing based on the strategy logic. By introducing statistical methods, the overall accuracy of the strategy logic can be grasped from a probabilistic perspective.

[0047] Based on this, to improve the accuracy and efficiency of quantitative trading strategy testing and thus ensure the reliability of quantitative trading strategies, the embodiments of this application provide a device for testing quantitative trading strategies. This device can be a server or a client device. The client device can include a smart phone, a tablet electronic device, a network set-top box, a portable computer, a desktop computer, a personal digital assistant (PDA), a vehicle-mounted device, and a smart wearable device, etc. Among them, the smart wearable device can include smart glasses, smart watches, and smart bracelets, etc.

[0048] In practical applications, the part for testing quantitative trading strategies can be executed on the server side as described above, or all operations can be completed in the client device. Specifically, it can be selected according to the processing capacity of the client device and the limitations of the user's usage scenario, etc. This application does not make any limitations in this regard. If all operations are completed in the client device, the client device may further include a processor.

[0049] The above-mentioned client device may have a communication module (i.e., communication unit), which can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side, and in other implementation scenarios, it may also include a server of an intermediate platform, such as a server of a third-party server platform having a communication link with the task scheduling center server. The server may include a single computer device, or a server cluster composed of multiple servers, or a server structure of a distributed device.

[0050] Any suitable network protocol may be used for communication between the server and the client device, including network protocols not yet developed as of the filing date of this application. The network protocol may, for example, include TCP / IP protocol, UDP / IP protocol, HTTP protocol, HTTPS protocol, etc. Of course, the network protocol may also include, for example, RPC protocol (Remote Procedure Call Protocol) and REST protocol (Representational State Transfer) used on top of the above protocols.

[0051] It should be noted that the disclosed quantitative trading strategy testing method and device can be used in the financial technology field, and can also be used in any field other than the financial technology field. The application field of the disclosed quantitative trading strategy testing method and device is not limited.

[0052] Specifically, it will be described through the following various embodiments.

[0053] In order to improve the accuracy and efficiency of quantitative trading strategy testing, and thus ensure the reliability of quantitative trading strategies, this embodiment provides a quantitative trading strategy testing method whose execution entity is a quantitative trading strategy testing device. The quantitative trading strategy testing device includes, but is not limited to, a server, as Figure 1 shown, and the method specifically includes the following content:

[0054] Step 100: Obtain real market quotation data.

[0055] Specifically, the real market quotation data may be real market tick-level quotation data; the real market tick-level quotation data can be obtained by a market simulation and emulation tool, that is, the real market tick-level quotation data can be imitated according to the timestamp of the quotation message (i.e., the quotation message is externally published).

[0056] Specifically, according to the quantification strategies of different products, the selection of market quotation data is also different; for example, common quotations include tick-level quotations such as foreign exchange spot, swaps, precious metal futures and options, etc. The market real quotation data (i.e., the externally released quotation message) generally includes: channel, time, currency pair (or contract number), quotation type, and hierarchical volume-based quotation, etc. For example, {"Channel":"CMDS","QuoteTime":"2021-12-06 10:00:00.000","Symbol":"USD / CNY","TradeType":"SPOT","Tenor":"SPOT","QuoteEntries":[{"Type":"ASK","Price":"0.74170","Position":"1","Qty":"0","SpotRate":"0.74170"},{"Type":"BID","Price":"0.74102","Position":"1","Qty":"0","SpotRate":"0.74102"}]}。

[0057] Step 200: Obtain a strategy operation report according to the market real quotation data and the to-be-tested quantitative trading strategy, where the strategy operation report includes: multiple index information.

[0058] Specifically, after starting a strategy instance, the to-be-tested quantitative trading strategy can be driven to run based on the consumer market quotation (i.e., the above-mentioned market real quotation data), and at the same time, the trading response can be simulated through a simulation trading engine; a strategy operation report can be generated according to the running situation of the to-be-tested quantitative trading strategy.

[0059] Among them, the strategy operation report may include: 1) Strategy order index information, including: index information such as the number of order placement, order placement volume, and order placement price in the order placement direction dimension (where the order placement direction refers to buy or sell); 2) Order life cycle index information, including: time points of each state such as order placement initiation, order placement success, execution, order cancellation initiation, and order cancellation success, as well as the response time consumption of order placement and order cancellation, etc., for displaying indexes; 3) Strategy index information, including: indexes such as exposure, profit and loss, and cost, etc.

[0060] Step 300: Determine the regression strategy verification model corresponding to the index information according to the index type of each index information.

[0061] Specifically, the index types of the index information can be divided into: overall index types and individual index types; for example, the number of hanging orders, the hanging order price, and the time-consuming of hanging and canceling orders are overall index types, and the order response time-consuming is an individual index type. The index type to which each index information belongs can be determined in advance according to the actual required test model.

[0062] Step 400: Test the index information according to the regression strategy verification model corresponding to each index information. If all the index information passes the test, it is determined that the to-be-tested quantitative trading strategy is normal. The regression strategy verification model includes: a deviation measure algorithm or a chi-square distribution algorithm.

[0063] Specifically, considering that it is difficult to achieve complete consistency between the simulation operation of the strategy and production, the hypothesis testing idea is used to test the strategy operation information to ensure the accuracy of the strategy from the perspective of probability; for different index information, different regression strategy verification models can be applied, that is, for different index information, different test methods can be adopted.

[0064] To further improve the accuracy of determining the regression strategy verification model, and then apply a reliable regression strategy verification model to improve the accuracy of the quantitative trading strategy test, refer to Figure 2 In an embodiment of the present application, step 300 includes:

[0065] Step 301: If the index type of the index information is an overall index type, it is determined that the regression strategy verification model of the index information includes: a deviation measure algorithm;

[0066] Step 302: If the index type of the index information is an individual index type, it is determined that the regression strategy verification model of the index information includes: a chi-square distribution algorithm.

[0067] To further improve the accuracy of the index information test, in an embodiment of the present application, the testing the index information according to the regression strategy verification model corresponding to each index information in step 400 includes:

[0068] Step 410: Apply the deviation measure algorithm to test the index information with an overall index type;

[0069] Step 420: Apply the chi-square distribution algorithm to test the index information with an individual index type.

[0070] To further improve the accuracy of the index information test of the overall index type, and then improve the accuracy of the final quantitative trading strategy test, refer to Figure 3 In an embodiment of the present application, step 410 includes:

[0071] Step 411: Obtain the production objective value corresponding to the metric information with the overall metric type.

[0072] Specifically, the production objective value objectively exists based on the evaluation of historical data. It has no relation with the policy logic and only relates to the policy framework and the production equipment environment. Therefore, this type of value is relatively stable. Taking the time consumed for order submission and cancellation as an example, the time consumed for order submission and cancellation can be statistically calculated based on all order information after the policy goes live. This value generally stabilizes at dozens of milliseconds. This type of value is a status monitoring information that can be obtained at any time. As the accumulation of the policy go-live time, this type of value will tend to be stable.

[0073] Step 412: Apply the metric information, the production objective value, and the deviation formula to determine the deviation of the metric information.

[0074] Step 413: Test whether the deviation of the metric information is less than or equal to the deviation threshold corresponding to the metric information. If so, determine that the metric information passes the test.

[0075] It can be understood that if the deviation of the metric information is greater than the deviation threshold corresponding to the metric information, it is determined that the metric information fails the test.

[0076] For example, for the order submission count, directly measure the deviation from the production objective value. Assume that OrderCount product is the order submission count in actual production (which can be equivalent to the above-mentioned production objective value), and OrderCount simulate represents the order submission count during simulation operation (which can be equivalent to the above-mentioned metric information). The deviation of the order submission count can be obtained according to the following deviation formula:

[0077]

[0078] When the deviation of the order submission count exceeds the order submission count deviation threshold, such as 10%, it is considered that there is a logical anomaly in the quantitative trading strategy to be tested.

[0079] To further improve the accuracy of testing the metric information of the individual metric type, and thus improve the accuracy of testing the final quantitative trading strategy, refer to Figure 4 , in an embodiment of the present application, step 420 includes:

[0080] Step 421: Obtain the historical metric information corresponding to the metric information with the individual metric type.

[0081] Step 422: Apply the historical metric information and the chi-square distribution algorithm to obtain the chi-square statistic corresponding to the metric information.

[0082] Specifically, a chi-square statistical test can be performed on the backtest statistical value and the corresponding production objective value with the value marked in red. Assuming that there is no significant difference between the backtest statistical value and the production objective value, the chi-square statistic of the corresponding index information is calculated.

[0083] Step 423: Test whether the chi-square statistic corresponding to the index information is less than or equal to the chi-square statistic threshold corresponding to the index information. If so, it is determined that the index information passes the test.

[0084] Specifically, compare the chi-square statistic with the critical value of the chi-square distribution corresponding to this level (i.e., the above-mentioned chi-square statistic threshold). If the chi-square statistic does not exceed the critical value of the chi-square distribution, it is considered that the index is normal; otherwise, it is considered that the index is abnormal.

[0085] For example, for the order response time, according to the analysis of historical index information, it should follow a normal distribution with a mean of μ and a variance of σ. Then, it can be tested whether the order status response time during the simulation operation of the strategy is basically consistent with production. Specifically,

[0086] 1) Propose the null hypothesis: The response time of the simulation operation strategy is consistent with production and both follow N(μ,σ).

[0087] 2) Obtain the simulation operation samples, count the time taken for all orders during the simulation operation period, and estimate the mean and variance.

[0088] 3) Calculate the chi-square statistic. If the chi-square statistic is greater than the specified threshold, it indicates that the deviation of the quantized trading strategy to be tested is too large compared with the previous quantized trading strategy, and there may be problems.

[0089] In order to further improve the accuracy of the test of the quantized trading strategy to be tested, in an embodiment of the present application, after step 400, it further includes:

[0090] Step 500: If there is index information that fails the test, it is determined that the quantized trading strategy to be tested is abnormal.

[0091] From a software perspective, in order to improve the accuracy and efficiency of the test of the quantized trading strategy, and thus ensure the reliability of the quantized trading strategy, the present application provides an embodiment of a quantized trading strategy test device for implementing all or part of the content in the above-mentioned quantized trading strategy test method. Refer to Figure 5 , the quantized trading strategy test device specifically includes the following:

[0092] An acquisition module 10, configured to acquire market real-time quotation data;

[0093] A report generation module 20, configured to obtain a strategy operation report according to the market real-time quotation data and the quantized trading strategy to be tested. The strategy operation report includes: multiple index information;

[0094] A determination module 30, configured to determine a regression strategy verification model corresponding to the metric information according to the metric type of each piece of metric information;

[0095] A testing module 40, configured to test each piece of metric information according to the regression strategy verification model corresponding to each piece of metric information. If all pieces of metric information pass the test, it is determined that the to-be-tested quantitative trading strategy is normal. The regression strategy verification model includes: a deviation measure algorithm or a chi-square distribution algorithm.

[0096] In an embodiment of the present application, the determination module includes:

[0097] A first determination unit, configured to determine that the regression strategy verification model corresponding to the metric information includes a deviation measure algorithm if the metric type of the metric information is an overall metric type;

[0098] A second determination unit, configured to determine that the regression strategy verification model corresponding to the metric information includes a chi-square distribution algorithm if the metric type of the metric information is an individual metric type.

[0099] The embodiment of the quantitative trading strategy testing device provided in this specification can specifically be used to execute the processing flow of the embodiment of the above-mentioned quantitative trading strategy testing method. Its functions will not be elaborated here, and reference can be made to the detailed description of the embodiment of the above-mentioned quantitative trading strategy testing method.

[0100] As can be seen from the above description, the quantitative trading strategy testing method and device provided in the present application can improve the accuracy and efficiency of quantitative trading strategy testing, and further ensure the reliability of the quantitative trading strategy. Specifically, the regression strategy verification model based on statistical thinking is used for the overall verification after the quantitative trading strategy is revised, which can ensure that there will be no excessive deviation in the overall operation of the strategy. According to the formed strategy operation report, targeted traditional testing can be continued. It only relies on the real market quotation data, the driving is relatively simple, and it can save labor costs and a large amount of testing time.

[0101] From the hardware level, Figure 6 is a schematic physical structure diagram of an electronic device provided in an embodiment of the present application, as Figure 6As shown in the figure, the electronic device may include: a processor 401, a communications interface 402, a memory 403, and a communication bus 404. Among them, the processor 401, the communications interface 402, and the memory 403 complete communication with each other through the communication bus 404. The processor 401 may call the logical instructions in the memory 403 to execute the following method: receiving a cloud resource task request; determining, according to the cloud resource task request, a call interface for the cloud resource task, so that a third-party cloud platform corresponding to the call interface executes the cloud resource task corresponding to the cloud resource task request according to the necessary data of the task.

[0102] In addition, when the logical instructions in the above-mentioned memory 403 are implemented in the form of software functional units and sold or used as independent products, they may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes.

[0103] This embodiment discloses a computer program product. The computer program product includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided in the above-mentioned method embodiments. For example, it includes: obtaining real market quotation data; obtaining a strategy operation report according to the real market quotation data and the quantitative trading strategy to be tested. The strategy operation report includes: a plurality of index information; determining a regression strategy verification model corresponding to the index information according to the index type of each index information; testing the index information according to the regression strategy verification model corresponding to each index information. If all the index information passes the test, it is determined that the quantitative trading strategy to be tested is normal. The regression strategy verification model includes: a deviation measurement algorithm or a chi-square distribution algorithm.

[0104] This embodiment provides a computer-readable storage medium that stores a computer program, which causes the computer to execute the methods provided in the above method embodiments. For example, it includes: obtaining real market condition data; obtaining a strategy operation report based on the real market condition data and the quantized trading strategy to be tested, where the strategy operation report includes: a plurality of index information; determining a regression strategy verification model corresponding to the index information according to the index type of each index information; testing the index information according to the regression strategy verification model corresponding to each index information respectively. If all the index information passes the test, it is determined that the quantized trading strategy to be tested is normal. The regression strategy verification model includes: a deviation measurement algorithm or a chi-square distribution algorithm.

[0105] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0106] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0107] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0108] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the steps of the function specified in one process or a plurality of processes and / or blocks Figure 1 one process or a plurality of processes and / or blocks Figure 1 steps of the function specified in one block or a plurality of blocks.

[0109] In the description of this specification, the description with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", "example", "specific example", or "some examples", etc. means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0110] The above specific embodiments have further elaborated the purpose, technical solution, and beneficial effects of the present application. It should be understood that the above are only specific embodiments of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for testing a quantitative trading strategy, characterized in that, it includes: Obtain real market quotation data; According to the real market quotation data and the quantitative trading strategy to be tested, obtain a strategy operation report, and the strategy operation report includes: multiple index information; According to the index type of each index information, determine the regression strategy verification model corresponding to the index information; According to the regression strategy verification model corresponding to each index information, test the index information. If all the index information passes the test, it is determined that the quantitative trading strategy to be tested is normal. The regression strategy verification model includes: a deviation measurement algorithm or a chi-square distribution algorithm; Among them, the step of testing the index information according to the regression strategy verification model corresponding to each index information includes: Obtain the production objective value corresponding to the index information with the index type of the overall index type; Apply the index information, the production objective value and the deviation formula to determine the deviation of the index information; Test whether the deviation of the index information is less than or equal to the deviation threshold corresponding to the index information. If so, it is determined that the index information passes the test; Obtain the historical index information corresponding to the index information with the index type of the individual index type; Apply the historical index information and the chi-square distribution algorithm to obtain the chi-square statistic corresponding to the index information; Test whether the chi-square statistic corresponding to the index information is less than or equal to the chi-square statistic threshold corresponding to the index information. If so, it is determined that the index information passes the test.

2. The method for testing a quantitative trading strategy according to claim 1, characterized in that, The step of determining the regression strategy verification model corresponding to the index information according to the index type of each index information includes: If the index type of the index information is the overall index type, it is determined that the regression strategy verification model of the index information includes: a deviation measurement algorithm; If the index type of the index information is the individual index type, it is determined that the regression strategy verification model of the index information includes: a chi-square distribution algorithm.

3. The method for testing a quantitative trading strategy according to claim 1, characterized in that, After testing the index information according to the regression strategy verification model corresponding to each index information, it further includes: If there is index information that fails the test, it is determined that the quantitative trading strategy to be tested is abnormal.

4. A device for testing a quantitative trading strategy, characterized in that, it includes: An acquisition module for acquiring real market quotation data; A report generation module for obtaining a strategy operation report according to the real market quotation data and the quantitative trading strategy to be tested, where the strategy operation report includes: multiple index information; A determination module for determining the regression strategy verification model corresponding to the index information according to the index type of each index information; A test module for testing the index information according to the regression strategy verification model corresponding to each index information. If all the index information passes the test, it is determined that the quantitative trading strategy to be tested is normal. The regression strategy verification model includes: a deviation measurement algorithm or a chi-square distribution algorithm; Among them, testing the index information according to the regression strategy verification model corresponding to each index information includes: Obtaining the production objective value corresponding to the index information with the index type of the overall index type; Applying the index information, the production objective value and the deviation formula to determine the deviation of the index information; Testing whether the deviation of the index information is less than or equal to the deviation threshold corresponding to the index information. If so, it is determined that the index information passes the test; Obtaining the historical index information corresponding to the index information with the index type of the individual index type; Applying the historical index information and the chi-square distribution algorithm to obtain the chi-square statistic corresponding to the index information; Testing whether the chi-square statistic corresponding to the index information is less than or equal to the chi-square statistic threshold corresponding to the index information. If so, it is determined that the index information passes the test.

5. The quantitative trading strategy testing device according to claim 4, wherein, the determination module includes: A first determination unit, configured to determine that the regression strategy verification model of the index information includes a deviation measurement algorithm if the index type of the index information is the overall index type; A second determination unit, configured to determine that the regression strategy verification model of the index information includes a chi-square distribution algorithm if the index type of the index information is the individual index type.

6. An electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, when the processor executes the program, it implements the quantitative trading strategy testing method according to any one of claims 1 to 3.

7. A computer-readable storage medium, on which computer instructions are stored, wherein, when the instructions are executed, they implement the quantitative trading strategy testing method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • The invention discloses an aAccurate back test and evaluation system and method for a stocksecurities market quantitative investment strategy

    CN109615531A

  • Quantitative transaction strategy problem diagnosis method and device

    CN112862013A