CN114266664A - Transaction information prediction method and device, computer equipment and storage medium - Google Patents

Transaction information prediction method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114266664A
CN114266664A CN202111666723.1A CN202111666723A CN114266664A CN 114266664 A CN114266664 A CN 114266664A CN 202111666723 A CN202111666723 A CN 202111666723A CN 114266664 A CN114266664 A CN 114266664A
Authority
CN
China
Prior art keywords
transaction
feature
feature vector
data set
inputting
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
CN202111666723.1A
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.)
E Fund Management Co ltd
Original Assignee
E Fund Management Co ltd
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 E Fund Management Co ltd filed Critical E Fund Management Co ltd
Priority to CN202111666723.1A priority Critical patent/CN114266664A/en
Publication of CN114266664A publication Critical patent/CN114266664A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a transaction information prediction method, which comprises the following steps: acquiring a transaction data set of a transaction object, wherein the transaction data set comprises a plurality of pieces of transaction data which are continuous in time; inputting the transaction data set into a preset characteristic prediction model to predict the characteristics of the transaction information used for predicting the transaction object at a future moment, wherein a training set of the characteristic prediction model comprises a historical transaction data set of each transaction object in a plurality of transaction objects; inputting the estimated characteristics into a preset transaction information prediction model to predict the transaction information of the transaction object at a future moment, wherein the transaction information comprises an order price, an order quantity and an order time point. The invention also discloses a transaction information prediction device, a computer device and a computer readable storage medium.

Description

Transaction information prediction method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of machine learning, in particular to a transaction information prediction method, a device, computer equipment and a computer readable storage medium.
Background
At present, the stock market in China flourishes, the transaction amount rises year by year, and the main participants of the stock market A are public fund, private fund, individual investors, insurance fund and the like. The proportion of the public fund is increased year by year no matter the ratio of the market value or the volume of the turnover, and the public fund is an important participant in the market. At present, a permanent O32 or O45 system is selected by a public fund raising party, and all-round transaction modules such as fund manager ordering, central trader allocation, trader operation transaction, risk control and the like are integrated in the system, but the transaction mode provided by the system is simpler or mechanical. Some algorithm providers come, such as, for example, resyin bouquet UBS, gold genus, kafangtech. Algorithm providers will provide some algorithms focusing on transactions, wherein the algorithms mainly take three directions of classic TWAP (Time Weighted Average Price algorithm), VWAP (Volume-Weighted Average Price), and follow-up Volume as main directions, and the algorithms can perform localized optimization according to the actual situation of the a stock market. Meanwhile, the algorithm provider also provides some intelligent algorithms, and the typical idea is as follows: and performing rise and fall prediction based on machine learning, and then performing strategy construction based on a rise and fall prediction result. However, the current intelligent algorithm is still in the starting stage, and the problem exists in the actual landing.
In particular, in actual use, the public fund traders use classical algorithms in most cases for stability, compliance and completeness of trading tasks due to actual business requirements; in addition, the innovative algorithm has the defects of unstable effect, opaque internal logic, mismatch with the real market and the like. Therefore, the development of autonomous and controllable algorithm trading which is effective in a real trading environment is a development inevitable trend of public fund raising, and the industry competitiveness can be increased.
In the current algorithm transaction, due to the high frequency and large amount of transaction data, a large amount of data is naturally owned, and sufficient nutrients are provided for models and algorithms. For example, Level1 market Level data are used in the current research, one data is obtained every 3 seconds on average, and about 4800 data are obtained all day; if the strategy of 2 year calendar history data is used, the sample data of each stock model is about 250 ten thousand, and another half year is about 60 ten thousand test samples; the total number of data samples involved is about 100 million, calculated as 3000+ stocks on the a stock market. With such big data and supervised tagging, predicting trading information for stocks using deep learning or reinforcement learning is a common approach.
However, in the prior art, when the transaction information of the stocks is predicted by utilizing deep learning, the price for placing orders cannot be predicted, so that the prediction result has certain limitation; in the prior art, when the transaction information of the stock is predicted by using reinforcement learning, the consideration on market factors is limited, and the analysis on the time law of training data is lacked, so that the accuracy of the final prediction result is not high.
Aiming at the technical problems that the prediction result has certain limitation and low accuracy when the transaction information of the stock is predicted in the prior art, no effective solution exists at present.
Disclosure of Invention
The invention aims to provide a trading information prediction method, a trading information prediction device, computer equipment and a computer readable storage medium, which can solve the technical problems that the prediction result has certain limitation and low accuracy when the trading information of stocks is predicted in the prior art.
One aspect of the present invention provides a transaction information prediction method, including: acquiring a transaction data set of a transaction object, wherein the transaction data set comprises a plurality of pieces of transaction data which are continuous in time; inputting the transaction data set into a preset characteristic prediction model to predict the characteristics of the transaction information used for predicting the transaction object at a future moment, wherein a training set of the characteristic prediction model comprises a historical transaction data set of each transaction object in a plurality of transaction objects; inputting the estimated characteristics into a preset transaction information prediction model to predict the transaction information of the transaction object at a future moment, wherein the transaction information comprises an order price, an order quantity and an order time point.
Optionally, the acquiring the transaction data set of the transaction object includes: the acquiring of the transaction data set of the transaction object comprises: receiving a transaction information prediction instruction, and analyzing an object ID, a transaction final time point and a transaction date to which the transaction final time point belongs; determining a transaction time period which belongs to the transaction date and is before the transaction final time point; acquiring a plurality of pieces of transaction data of the object ID in the transaction time period, and recording the transaction data as a transaction data set of the transaction object; wherein the future time belongs to the transaction date and is after the transaction final time point.
Optionally, the inputting the transaction data set into a preset feature prediction model to predict features for predicting the transaction information of the transaction object at a future time includes: inputting the transaction data set into a first network module of the feature prediction model, so that the first network module outputs a first feature vector after extracting features of the transaction data set; inputting the first feature vector into a second network module of the feature prediction model, so that the second network module outputs a second feature vector after learning the time sequence rule of each feature element in the first feature vector; and predicting the characteristics of the transaction information of the transaction object at the future moment according to the second characteristic vector.
Optionally, the inputting the transaction data set into the first network module of the feature prediction model to enable the first network module to output a first feature vector after extracting the features of the transaction data set includes: inputting the transaction data set into a ResNet network of the feature prediction model; extracting features of the transaction data set through the ResNet network and converting the extracted features into feature vectors through the ResNet network; inputting the feature vector obtained after conversion into a first attention model of the feature prediction model; and updating the weight of each feature element in the feature vector obtained after the conversion through the first attention model to obtain the first feature vector.
Optionally, the inputting the first feature vector into a second network module of the feature prediction model, so that the second network module outputs a second feature vector after learning a temporal law of each feature element in the first feature vector, includes: inputting the first feature vector into an LSTM network of the feature prediction model; the LSTM network learns the time sequence rule of each feature element in the first feature vector and then outputs a feature vector with a time sequence rule; inputting the feature vector with the time sequence rule into a second attention model of the feature prediction model; and updating the weight of each characteristic element in the characteristic vector with the time sequence rule through the second attention model to obtain the second characteristic vector.
Optionally, the predicting, according to the second feature vector, features for predicting the transaction information of the transaction object at a future time includes: inputting the second feature vector into a pooling layer of the feature prediction model, so that a third feature vector is output after the pooling layer performs pooling action on the second feature vector; obtaining transaction privacy data of the transaction object, wherein the transaction privacy data is data which can be only seen by a target user after the target user performs transaction operation on the transaction object in the transaction time period; extracting the characteristics of the transaction privacy data, converting the characteristics into characteristic vectors, and recording the characteristic vectors as privacy characteristic vectors; concatenating the third feature vector and the privacy feature vector; inputting the feature vectors obtained after splicing into a preset convolutional neural network to estimate the features of the transaction information used for predicting the transaction object at a future moment.
Another aspect of the present invention provides a transaction information prediction apparatus, including: an acquisition module for acquiring a transaction data set of a transaction object, the transaction data set including a plurality of pieces of transaction data that are continuous in time; the prediction module is used for inputting the transaction data set into a preset characteristic prediction model so as to predict the characteristics of the transaction information used for predicting the transaction object at a future moment, and a training set of the characteristic prediction model comprises a historical transaction data set of each transaction object in multiple transaction objects; and the prediction module is used for inputting the predicted characteristics into a preset transaction information prediction model so as to predict the transaction information of the transaction object at a future moment, wherein the transaction information comprises an order price, an order quantity and an order time point.
Optionally, the obtaining module is specifically configured to: receiving a transaction information prediction instruction, and analyzing an object ID, a transaction final time point and a transaction date to which the transaction final time point belongs; determining a transaction time period which belongs to the transaction date and is before the transaction final time point; acquiring a plurality of pieces of transaction data of the object ID in the transaction time period, and recording the transaction data as a transaction data set of the transaction object; wherein the future time belongs to the transaction date and is after the transaction final time point.
Yet another aspect of the present invention provides a computer apparatus, comprising: the transaction information prediction method comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor implements the transaction information prediction method of any one of the above embodiments when executing the computer program.
Yet another aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a transaction information prediction method as described in any of the embodiments above.
Compared with the scheme of predicting the stock trading information by deep learning in the prior art, the trading information prediction method provided by the invention can predict the order price, the order quantity and the order time point, and can achieve the purpose of more comprehensively predicting the trading information at the future time; compared with the scheme of predicting the stock trading information by means of reinforcement learning in the prior art, the method has the advantages that the estimation link of the intermediate parameters is added, real market trading data are analyzed in a time sequence mode, the intermediate parameters are output, the input characteristics of a trading information prediction model are expanded, and the accuracy of a prediction result is improved.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 is a flow chart illustrating a method for predicting transaction information according to one embodiment;
FIG. 2 is a diagram illustrating a prediction model for obtaining transaction information based on reinforcement learning according to an embodiment;
FIG. 3 is a block diagram of a method for predicting transaction information according to an embodiment;
FIG. 4 is a logic diagram of a method for predicting transaction information according to an embodiment;
FIG. 5 is a block diagram showing a transaction information prediction apparatus according to the second embodiment;
fig. 6 shows a block diagram of a computer device suitable for implementing the transaction information prediction method according to the third embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Example one
Fig. 1 is a flowchart illustrating a transaction information prediction method according to a first embodiment, and as shown in fig. 1, the method includes steps S1-S3, wherein:
in step S1, a transaction data set of the transaction object is acquired, the transaction data set including a plurality of pieces of transaction data that are consecutive in time.
The trading objects of the embodiment are objects in the financial field, and the trading objects of the same category have enough quantity so that the trading objects can be continuously traded in a short time range (such as a day, a plurality of hours, a minute, and the like), such as stocks, funds, and the like, wherein the stocks of each category have enough quantity, and the funds of each category also have enough quantity; such as stock a, is of sufficient quantity to be traded by a sufficient number of users in a short period of time. Wherein objects that do not conform to the above characteristics cannot become transaction objects of the present invention, such as real estate.
Based on the above characteristics of the transaction object, the invention only sends out a signal but does not deal with the transaction, such as sending out a buy signal or a sell signal; the "transaction" of the present invention refers to a successful completion, such as a successful purchase or a successful sale.
In this embodiment, "temporally continuous" means that the transaction data in the transaction data set are arranged according to a time sequence, each transaction data is specifically transaction market data, for example, each transaction data may be a purchase success data, a sell success data, or an order withdrawal data, and each transaction data includes: the object ID of the transaction object, the transaction time, the opening price, the highest price and the lowest price of the transaction object by the transaction time, and the like.
Step S2, inputting the transaction data set into a preset feature prediction model to predict the features of the transaction information used for predicting the transaction objects at the future time, wherein the training set of the feature prediction model comprises the historical transaction data set of each transaction object in a plurality of transaction objects.
The feature prediction model comprises a two-level network structure: the system comprises a first network module and a second network module, wherein the first network module is located at a first level and the second network module is located at a second level, the first network module is used for extracting features of a transaction data set, the second network module is used for learning a time sequence rule among the extracted features, and then predicting the features which have the time sequence rule and can be used for predicting transaction information of a transaction object at a future moment, wherein the predicted features can comprise a 10% bargain quantile, a bargain average price and a 90% bargain quantile.
In the training set, for example, if the category of the transaction object is stock, the transaction objects are stock a, stock B, stock c. Each historical transaction data set includes a plurality of pieces of historical transaction data of the corresponding transaction object that are consecutive in time.
It should be noted that the "future time" in the present invention is not a fixed time point, but means that the order price output by the prediction model can be used as the future order price.
And step S3, inputting the estimated characteristics into a preset transaction information prediction model to predict the transaction information of the transaction object at a future moment.
The transaction information includes: order price, order quantity and order time point.
In the prior art, when the trading information of stocks is predicted by using deep learning, although the deep learning also uses real market data as a training set and can learn effective rules in trading, the deep learning only has good effect on price prediction and cannot predict the price to be placed. The method and the device can predict the order placing price, the order placing quantity and the order placing time point, and achieve the purpose of comprehensively predicting the transaction information at the future time.
In this embodiment, the transaction information prediction model may be a model obtained by Reinforcement Learning (RL) training in the prior art, as shown in fig. 2, and the Reinforcement Learning technical solution is: since order execution is fundamentally a decision-making problem under uncertain conditions and actual transaction data is noisy, reinforcement learning becomes the best choice to solve the problem. The reinforcement learning mainly comprises four elements, environment state, action, strategy and reward; and the goal of reinforcement learning is to obtain the most accumulated rewards. Reinforcement learning takes into account the interaction between an Agent (Agent), which may be understood as the subject of learning, and the Agent is generally a designed reinforcement learning model or Agent that attempts to take some action (action) to manipulate the Environment in the initial state, the action of which is to complete an initial heuristic from one state to another, the Environment is given a certain reward, and the model takes the next action according to the reward feedback (the action is currently the model is based on feedback, or is a strategy), and learns the characteristic rules of the Environment state through continuous action, feedback, and re-action. A sentence summary: the goal of reinforcement learning is to find an optimal strategy for the agent to receive as much of the reward from the environment as possible. By adopting the scheme of the reinforcement learning limit order, the limit order is naturally superior to the market order, and the appropriate price is selected to hang the order through the analysis of the order book, so that passive bargaining is expected, and a better bargaining price is obtained. The scheme accords with the understanding of a human learned mode and can solve the problem of the last kilometer.
However, in the prior art, when the transaction information of the stock is predicted by using reinforcement learning, the consideration on market factors is limited and the analysis on the time law of training data is lacked, so that the accuracy of the final prediction result is not high. In the embodiment, real market transaction data are analyzed in a time sequence mode, the intermediate parameters are output, and then the final transaction situation is predicted according to the intermediate parameters. Specifically, as shown in fig. 3, in the existing reinforcement learning training process, a factor is directly input to pi, and then a price and a quantity of orders are output by pi; the method is improved in the prior art, and a link for estimating intermediate parameters is added, namely, a factor is input into a Model, then the intermediate parameters output by the Model are used as characteristics for predicting the transaction information of a transaction object at a future moment, and the intermediate parameters are input into pi to predict the order price and the order quantity, wherein the factor in the prior art is a high-frequency characteristic of the structure, and the factor in the embodiment is real market transaction data, namely a transaction data set; model is a characteristic prediction Model; the intermediate parameter is also a feature for predicting the transaction information of the transaction object at a future time, and includes: 10% percentile is the 10% bargain quantile, Vwap is the average bargain price, and 90% percentile is the 90% bargain price quantile; pi is a reinforcement learning agent strategy (agent for short) for training a transaction information prediction model; volume is the order quantity, and price is the order price.
Optionally, in an embodiment, the acquiring the transaction data set of the transaction object includes:
receiving a transaction information prediction instruction, and analyzing an object ID, a transaction final time point and a transaction date to which the transaction final time point belongs;
determining a transaction time period which belongs to the transaction date and is before the transaction final time point;
acquiring a plurality of pieces of transaction data of the object ID in the transaction time period, and recording the transaction data as a transaction data set of the transaction object;
wherein the future time belongs to the transaction date and is after the transaction final time point.
Specifically, the data format of the transaction final time point may be date + time, such as: 03 points at 13 points on 11/month 02/day 2021; the data format of the final time point of the transaction may also be time, such as 03 points 13. The embodiment limits the prediction of the transaction information at the future moment of the day according to the transaction data which actually occurs at the day, so that timely guidance information can be provided for ordering of the user.
Optionally, the receiving time point of the transaction information prediction instruction belongs to the transaction date and the receiving time point is located after the transaction final time point. Namely, the transaction data which actually occurs in the current day is obtained through the prediction instruction triggered in the current day so as to predict the transaction information at the current future moment.
Optionally, in an embodiment, the inputting the transaction data set into a preset feature prediction model to predict features for predicting the transaction information of the transaction object at a future time includes:
inputting the transaction data set into a first network module of the feature prediction model, so that the first network module outputs a first feature vector after extracting features of the transaction data set;
inputting the first feature vector into a second network module of the feature prediction model, so that the second network module outputs a second feature vector after learning the time sequence rule of each feature element in the first feature vector;
and predicting the characteristics of the transaction information of the transaction object at the future moment according to the second characteristic vector.
Specifically, the first Network module may include a ResNet (Residual Neural Network) Network, through which a feature vector of the transaction data set may be extracted, and the feature vector may be used as a first feature vector; the second network module may include an LSTM (Long Short-Term Memory) network, and the LSTM network may learn a timing relationship between each feature element in the feature vector output by the first network module, so as to output a feature vector having a timing rule, and may use the feature vector as a second feature vector; furthermore, when the characteristics used for predicting the transaction information of the transaction object at the future moment are predicted according to the second characteristic vector, the predicted characteristics also accord with the time sequence rule due to the fact that the second characteristic vector has the time sequence rule, and therefore when the transaction information is predicted based on the predicted characteristics, the accuracy of the prediction result can be improved.
Optionally, in an embodiment, the inputting the transaction data set into the first network module of the feature prediction model to enable the first network module to output a first feature vector after extracting the features of the transaction data set includes:
inputting the transaction data set into a ResNet network of the feature prediction model;
extracting features of the transaction data set through the ResNet network and converting the extracted features into feature vectors through the ResNet network;
inputting the feature vector obtained after conversion into a first attention model of the feature prediction model;
and updating the weight of each feature element in the feature vector obtained after the conversion through the first attention model to obtain the first feature vector.
Specifically, the first network module includes a ResNet network and a first Attention model, where the first Attention model may be Dot-product Attention or Additive Attention, and after the feature vector output by the ResNet network is input into the first Attention model, the first Attention model may update the weight of each feature element in the feature vector, and the first Attention model outputs an updated feature vector, which may be recorded as the first feature vector. The first attention model can learn the correlation between time step lengths, dynamic weight adjustment is carried out, appropriate vector representation is finally obtained, and accuracy of a prediction result is improved.
Optionally, in an embodiment, the inputting the first feature vector into a second network module of the feature prediction model, so that the second network module outputs a second feature vector after learning a temporal law of each feature element in the first feature vector, includes:
inputting the first feature vector into an LSTM network of the feature prediction model;
the LSTM network learns the time sequence rule of each feature element in the first feature vector and then outputs a feature vector with a time sequence rule;
inputting the feature vector with the time sequence rule into a second attention model of the feature prediction model;
and updating the weight of each characteristic element in the characteristic vector with the time sequence rule through the second attention model to obtain the second characteristic vector.
Specifically, the second network module comprises an LSTM network and a second Attention model, which may be Dot-product Attention or Additive Attention, and preferably, the first Attention model and the second Attention model are different; after the feature vector output by the LSTM network is input into the second attention model, the weight of each feature element in the feature vector may be updated by the second attention model, and the updated feature vector may be output by the second attention model, and may be recorded as the second feature vector. The second attention model can also learn the correlation between time step lengths, carry out dynamic weight adjustment, finally obtain proper vector representation and improve the accuracy of the prediction result.
Optionally, in an embodiment, the predicting, according to the second feature vector, features for predicting the transaction information of the transaction object at a future time includes:
inputting the second feature vector into a pooling layer of the feature prediction model, so that a third feature vector is output after the pooling layer performs pooling action on the second feature vector;
obtaining transaction privacy data of the transaction object, wherein the transaction privacy data is data which can be only seen by a target user after the target user performs transaction operation on the transaction object in the transaction time period;
extracting the characteristics of the transaction privacy data, converting the characteristics into characteristic vectors, and recording the characteristic vectors as privacy characteristic vectors;
concatenating the third feature vector and the privacy feature vector;
inputting the feature vectors obtained after splicing into a preset convolutional neural network to estimate the features of the transaction information used for predicting the transaction object at a future moment.
Specifically, the pooling layer reduces the eigenvector of the output of the convolutional layer through the pooling effect at the back of the convolutional layer, improves the result simultaneously, makes the result difficult to appear the overfitting phenomenon, wherein, the pooling effect includes: 1. reducing the dimension of the features and reducing overfitting; 2, realizing nonlinearity; 3. implement feature invariance, etc.
The transaction data obtained in the market belongs to public data, is data which can be known by all users, and has universality. When it is desired to provide guidance specifically for ordering a target user, the public data lacks personalized features for that user. Therefore, the transaction privacy data are further acquired, the third feature vector output by the pooling layer is spliced with the privacy feature vector of the transaction privacy data, and then the feature for predicting the transaction information of the transaction object at the future moment is estimated according to the feature vector acquired after splicing, so that when the transaction information is predicted based on the estimated feature, professional ordering guidance can be provided for the target user based on the predicted transaction information.
As shown in fig. 4, Public State is a transaction data set, which includes high-dimensional degrees at multiple stock tick levels, such as order book information, and specifically includes: the invention uses Public State to predict the rise and fall of stock price. Firstly, each piece of data in the Public State is normalized, and then the data is input into two stacked neural network modules for sequence coding, wherein the two neural network modules are respectively a first network module (Block1) and a second network module (Block 2). The two layers of networks are used for extracting features, learning a time sequence rule, and meanwhile, an attention mechanism is used for learning the correlation between time step lengths to carry out dynamic weight adjustment, and finally, a proper vector representation is obtained. Further, a second feature vector output by a second network module is input to the Attentive Pooling so that the Attentive Pooling outputs a third feature vector (Hidden State) after the Pooling effect, the third feature vector output by the Pooling layer and a privacy feature vector (Private State) are subjected to vector splicing, the feature vector obtained after splicing is used as the input of next step reinforcement learning, and therefore transaction information is predicted, wherein the reinforcement learning part can use a strategy gradient mode, a neural network is built in the reinforcement learning part to output a predicted action, and the maximum benefit of the strategy gradient direct output action is that the strategy gradient direct output action can be realized in one connection modeThe selection action in the continuous interval can place orders at each position of the order book, accords with the actual scene, and has obvious advantages compared with a value-based reinforcement learning mode. Where FC is the full connectivity layer in reinforcement learning, as1And as2Corresponding transaction information, pi, in the buy and sell states, respectivelys1And pis2Respectively corresponding agents in the buying and selling states.
The method combines the capability of processing a big data time sequence by a depth time sequence model, gives stronger characteristic representation for reinforcement learning, and finally improves the trading effect in an algorithm trading scene; modeling is carried out on the high-frequency time sequence data through an LSTM model, 10% of bargain quantiles, 10% of bargain average prices and 90% of bargain price quantiles are respectively predicted to determine expected bargain average prices and suitable hang-up prices for buying and selling, the integrated information characteristics are used as an incremental state of reinforcement learning and are provided for an intelligent agent pi to carry out learning iteration, evaluation feedback is carried out on the order-placing price, the order-placing quantity and the order-placing time point, and finally the optimal intelligent agent pi is obtained through training, namely a transaction information prediction model is obtained. Tests show that the TWAP strategy 5BP (base Point) under the same condition is overcome by the method, the single removing rate cannot exceed 50%, and the prediction result can ensure certain accuracy and further improve the viscosity of a user.
Example two
The second embodiment of the present invention provides a transaction information prediction apparatus, which corresponds to the method provided in the first embodiment, and corresponding technical features and technical effects are not described in detail in this embodiment, and reference may be made to the first embodiment for related points. Specifically, fig. 5 shows a block diagram of the transaction information prediction apparatus in the second embodiment. As shown in fig. 5, the transaction information prediction apparatus 500 may include an obtaining module 501, a prediction module 502, and a prediction module 503, wherein:
an obtaining module 501, configured to obtain a transaction data set of a transaction object, where the transaction data set includes multiple pieces of transaction data that are consecutive in time;
the estimation module 502 is configured to input the transaction data set to a preset feature prediction model to estimate features used for predicting transaction information of the transaction object at a future time, where a training set of the feature prediction model includes a historical transaction data set of each transaction object in multiple transaction objects;
the predicting module 503 is configured to input the predicted characteristics into a preset transaction information predicting model to predict transaction information of the transaction object at a future time, where the transaction information includes an order price, an order quantity, and an order time point.
Optionally, the obtaining module is specifically configured to: receiving a transaction information prediction instruction, and analyzing an object ID, a transaction final time point and a transaction date to which the transaction final time point belongs; determining a transaction time period which belongs to the transaction date and is before the transaction final time point; acquiring a plurality of pieces of transaction data of the object ID in the transaction time period, and recording the transaction data as a transaction data set of the transaction object; wherein the future time belongs to the transaction date and is after the transaction final time point.
Optionally, the estimation module is specifically configured to: inputting the transaction data set into a first network module of the feature prediction model, so that the first network module outputs a first feature vector after extracting features of the transaction data set; inputting the first feature vector into a second network module of the feature prediction model, so that the second network module outputs a second feature vector after learning the time sequence rule of each feature element in the first feature vector; and predicting the characteristics of the transaction information of the transaction object at the future moment according to the second characteristic vector.
Optionally, when the pre-estimation module executes the first network module that inputs the transaction data set into the feature prediction model, so that the first network module outputs a first feature vector after extracting features of the transaction data set, the pre-estimation module is specifically configured to: inputting the transaction data set into a ResNet network of the feature prediction model; extracting features of the transaction data set through the ResNet network and converting the extracted features into feature vectors through the ResNet network; inputting the feature vector obtained after conversion into a first attention model of the feature prediction model; and updating the weight of each feature element in the feature vector obtained after the conversion through the first attention model to obtain the first feature vector.
Optionally, when the first feature vector is input to the second network module of the feature prediction model, so that the second network module outputs a second feature vector after learning a timing law of each feature element in the first feature vector, the method is specifically configured to: inputting the first feature vector into an LSTM network of the feature prediction model; the LSTM network learns the time sequence rule of each feature element in the first feature vector and then outputs a feature vector with a time sequence rule; inputting the feature vector with the time sequence rule into a second attention model of the feature prediction model; and updating the weight of each characteristic element in the characteristic vector with the time sequence rule through the second attention model to obtain the second characteristic vector.
Optionally, when the predicting module performs the predicting of the feature of the transaction information of the transaction object at a future time according to the second feature vector, the predicting module is specifically configured to: inputting the second feature vector into a pooling layer of the feature prediction model, so that a third feature vector is output after the pooling layer performs pooling action on the second feature vector; obtaining transaction privacy data of the transaction object, wherein the transaction privacy data is data which can be only seen by a target user after the target user performs transaction operation on the transaction object in the transaction time period; extracting the characteristics of the transaction privacy data, converting the characteristics into characteristic vectors, and recording the characteristic vectors as privacy characteristic vectors; concatenating the third feature vector and the privacy feature vector; inputting the feature vectors obtained after splicing into a preset convolutional neural network to estimate the features of the transaction information used for predicting the transaction object at a future moment.
EXAMPLE III
Fig. 6 shows a block diagram of a computer device suitable for implementing the transaction information prediction method according to the third embodiment. In this embodiment, the computer device 600 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers), and the like that execute programs. As shown in fig. 6, the computer device 600 of the present embodiment includes at least, but is not limited to: a memory 601, a processor 602, a network interface 603, which may be communicatively coupled to each other via a system bus. It is noted that FIG. 6 only shows the computer device 600 having components 601 and 603, but it is to be understood that not all of the shown components are required and that more or fewer components may alternatively be implemented.
In this embodiment, the memory 603 includes at least one type of computer-readable storage medium, which includes flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 601 may be an internal storage unit of the computer device 600, such as a hard disk or a memory of the computer device 600. In other embodiments, the memory 601 may also be an external storage device of the computer device 600, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the computer device 600. Of course, the memory 601 may also include both internal and external storage devices for the computer device 600. In the present embodiment, the memory 601 is generally used for storing an operating system installed in the computer device 600 and various types of application software, such as program codes of a transaction information prediction method, and the like.
Processor 602 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 602 is typically used to control the overall operation of the computer device 600. Such as performing control and processing related to data interaction or communication with the computer device 600. In this embodiment, the processor 602 is configured to execute the program code of the transaction information prediction method stored in the memory 601.
In this embodiment, the transaction information prediction method stored in the memory 601 may be further divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 602) to implement the present invention.
The network interface 603 may comprise a wireless network interface or a wired network interface, and the network interface 603 is typically used to establish communication links between the computer device 600 and other computer devices. For example, the network interface 603 is used to connect the computer apparatus 600 to an external terminal via a network, establish a data transmission channel and a communication link between the computer apparatus 600 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
Example four
The fourth embodiment further provides a computer-readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application store, etc., and on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the transaction information prediction method.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
It should be noted that the numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A method for predicting transaction information, the method comprising:
acquiring a transaction data set of a transaction object, wherein the transaction data set comprises a plurality of pieces of transaction data which are continuous in time;
inputting the transaction data set into a preset characteristic prediction model to predict the characteristics of the transaction information used for predicting the transaction object at a future moment, wherein a training set of the characteristic prediction model comprises a historical transaction data set of each transaction object in a plurality of transaction objects;
inputting the estimated characteristics into a preset transaction information prediction model to predict the transaction information of the transaction object at a future moment, wherein the transaction information comprises an order price, an order quantity and an order time point.
2. The method of claim 1, wherein said obtaining a transaction data set of a transaction object comprises:
receiving a transaction information prediction instruction, and analyzing an object ID, a transaction final time point and a transaction date to which the transaction final time point belongs;
determining a transaction time period which belongs to the transaction date and is before the transaction final time point;
acquiring a plurality of pieces of transaction data of the object ID in the transaction time period, and recording the transaction data as a transaction data set of the transaction object;
wherein the future time belongs to the transaction date and is after the transaction final time point.
3. The method of claim 2, wherein inputting the transaction data set into a preset feature prediction model to predict features for predicting transaction information of the transaction object at a future time comprises:
inputting the transaction data set into a first network module of the feature prediction model, so that the first network module outputs a first feature vector after extracting features of the transaction data set;
inputting the first feature vector into a second network module of the feature prediction model, so that the second network module outputs a second feature vector after learning the time sequence rule of each feature element in the first feature vector;
and predicting the characteristics of the transaction information of the transaction object at the future moment according to the second characteristic vector.
4. The method of claim 3, wherein inputting the transaction data set into a first network module of the feature prediction model to cause the first network module to output a first feature vector after extracting features of the transaction data set comprises:
inputting the transaction data set into a ResNet network of the feature prediction model;
extracting features of the transaction data set through the ResNet network and converting the extracted features into feature vectors through the ResNet network;
inputting the feature vector obtained after conversion into a first attention model of the feature prediction model;
and updating the weight of each feature element in the feature vector obtained after the conversion through the first attention model to obtain the first feature vector.
5. The method according to claim 3, wherein the inputting the first feature vector into a second network module of the feature prediction model, so that the second network module outputs a second feature vector after learning a temporal rule of each feature element in the first feature vector, comprises:
inputting the first feature vector into an LSTM network of the feature prediction model;
the LSTM network learns the time sequence rule of each feature element in the first feature vector and then outputs a feature vector with a time sequence rule;
inputting the feature vector with the time sequence rule into a second attention model of the feature prediction model;
and updating the weight of each characteristic element in the characteristic vector with the time sequence rule through the second attention model to obtain the second characteristic vector.
6. The method of claim 3, wherein predicting features of the transaction information for predicting the transaction object at a future time from the second feature vector comprises:
inputting the second feature vector into a pooling layer of the feature prediction model, so that a third feature vector is output after the pooling layer performs pooling action on the second feature vector;
obtaining transaction privacy data of the transaction object, wherein the transaction privacy data is data which can be only seen by a target user after the target user performs transaction operation on the transaction object in the transaction time period;
extracting the characteristics of the transaction privacy data, converting the characteristics into characteristic vectors, and recording the characteristic vectors as privacy characteristic vectors;
concatenating the third feature vector and the privacy feature vector;
inputting the feature vectors obtained after splicing into a preset convolutional neural network to estimate the features of the transaction information used for predicting the transaction object at a future moment.
7. A transaction information prediction apparatus, characterized in that the apparatus comprises:
an acquisition module for acquiring a transaction data set of a transaction object, the transaction data set including a plurality of pieces of transaction data that are continuous in time;
the prediction module is used for inputting the transaction data set into a preset characteristic prediction model so as to predict the characteristics of the transaction information used for predicting the transaction object at a future moment, and a training set of the characteristic prediction model comprises a historical transaction data set of each transaction object in multiple transaction objects;
and the prediction module is used for inputting the predicted characteristics into a preset transaction information prediction model so as to predict the transaction information of the transaction object at a future moment, wherein the transaction information comprises an order price, an order quantity and an order time point.
8. The apparatus of claim 7, wherein the obtaining module is specifically configured to:
receiving a transaction information prediction instruction, and analyzing an object ID, a transaction final time point and a transaction date to which the transaction final time point belongs;
determining a transaction time period which belongs to the transaction date and is before the transaction final time point;
acquiring a plurality of pieces of transaction data of the object ID in the transaction time period, and recording the transaction data as a transaction data set of the transaction object;
wherein the future time belongs to the transaction date and is after the transaction final time point.
9. A computer device, the computer device comprising: memory, processor and 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 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 6.
CN202111666723.1A 2021-12-31 2021-12-31 Transaction information prediction method and device, computer equipment and storage medium Pending CN114266664A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111666723.1A CN114266664A (en) 2021-12-31 2021-12-31 Transaction information prediction method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111666723.1A CN114266664A (en) 2021-12-31 2021-12-31 Transaction information prediction method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114266664A true CN114266664A (en) 2022-04-01

Family

ID=80832083

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111666723.1A Pending CN114266664A (en) 2021-12-31 2021-12-31 Transaction information prediction method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114266664A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114708044A (en) * 2022-05-31 2022-07-05 广州简悦信息科技有限公司 Virtual article information processing and model training method and device and electronic equipment
CN116777567A (en) * 2023-08-17 2023-09-19 山东恒诺尚诚信息科技有限公司 Order generation method and system based on artificial intelligence

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114708044A (en) * 2022-05-31 2022-07-05 广州简悦信息科技有限公司 Virtual article information processing and model training method and device and electronic equipment
CN116777567A (en) * 2023-08-17 2023-09-19 山东恒诺尚诚信息科技有限公司 Order generation method and system based on artificial intelligence

Similar Documents

Publication Publication Date Title
CN110704730B (en) Product data pushing method and system based on big data and computer equipment
US20100280935A1 (en) System and Method for Creating and Managing Financially-Related Goals
CN106875206A (en) Acquisition of information, assessment, questionnaire method, device and server
WO2012135742A2 (en) Systems and methods for improving prediction of future credit risk performances
CN114266664A (en) Transaction information prediction method and device, computer equipment and storage medium
CN112597745B (en) Intelligent chart generation method and device, computer system and readable storage medium
CN110503564A (en) Save case processing method, system, equipment and storage medium from damage based on big data
Snihovyi et al. Implementation of robo-advisor services for different risk attitude investment decisions using machine learning techniques
CN111369080B (en) Intelligent customer service solution rate prediction method and system and multi-service prediction model
US20160035026A1 (en) Online trading systems and methods
CN118172095A (en) Product purchase prediction method and device
WO2022120555A1 (en) Investment platform and system and method for investing in financial products
US20210232970A1 (en) Systems and methods for risk-sensitive reinforcement learning
CN116542418B (en) Deep learning-based business handling method and system for office hall
KR20140090558A (en) Device, method and system of automatically defining a financial instrument
AU2020351871A1 (en) Dynamically-generated electronic database for portfolio selection
CN108256667A (en) Asset data processing method, device, storage medium and computer equipment
CN116681513A (en) Enterprise asset data processing method and device
CN116402625A (en) Customer evaluation method, apparatus, computer device and storage medium
CN110210959A (en) Analysis method, device and the storage medium of financial data
CN116127188A (en) Target feedback value determining method and device, electronic equipment and storage medium
CN115587830A (en) Work task excitation method and device, computer equipment and storage medium
Ayaz et al. Disruptive artificial intelligence (AI) use-cases in insurance
Kalva et al. Stock Market Investment Strategy Using Deep-Q-Learning Network
Masa et al. Long-memory modelling and forecasting of the returns and volatility of exchange-traded notes (ETNs)

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