CN117078423A - Quantitative transaction strategy testing method and device - Google Patents

Quantitative transaction strategy testing method and device Download PDF

Info

Publication number
CN117078423A
CN117078423A CN202311114897.6A CN202311114897A CN117078423A CN 117078423 A CN117078423 A CN 117078423A CN 202311114897 A CN202311114897 A CN 202311114897A CN 117078423 A CN117078423 A CN 117078423A
Authority
CN
China
Prior art keywords
data
transaction
quantized
transaction strategy
strategy
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311114897.6A
Other languages
Chinese (zh)
Inventor
李富
周魁
张倩妮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202311114897.6A priority Critical patent/CN117078423A/en
Publication of CN117078423A publication Critical patent/CN117078423A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2411Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/257Belief theory, e.g. Dempster-Shafer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Educational Administration (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • General Engineering & Computer Science (AREA)
  • Marketing (AREA)
  • Finance (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Accounting & Taxation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Business, Economics & Management (AREA)
  • Tourism & Hospitality (AREA)
  • Quality & Reliability (AREA)
  • Operations Research (AREA)
  • Game Theory and Decision Science (AREA)
  • Technology Law (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a quantitative transaction strategy testing method and a quantitative transaction strategy testing device, which relate to the technical field of artificial intelligence, wherein the method comprises the following steps: receiving quantized transaction policy detail data to be tested, wherein the quantized transaction policy detail data comprises real market data, quantized transaction policy operation parameters to be tested and quantized transaction policy transaction data; feature extraction is carried out on quantized transaction strategy detail data to be tested, and a plurality of feature data are obtained; inputting a plurality of characteristic data into a classifier, and outputting a plurality of prediction results, wherein the prediction results comprise test passing probability values and test failing probability values; the classifier is obtained by training the SVM model by utilizing historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data in advance; and carrying out data fusion processing on a plurality of prediction results by adopting a D-S evidence theory to obtain a quantized transaction strategy test result. The application can reduce the testing cost of the quantitative transaction strategy and improve the testing accuracy and stability of the quantitative transaction strategy.

Description

Quantitative transaction strategy testing method and device
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a quantitative transaction strategy testing method and device.
Background
This section is intended to provide a background or context to the embodiments of the application that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
In the financial field, research and practice of quantitative trading strategies has received extensive attention and application. With the rapid development of quantitative transaction, business personnel need to continuously optimize the strategy and repeatedly upgrade the version for ensuring the continuous effectiveness of the quantitative transaction strategy. Before the iteration new version is formally on line, testers need to invest a long time and test the accuracy and stability of the quantized transaction strategy with great effort.
In the process of the iterative version of the quantized transaction strategy, in order to ensure the accuracy of the processing logic of the quantized transaction strategy, the traditional test needs to put more effort to manually prepare test data and verify test results one by one so as to achieve accurate test; the existing automatic test still needs to prepare test data and assertion results one by one aiming at the operation scene of the quantitative transaction strategy, the automatic operation also depends on the stability of an automatic framework and an operation environment, the validity and stability of the iterative version of the quantitative transaction strategy cannot be evaluated from the whole angle, the test is manually supervised one by one, errors are likely to exist, and meanwhile, the problem of high labor cost exists.
Disclosure of Invention
The embodiment of the application provides a quantitative transaction strategy testing method, which is used for improving the accuracy and stability of quantitative transaction strategy testing and reducing the cost of quantitative transaction strategy testing, and comprises the following steps:
receiving quantitative transaction strategy detail data to be tested; the to-be-tested quantitative transaction strategy detail data comprise real market data, to-be-tested quantitative transaction strategy operation parameters and quantitative transaction strategy transaction data, and the to-be-tested quantitative transaction strategy operation parameters comprise parameters for operating a transaction strategy;
feature extraction is carried out on quantized transaction strategy detail data to be tested, and a plurality of feature data are obtained;
inputting a plurality of characteristic data into a classifier, and outputting a plurality of prediction results, wherein the prediction results comprise test passing probability values and test failing probability values; the classifier is obtained by training a support vector machine SVM model by utilizing historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data in advance;
and carrying out data fusion processing on the plurality of prediction results by adopting a D-S evidence theory (Dempster-Shafer evidence theory, D-S evidence theory for short) to obtain a quantized transaction strategy test result, wherein the quantized transaction strategy test result comprises test passing and test failing.
The embodiment of the application also provides a quantitative transaction strategy testing device, which is used for improving the accuracy and stability of quantitative transaction strategy testing and reducing the cost of quantitative transaction strategy testing, and comprises the following components:
the data receiving module is used for receiving the quantized transaction strategy detail data to be tested; the to-be-tested quantitative transaction strategy detail data comprise real market data, to-be-tested quantitative transaction strategy operation parameters and quantitative transaction strategy transaction data, and the to-be-tested quantitative transaction strategy operation parameters comprise parameters for operating a transaction strategy;
the feature extraction module is used for carrying out feature extraction on the quantized transaction strategy detail data to be tested to obtain a plurality of feature data;
the classifier prediction module is used for inputting a plurality of characteristic data into the classifier and outputting a plurality of prediction results, wherein the prediction results comprise test passing probability values and test failing probability values; the classifier is obtained by training the SVM model by utilizing historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data in advance;
and the result output module is used for carrying out data fusion processing on the plurality of prediction results by adopting the D-S evidence theory to obtain a quantized transaction strategy test result, wherein the quantized transaction strategy test result comprises a pass test and a fail test.
The embodiment of the application also provides computer equipment, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the quantitative transaction strategy testing method when executing the computer program.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the quantitative transaction strategy testing method when being executed by a processor.
The embodiment of the application also provides a computer program product, which comprises a computer program, and the computer program realizes the quantitative transaction strategy testing method when being executed by a processor.
In the embodiment of the application, quantitative transaction strategy detail data to be tested is received; the to-be-tested quantitative transaction strategy detail data comprise real market data, to-be-tested quantitative transaction strategy operation parameters and quantitative transaction strategy transaction data, and the to-be-tested quantitative transaction strategy operation parameters comprise parameters for operating a transaction strategy; feature extraction is carried out on quantized transaction strategy detail data to be tested, and a plurality of feature data are obtained; inputting a plurality of characteristic data into a classifier, and outputting a plurality of prediction results, wherein the prediction results comprise test passing probability values and test failing probability values; the classifier is obtained by training the SVM model by utilizing historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data in advance; and carrying out data fusion processing on the plurality of prediction results by adopting a D-S evidence theory to obtain a quantized transaction strategy test result, wherein the quantized transaction strategy test result comprises test passing and test failing. Compared with the technical scheme of manual strip-by-strip test of the quantized transaction strategy test in the prior art, in the embodiment of the application, the quantized transaction strategy test result is firstly predicted preliminarily through the classifier trained in advance, then the classifier is adopted to output a plurality of prediction results by adopting the D-S evidence theory for fusion processing, and the final quantized transaction strategy test result is output. The whole process does not need manual supervision piece by piece, reduces the testing cost of the quantized transaction strategy, utilizes a pre-trained classifier and a D-S evidence theory to conduct double prediction, and greatly improves the testing accuracy and stability of the quantized transaction strategy.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a flow chart of a method for testing a quantized transaction policy according to an embodiment of the application;
FIG. 2 is a diagram of a method for testing a quantized transaction policy according to an embodiment of the application;
FIG. 3 is a diagram of a method for testing a quantized transaction policy according to an embodiment of the application;
FIG. 4 is a schematic diagram of a quantized transaction policy testing device according to an embodiment of the application;
fig. 5 is a schematic diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the embodiments of the present application will be described in further detail with reference to the accompanying drawings. The exemplary embodiments of the present application and their descriptions herein are for the purpose of explaining the present application, but are not to be construed as limiting the application.
First, technical terms involved in the present application will be explained.
Support vector machine: a support vector machine (Support Vector Machine, SVM) is a commonly used machine learning algorithm for classification and regression problems. The SVM algorithm performs classification or regression prediction by searching an optimal hyperplane so as to maximize the interval between different classes, thereby improving the accuracy of classification or regression.
The applicant finds that the existing automatic test still needs to prepare test data and assertion results one by one according to the operation scene of the quantitative transaction strategy, the automatic operation also depends on the stability of an automatic framework and an operation environment, the validity and stability of the iterative version of the quantitative transaction strategy cannot be evaluated from the whole angle, the test is manually supervised one by one, errors are likely to exist, and meanwhile, the problem of high labor cost exists. To this end, applicant proposes a quantitative transaction policy test method.
It should be noted that, in the technical scheme of the application, the acquisition, storage, use, processing and the like of the data all conform to the relevant regulations of national laws and regulations.
Fig. 1 is a flow chart of a method for testing a quantized transaction policy according to an embodiment of the application, as shown in fig. 1, the method includes:
step 101, receiving quantitative transaction strategy detail data to be tested; the to-be-tested quantitative transaction strategy detail data comprise real market data, to-be-tested quantitative transaction strategy operation parameters and quantitative transaction strategy transaction data, and the to-be-tested quantitative transaction strategy operation parameters comprise parameters for operating a transaction strategy;
102, extracting characteristics of quantized transaction strategy detail data to be tested to obtain a plurality of characteristic data;
step 103, inputting a plurality of characteristic data into a classifier, and outputting a plurality of prediction results, wherein the prediction results comprise test passing probability values and test failing probability values; the classifier is obtained by training the SVM model by utilizing historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data in advance;
and 104, carrying out data fusion processing on the plurality of prediction results by adopting a D-S evidence theory to obtain a quantized transaction strategy test result, wherein the quantized transaction strategy test result comprises a pass test and a fail test.
As can be seen from the flow shown in FIG. 1, in the embodiment of the application, the quantitative transaction strategy test result is primarily predicted by a pre-trained classifier, and then a plurality of prediction results output by the classifier are fused by adopting a D-S evidence theory, so that the final quantitative transaction strategy test result is output. The whole process does not need manual supervision piece by piece, reduces the testing cost of the quantized transaction strategy, utilizes a pre-trained classifier and a D-S evidence theory to conduct double prediction, and greatly improves the testing accuracy and stability of the quantized transaction strategy.
The method for testing the quantized transaction policy in the embodiment of the application is explained in detail below.
Firstly, receiving quantized transaction policy detail data to be tested, wherein factors related to a transaction order in a quantized transaction policy are fully considered when the data are received in order to improve the accuracy of testing, the quantized transaction policy detail data to be tested comprise, but are not limited to, real market data, quantized transaction policy operation parameters to be tested and quantized transaction policy operation data, and the quantized transaction policy operation parameters to be tested comprise parameters for operating a transaction policy.
True market data example:
{ "Channel": "CFETS", "QuoteTime": "year-mole-day", "Symbol": "currency
","TradeType":"SPOT","QuoteEntries":[{"Type":"ASK","Price":"7.0123","Position":"1","Qty":"10000000"},{"Type":"BID","Price":"7.0121","Position":"1","Qty":"10000000"}]}。
Examples of quantized transaction policy operating parameters to be tested:
{"StrategyParam":{"ccpair":"USD/CNY","StrategyCode":"XXXCode","Symbol":"USD/CNY","exposure":"100","BranchId":"xxxxxxx","TraderID":"xxxxxxx","buy_val":"10000000","ask_val":"100000000","bidPts1":"5","askPts1":"4"}}。
quantized transaction strategy transaction data examples:
{"InstanceID":"1245-23xdw-ddesdxxxxx","StrategyCode":"XXXCode","Symbol":"USD/CNY","TradeType":"SPOT","BranchId":"xxxxxxx","TraderID":"xxxxxxx","Channel":"CFETS","TradeMethod":"ODM","Side":"B","OrderPrice":"7.0123","OrderQty":"10000000"}。
in one embodiment, before the feature extraction of the quantized transaction policy detail data to be tested, the method may further include:
data preprocessing of any one or any combination of the following is carried out on quantitative transaction strategy detail data to be tested:
data cleaning, data conversion and data normalization.
Through preprocessing, the data quality and the data availability of the quantized transaction strategy detail data to be tested can be improved, and subsequent test processing is facilitated.
And then, carrying out feature extraction on the quantized transaction strategy detail data to be tested to obtain a plurality of feature data. Suitable features are important for extending the training SVM model. In selecting a feature, the relevance of the feature to the transaction and the importance of the feature to the transaction need to be considered.
For example, for real market data, not all values in the market field are used, only the features of Price-Price, qty-quantity, qtotetime-transmission time, etc. are extracted; for the quantized transaction strategy operation parameters to be tested, taking the relevance of the strategy parameters and each transaction into consideration, selecting the characteristics of bidPts 1-buying point difference, askPts 1-selling point difference, openness, damage and benefit and the like; for the quantized transaction policy transaction data, selecting the characteristics of Side-transaction direction, orderQty-order transaction amount, orderprice-order transaction price, transaction time and the like.
In one embodiment, feature extraction is performed on quantized transaction policy detail data to be tested to obtain a plurality of feature data, which may include:
and extracting features of the quantized transaction strategy detail data to be tested by adopting a mutual information method or a variance selection method to obtain a plurality of feature data.
In the embodiment, the mutual information method or the variance selection method is adopted for feature extraction, so that the accuracy of feature extraction can be improved, and the subsequent classifier prediction is facilitated.
After the processing of the steps, a pre-trained classifier can be utilized to perform preliminary prediction on a plurality of characteristic data.
In the embodiment of the application, a support vector machine SVM algorithm is adopted to carry out quantitative transaction strategy test, and the support vector machine SVM model is trained to obtain a classifier by utilizing historical market data, historical quantitative transaction strategy operation parameters and historical quantitative transaction strategy transaction data in advance.
In one embodiment, the classifier may be trained in advance as follows:
taking historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data as sample data to construct a training set, a testing set and a verification set;
training the SVM model by using a training set to obtain a classifier;
and testing and verifying the classifier by using the testing set and the verification set respectively.
Fig. 2 is a diagram of a method for testing a quantized transaction policy according to an embodiment of the application, and as shown in fig. 2, a classifier training process is shown. The method comprises the steps of obtaining historical transaction data, including but not limited to historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data, preprocessing the obtained historical transaction data by data cleaning, data conversion, data normalization and the like, extracting characteristic data, then establishing a training set, a testing set and a verification set, and obtaining the trained SVM classifier which can be directly used for prediction after training, testing and verification of an SVM model.
The training principle of the SVM model can be expressed as: the feature data for training is input into the SVM model, which maps the feature data for training into a higher dimensional space according to a specific function that is nonlinear, and adjusts the dimension in this high dimensional space according to the feature data for training, where the dimension may tend to infinity. In the mapped high-dimensional space, the SVM model can construct an optimal classification rule, under the optimal classification rule, the classification accuracy of the feature data for training is highest, and the difference between different types of sample data is the largest. For the SVM model, the process of searching the classification optimal rule of the feature data for training is the training completion process of the classifier. The characteristic data are input into the SVM model, the SVM model adjusts parameters of kernel functions in the SVM model, and penalty factor parameters are calculated and adjusted to complete a training process of the classification model, and the training process is simple and easy to implement.
In one embodiment, training the SVM model with the training set may comprise:
setting the adjustment range and the adjustment step length of a plurality of support vector machine model parameters, traversing the value of each support vector machine model parameter, and obtaining a plurality of groups of support vector machine model parameters; the support vector machine model parameters comprise penalty coefficients, kernel functions and gamma parameters;
calculating the accuracy value corresponding to each group of support vector machine model parameters by using the training set; the accuracy value is the ratio of the number of samples with accurate prediction results to the number of all samples;
and determining the model parameters of the support vector machine according to the accuracy rate value.
For example, the kernel function is kernel, the penalty is C, and the gamma parameter is gamma.
In the case of kernel= 'linear', the larger C is the linear kernel, the better the classification effect is, but the fitting (defaul c=1) may be possibly exceeded.
When kernel= 'rbf' (default), the smaller the gamma value, the more continuous the classification interface is; the larger the gamma value, the more "scattered" the classification interface, and the better the classification, but the better the fit may be.
In the actual training process, the process of C, kernel, gamma parameter combination is continuously adjusted, the accuracy value of the classifier on the training set test set is observed, and the most suitable parameter combination is found out through the accuracy value.
And after the classifier is used for outputting a test passing probability value and a test failing probability value, carrying out data fusion processing on a plurality of prediction results by adopting a D-S evidence theory to obtain a final quantized transaction strategy test result, wherein the quantized transaction strategy test result comprises test passing and test failing.
D-S evidence theory is a theoretical tool for processing uncertain information, is a typical method for intelligently processing uncertain information and fusing data, and has the capability of directly expressing 'uncertain' and 'unknown'. The accuracy of the quantitative transaction strategy test can be greatly improved by combining the SVM model with the D-S evidence theory for speed measurement verification.
In one embodiment, the data fusion processing is performed on the plurality of prediction results by adopting the D-S evidence theory to obtain a quantized transaction policy test result, which may include:
step 301, building an identification framework according to a plurality of prediction results; the identification framework includes a plurality of quantized transaction policy test results.
For example, the recognition frame Θ= { ω turefalse }, wherein omega ture Indicating that the quantized transaction strategy test result is passed, omega false Indicating that the quantized transaction policy test results are not passed, the subset of the recognition framework Θ contains { { ω ture },{ω false },{ω turefalse }}. The recognition framework Θ is a set of M mutually exclusive and exhaustive propositions sets, and the set is a finite set.
And 302, establishing probability value space distribution for a plurality of transaction strategy test results in the identification framework, and dividing the probability value space distribution into a plurality of intervals.
For example, the probability value psi is obtained after the feature data of different categories of the quantized transaction policy detail data are primarily judged by a classifier 1 、ψ 2 Wherein, 1 and 2 respectively represent A, B, and it should be noted that the categories of the quantized transaction policy detail data may include a plurality of categories, and in this example, only two categories are illustrated. Based on the spatial distribution of the matching probability values, psi is calculated 1 Sum phi 2 Dividing the space into a plurality of sections, and taking probability values which pass the quantitative transaction strategy test and probability values which do not pass the quantitative transaction strategy test in each section as probability distribution functions corresponding to the quantitative strategies.
Step 303, calculating the basic probability distribution function values of a plurality of intervals.
For example, basic probability distribution function values passing through the feature data tests of different categories are respectively calculated by constructing probability interval likelihood matrixes.
And 304, finally, fusing the basic probability distribution function values of a plurality of intervals by adopting the Dempster synthesis rule evidence, and outputting a quantized transaction strategy test result.
In one embodiment, the method for synthesizing rule evidence by adopting the Dempster to fuse the basic probability distribution function values of a plurality of intervals and output the quantized transaction strategy test result can comprise the following steps:
taking the accuracy value as a weight, and assigning the accuracy value to the basic probability distribution function values of a plurality of intervals;
and adopting Dempster synthesis rule evidence to fuse the basic probability distribution function values of a plurality of intervals after assigning weights, and outputting a quantized transaction strategy test result.
In the embodiment, the accuracy rate value is introduced as the weight, so that the accuracy and stability of the quantitative transaction strategy test result can be greatly improved.
In one embodiment, when the iterative version quantitative transaction strategy is tested, data preprocessing, feature extraction and model test verification are carried out on data operated by the iterative version quantitative transaction strategy, and the accuracy of the strategy is ensured from the aspect of probability by a test verification result.
Wherein AllCount represents the total data volume of the iterative version quantitative transaction policy test
The success count represents the amount of data that the iterative version quantized transaction policy test passes.
When the deviation exceeds a certain threshold, such as 5%, it is considered that the iterative quantized transaction strategy may have logic anomalies.
In one embodiment, the quantized transaction policy test results may also include test analysis data of the quantized transaction policy detail data to be tested, which is output in the form of a table or document.
Fig. 3 is a schematic diagram of an embodiment of a method for testing a quantized transaction policy according to the present application, as shown in fig. 3, in which iterative version of quantized transaction policy detail data is subjected to data preprocessing, feature extraction, classifier prediction, and D-S evidence theory result fusion processing, and finally quantized transaction policy test results are output.
In summary, the embodiment of the application can test the validity and stability of the quantitative transaction strategy to be tested more accurately, conveniently and efficiently. Compared with the traditional manual testing method and the automatic testing method, the embodiment of the application has the advantages that the testing preparation is relatively simple, the large labor cost is not required to be input, a large amount of testing time can be saved, the quick online requirement of a transactor can be met more quickly, the evaluation and the test can be carried out from the whole transaction of the quantitative transaction strategy, and the testing accuracy and the testing stability of the quantitative transaction strategy are improved.
The embodiment of the application also provides a quantitative transaction strategy testing device, which is described in the following embodiment. Because the principle of the device for solving the problems is similar to that of the quantitative transaction strategy test method, the implementation of the device can refer to the implementation of the quantitative transaction strategy test method, and the repetition is omitted.
Fig. 4 is a schematic diagram of a quantized transaction policy testing device according to an embodiment of the application, as shown in fig. 4, the device includes:
the data receiving module 401 is configured to receive quantized transaction policy detail data to be tested; the to-be-tested quantitative transaction strategy detail data comprise real market data, to-be-tested quantitative transaction strategy operation parameters and quantitative transaction strategy transaction data, and the to-be-tested quantitative transaction strategy operation parameters comprise parameters for operating a transaction strategy;
the feature extraction module 402 is configured to perform feature extraction on quantized transaction policy detail data to be tested to obtain a plurality of feature data;
a classifier prediction module 403, configured to input a plurality of feature data into a classifier, and output a plurality of prediction results, where the prediction results include a test passing probability value and a test failing probability value; the classifier is obtained by training the SVM model by utilizing historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data in advance;
and the result output module 404 is configured to perform data fusion processing on the multiple prediction results by using a D-S evidence theory, so as to obtain a quantized transaction policy test result, where the quantized transaction policy test result includes a pass test and a fail test.
In one embodiment, the apparatus further comprises:
the data preprocessing module is configured to perform any one or any combination of the following data preprocessing on the quantized transaction policy detail data to be tested before the feature extraction module 402 performs feature extraction on the quantized transaction policy detail data to be tested:
data cleaning, data conversion and data normalization.
In one embodiment, the feature extraction module 402 is specifically configured to:
and extracting features of the quantized transaction strategy detail data to be tested by adopting a mutual information method or a variance selection method to obtain a plurality of feature data.
In one embodiment, the classifier is trained in advance as follows:
taking historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data as sample data to construct a training set, a testing set and a verification set;
training the SVM model by using a training set to obtain a classifier;
and testing and verifying the classifier by using the testing set and the verification set respectively.
In one embodiment, training the SVM model with the training set includes:
setting the adjustment range and the adjustment step length of a plurality of support vector machine model parameters, traversing the value of each support vector machine model parameter, and obtaining a plurality of groups of support vector machine model parameters; the support vector machine model parameters comprise penalty coefficients, kernel functions and gamma parameters;
calculating the accuracy value corresponding to each group of support vector machine model parameters by using the training set; the accuracy value is the ratio of the number of samples with accurate prediction results to the number of all samples;
and determining the model parameters of the support vector machine according to the accuracy rate value.
In one embodiment, the result output module 404 is specifically configured to:
establishing an identification framework according to a plurality of prediction results; the identification framework comprises a plurality of quantized transaction strategy test results;
establishing probability value space distribution for a plurality of quantitative transaction strategy test results in the identification framework, and dividing a plurality of intervals for the probability value space distribution;
calculating basic probability distribution function values of a plurality of intervals;
and fusing the basic probability distribution function values of a plurality of intervals by adopting the Dempster synthesis rule evidence, and outputting a quantized transaction strategy test result.
In one embodiment, the result output module 404 is specifically configured to:
taking the accuracy value as a weight, and assigning the accuracy value to the basic probability distribution function values of a plurality of intervals;
and adopting Dempster synthesis rule evidence to fuse the basic probability distribution function values of a plurality of intervals after assigning weights, and outputting a quantized transaction strategy test result.
In one embodiment, the quantized transaction policy test result further includes test analysis data of quantized transaction policy detail data to be tested, and the test analysis data is output in the form of a table or a document.
Fig. 5 is a schematic diagram of a computer device according to an embodiment of the present application, and as shown in fig. 5, a computer device 500 is further provided according to an embodiment of the present application, including a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and capable of running on the processor 501, where the processor 501 implements the quantized transaction policy testing method described above when executing the computer program 503.
The embodiment of the application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program realizes the quantitative transaction strategy testing method when being executed by a processor.
The embodiment of the application also provides a computer program product, which comprises a computer program, and the computer program realizes the quantitative transaction strategy testing method when being executed by a processor.
In the embodiment of the application, quantitative transaction strategy detail data to be tested is received; the to-be-tested quantitative transaction strategy detail data comprise real market data, to-be-tested quantitative transaction strategy operation parameters and quantitative transaction strategy transaction data, and the to-be-tested quantitative transaction strategy operation parameters comprise parameters for operating a transaction strategy; feature extraction is carried out on quantized transaction strategy detail data to be tested, and a plurality of feature data are obtained; inputting a plurality of characteristic data into a classifier, and outputting a plurality of prediction results, wherein the prediction results comprise test passing probability values and test failing probability values; the classifier is obtained by training the SVM model by utilizing historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data in advance; and carrying out data fusion processing on the plurality of prediction results by adopting a D-S evidence theory to obtain a quantized transaction strategy test result, wherein the quantized transaction strategy test result comprises test passing and test failing. Compared with the technical scheme of manual strip-by-strip test of the quantized transaction strategy test in the prior art, in the embodiment of the application, the quantized transaction strategy test result is firstly predicted preliminarily through the classifier trained in advance, then the classifier is adopted to output a plurality of prediction results by adopting the D-S evidence theory for fusion processing, and the final quantized transaction strategy test result is output. The whole process does not need manual supervision piece by piece, reduces the testing cost of the quantized transaction strategy, utilizes a pre-trained classifier and a D-S evidence theory to conduct double prediction, and greatly improves the testing accuracy and stability of the quantized transaction strategy.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description of the embodiments has been provided for the purpose of illustrating the general principles of the application, and is not meant to limit the scope of the application, but to limit the application to the particular embodiments, and any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the application are intended to be included within the scope of the application.

Claims (12)

1. A method for testing a quantized transaction policy, comprising:
receiving quantitative transaction strategy detail data to be tested; the to-be-tested quantitative transaction strategy detail data comprise real market data, to-be-tested quantitative transaction strategy operation parameters and quantitative transaction strategy transaction data, and the to-be-tested quantitative transaction strategy operation parameters comprise parameters for operating a transaction strategy;
feature extraction is carried out on quantized transaction strategy detail data to be tested, and a plurality of feature data are obtained;
inputting a plurality of characteristic data into a classifier, and outputting a plurality of prediction results, wherein the prediction results comprise test passing probability values and test failing probability values; the classifier is obtained by training a support vector machine SVM model by utilizing historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data in advance;
and carrying out data fusion processing on the plurality of prediction results by adopting a D-S evidence theory to obtain a quantized transaction strategy test result, wherein the quantized transaction strategy test result comprises test passing and test failing.
2. The method of claim 1, further comprising, prior to feature extraction of the quantized transaction policy detail data to be tested:
data preprocessing of any one or any combination of the following is carried out on quantitative transaction strategy detail data to be tested:
data cleaning, data conversion and data normalization.
3. The method of claim 1, wherein performing feature extraction on quantized transaction policy detail data to be tested to obtain a plurality of feature data comprises:
and extracting features of the quantized transaction strategy detail data to be tested by adopting a mutual information method or a variance selection method to obtain a plurality of feature data.
4. The method of claim 1, wherein the classifier is trained in advance as follows:
taking historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data as sample data to construct a training set, a testing set and a verification set;
training the SVM model by using a training set to obtain a classifier;
and testing and verifying the classifier by using the testing set and the verification set respectively.
5. The method of claim 4, wherein training the SVM model with the training set comprises:
setting the adjustment range and the adjustment step length of a plurality of support vector machine model parameters, traversing the value of each support vector machine model parameter, and obtaining a plurality of groups of support vector machine model parameters; the support vector machine model parameters comprise penalty coefficients, kernel functions and gamma parameters;
calculating the accuracy value corresponding to each group of support vector machine model parameters by using the training set; the accuracy value is the ratio of the number of samples with accurate prediction results to the number of all samples;
and determining the model parameters of the support vector machine according to the accuracy rate value.
6. The method of claim 5, wherein performing data fusion processing on the plurality of predicted results using D-S evidence theory to obtain quantized transaction policy test results comprises:
establishing an identification framework according to a plurality of prediction results; the identification framework comprises a plurality of quantized transaction strategy test results;
establishing probability value space distribution for a plurality of quantitative transaction strategy test results in the identification framework, and dividing a plurality of intervals for the probability value space distribution;
calculating basic probability distribution function values of a plurality of intervals;
and fusing the basic probability distribution function values of a plurality of intervals by adopting the Dempster synthesis rule evidence, and outputting a quantized transaction strategy test result.
7. The method of claim 6, wherein fusing the basic probability distribution function values for the plurality of intervals using Dempster synthesis rule evidence, outputting quantized transaction policy test results, comprising:
taking the accuracy value as a weight, and assigning the accuracy value to the basic probability distribution function values of a plurality of intervals;
and adopting Dempster synthesis rule evidence to fuse the basic probability distribution function values of a plurality of intervals after assigning weights, and outputting a quantized transaction strategy test result.
8. The method of claim 1, wherein the quantized transaction policy test results further comprise test analysis data of quantized transaction policy detail data to be tested, which is output in the form of a table or document.
9. A quantized transaction policy testing device, comprising:
the data receiving module is used for receiving the quantized transaction strategy detail data to be tested; the to-be-tested quantitative transaction strategy detail data comprise real market data, to-be-tested quantitative transaction strategy operation parameters and quantitative transaction strategy transaction data, and the to-be-tested quantitative transaction strategy operation parameters comprise parameters for operating a transaction strategy;
the feature extraction module is used for carrying out feature extraction on the quantized transaction strategy detail data to be tested to obtain a plurality of feature data;
the classifier prediction module is used for inputting a plurality of characteristic data into the classifier and outputting a plurality of prediction results, wherein the prediction results comprise test passing probability values and test failing probability values; the classifier is obtained by training the SVM model by utilizing historical market data, historical quantized transaction strategy operation parameters and historical quantized transaction strategy transaction data in advance;
and the result output module is used for carrying out data fusion processing on the plurality of prediction results by adopting the D-S evidence theory to obtain a quantized transaction strategy test result, wherein the quantized transaction strategy test result comprises a pass test and a fail test.
10. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of claims 1 to 8 when executing the computer program.
11. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program which, when executed by a processor, implements the method of any of claims 1 to 8.
12. A computer program product, characterized in that the computer program product comprises a computer program which, when executed by a processor, implements the method of any of claims 1 to 8.
CN202311114897.6A 2023-08-31 2023-08-31 Quantitative transaction strategy testing method and device Pending CN117078423A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311114897.6A CN117078423A (en) 2023-08-31 2023-08-31 Quantitative transaction strategy testing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311114897.6A CN117078423A (en) 2023-08-31 2023-08-31 Quantitative transaction strategy testing method and device

Publications (1)

Publication Number Publication Date
CN117078423A true CN117078423A (en) 2023-11-17

Family

ID=88711476

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311114897.6A Pending CN117078423A (en) 2023-08-31 2023-08-31 Quantitative transaction strategy testing method and device

Country Status (1)

Country Link
CN (1) CN117078423A (en)

Similar Documents

Publication Publication Date Title
Angelopoulos et al. A gentle introduction to conformal prediction and distribution-free uncertainty quantification
CN109271374B (en) Database health degree scoring method and system based on machine learning
CN107025596B (en) Risk assessment method and system
CN110111113B (en) Abnormal transaction node detection method and device
US20220253856A1 (en) System and method for machine learning based detection of fraud
CN110147323A (en) A kind of change intelligence inspection method and device based on generation confrontation network
CN111177655B (en) Data processing method and device and electronic equipment
CN112419268A (en) Method, device, equipment and medium for detecting image defects of power transmission line
CN111340233A (en) Training method and device of machine learning model, and sample processing method and device
CN109242165A (en) A kind of model training and prediction technique and device based on model training
CN110020939B (en) Device, method and storage medium for establishing default loss rate prediction model
CN112434862B (en) Method and device for predicting financial dilemma of marketing enterprises
CN113838524B (en) S-nitrosylation site prediction method, model training method and storage medium
CN110009012A (en) A kind of risk specimen discerning method, apparatus and electronic equipment
CN115620083B (en) Model training method, face image quality evaluation method, equipment and medium
CN111445025A (en) Method and device for determining hyper-parameters of business model
CN117078423A (en) Quantitative transaction strategy testing method and device
CN113392086B (en) Medical database construction method, device and equipment based on Internet of things
CN114783538A (en) Coal ash content prediction method and device
CN113239075A (en) Construction data self-checking method and system
CN111612626A (en) Method and device for preprocessing bond evaluation data
Pristyanto et al. Comparison of ensemble models as solutions for imbalanced class classification of datasets
CN114897901B (en) Battery quality detection method and device based on sample expansion and electronic equipment
CN110956549B (en) Order identification method and device and related equipment
CN116527411B (en) Data security intelligent protection model construction method and device and collaboration platform

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination