CN113919945A - Data analysis method, device, equipment and storage medium based on neural network - Google Patents
Data analysis method, device, equipment and storage medium based on neural network Download PDFInfo
- Publication number
- CN113919945A CN113919945A CN202111094470.5A CN202111094470A CN113919945A CN 113919945 A CN113919945 A CN 113919945A CN 202111094470 A CN202111094470 A CN 202111094470A CN 113919945 A CN113919945 A CN 113919945A
- Authority
- CN
- China
- Prior art keywords
- price
- actual
- neural network
- trend
- sampling time
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/215—Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/06—Asset management; Financial planning or analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- Development Economics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Technology Law (AREA)
- Marketing (AREA)
- General Business, Economics & Management (AREA)
- Economics (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- General Health & Medical Sciences (AREA)
- Strategic Management (AREA)
- Computing Systems (AREA)
- Entrepreneurship & Innovation (AREA)
- Game Theory and Decision Science (AREA)
- Human Resources & Organizations (AREA)
- Quality & Reliability (AREA)
- Operations Research (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The invention discloses a data analysis method, a device, equipment and a storage medium based on a neural network, wherein the method comprises the following steps: acquiring the actual price and the actual moving average price of the financial object at the latest sampling time intervals of preset quantity; constructing an input variable according to the sampling time interval, the actual price and the actual moving average price; inputting the input variable into a pre-trained back propagation neural network model for analysis, and confirming the price trend of the financial subject matter in the future preset time according to the analysis result; and generating a trading strategy suggestion in the future preset time according to the price trend based on the brink trading method. The invention utilizes the variable constructed by combining the sampling time as the neural network for analysis, and the analysis result combined with the sampling time is more accurate, thereby being beneficial to the user to adjust the transaction strategy in time.
Description
Technical Field
The present application relates to the field of artificial intelligence technologies, and in particular, to a data analysis method, apparatus, device, and storage medium based on a neural network.
Background
Financial targets refer to financial products in the financial market, such as: the stock market is a stock, in other words, the user's investment in the listed company is traded, the futures market is a trade contract for some commodities, and foreign exchange, securities, etc. belong to financial targets.
Trading of financial targets plays an important role in today's financial market. In recent years, the market for trading of financial objects has attracted more and more attention and has been involved in financial investments in the hope of gaining more interest. In view of the fact that the financial investments are used for obtaining larger profits, the price analysis of the financial subject matters is effectively carried out, the investment risk can be avoided to the maximum extent, the investment profits are increased, and the method is the most concerned hot problem of financial investors.
At present, in order to help users to make reasonable investment, various financial subject matter data analysis methods mainly include traditional methods such as a regression analysis method, a time series method and a Markov analysis method, and also include artificial intelligence analysis methods such as a support vector machine and a neural network. In order to further improve the accuracy of the analysis of the financial object data, some improved algorithms and learning strategies are also applied to the problem of the analysis of the financial object data. Then, the difference of the structure and the input variable of the existing analysis model can cause the deviation between the analysis result and the actual result to be large, so that the analysis result is inaccurate, and the reasonable planning of the trading strategy by the user is not enough assisted.
Disclosure of Invention
The application provides a data analysis method and device based on a neural network, computer equipment and a storage medium, which are used for solving the problem that the existing mode for analyzing the price trend of a financial target is poor in effect.
In order to solve the technical problem, the application adopts a technical scheme that: provided is a data analysis method based on a neural network, comprising: acquiring the actual price and the actual moving average price of the financial object at the latest sampling time intervals of preset quantity; constructing an input variable according to the sampling time interval, the actual price and the actual moving average price; inputting the input variable into a pre-trained back propagation neural network model for analysis, and confirming the price trend of the financial subject matter in the future preset time according to the analysis result; and generating a trading strategy suggestion in the future preset time according to the price trend based on the brink trading method.
As a further improvement of the present application, the back propagation neural network model is trained by: constructing a training sample according to the pre-acquired historical price, the historical moving average price and the sampling time interval, and acquiring a historical actual price trend corresponding to the sampling time interval; inputting the training sample into a back propagation neural network model to be trained for analysis, and confirming the expected price trend of the fused object in the historical event section corresponding to the training sample according to the historical analysis result; and updating the back propagation neural network model by combining the expected price trend, the historical actual price trend and the preset loss function back propagation.
As a further improvement of the present application, the back propagation neural network model includes an input layer, a hidden layer, and an output layer; the input layer carries out normalization processing on input variables, and the calculation formula is as follows: wherein, aiFor the ith training sample, n is the total number of training samples, max () represents the maximum value, min () represents the minimum value, xiThe normalized ith training sample is obtained; the formula for calculating the output value of the hidden layer is:wherein,hjFor the output value of the hidden layer, m represents the number of neurons in the input layer, m is less than or equal to n, wijIs the weight between the ith neuron of the input layer and the jth neuron of the hidden layer, thetajThe threshold value of the jth neuron of the hidden layer is f, and the number of the neurons of the hidden layer is f; the calculation formula of the output value of the output layer is as follows:wherein, ykIs the output value of the output layer, wjkIs the weight between the jth neuron of the hidden layer and the kth neuron of the output layer, thetakThe threshold value of the kth neuron of the output layer is g, and the number of the neurons of the output layer is g; the loss function is:wherein E1To the value of the loss function, oiIs a desired price trend.
As a further improvement of the present application, the input variables are constructed according to the sampling time interval, the actual price and the actual moving average price, and include: acquiring actual prices and actual moving average prices corresponding to a preset number of sampling time intervals; calculating the standard deviation of the actual price according to the actual price; constructing an input variable according to the actual moving average price, the actual price, the standard deviation and the sampling time interval, wherein the input variable is expressed as: wherein, X is an input variable, a first order difference representing the actual moving average price,a first order difference representing the actual price,representing the first order difference of the standard deviation, t representing the sampling time interval, and n representing the period of the sampling time interval.
As a further improvement of the application, the method for generating the trading strategy suggestions in the future preset time according to the price trend based on the brink trading method comprises the following steps: when the price trend is an ascending trend, amplifying the set value of the linen belt according to a preset rule; when the price trend is a descending trend, reducing the set value of the Braun belt according to a preset rule; and when the price trend is a stable trend, setting the set value of the afforestation belt as a preset conventional value according to a preset rule.
As a further improvement of the present application, before constructing the training sample according to the pre-obtained historical price, historical moving average price and sampling time interval, the method further includes: and performing data washing on the historical prices and the historical moving average prices.
As a further refinement of the present application, the price trend includes a moving average price trend of the financial subject matter for a preset time in the future.
In order to solve the above technical problem, another technical solution adopted by the present application is: provided is a data analysis device based on a neural network, including: the acquisition module is used for acquiring the actual price and the actual moving average price of the financial subject matter at the latest sampling time intervals of the preset number; the construction module is used for constructing an input variable according to the sampling time interval, the actual price and the actual moving average price; the analysis module is used for inputting the input variable into a pre-trained back propagation neural network model for analysis and confirming the price trend of the financial object in the future preset time according to the analysis result; and the generating module is used for generating the trading strategy suggestions in the future preset time according to the price trend based on the brink trading method.
In order to solve the above technical problem, the present application adopts another technical solution that: there is provided a computer device comprising a processor, a memory having stored therein program instructions which, when executed by the processor, cause the processor to perform the steps of any of the neural network based data analysis methods described above.
In order to solve the above technical problem, the present application adopts another technical solution that: there is provided a storage medium storing program instructions capable of implementing the neural network-based data analysis method as claimed in any one of the above.
The beneficial effect of this application is: the data analysis method based on the neural network constructs the input variables by utilizing the actual price, the actual moving average price and the sampling time interval, which are acquired based on the sampling time interval, not only considers the correlation between the price momentum of the financial object and the recent price, but also considers the correlation between the price momentum and the price sampling time price, and utilizes the input variables constructed according to the actual price, the actual moving average price and the sampling time interval and combines a pre-trained back propagation neural network model to carry out data analysis, so that the analysis result obviously tends to the actual result, the trading strategy of the financial object is more perfect, and the trading strategy suggestion can be more reasonably provided for a user.
Drawings
FIG. 1 is a schematic flow chart diagram of a neural network-based data analysis method in accordance with an embodiment of the present invention;
FIG. 2 is a functional block diagram of a data analysis device based on neural network according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a storage medium according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. 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 application.
The terms "first", "second" and "third" in this application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any indication of the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of the feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise. All directional indications (such as up, down, left, right, front, and rear … …) in the embodiments of the present application are only used to explain the relative positional relationship between the components, the movement, and the like in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indication is changed accordingly. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
Fig. 1 is a schematic flow chart of a data analysis method based on a neural network according to an embodiment of the present invention. It should be noted that the method of the present invention is not limited to the flow sequence shown in fig. 1 if the results are substantially the same. As shown in fig. 1, the method comprises the steps of:
step S101: and acquiring the actual price and the actual moving average price of the financial object at the latest sampling time interval of the preset number.
The financial target refers to a financial product in the financial market, including but not limited to stocks, securities, futures, foreign exchange and other financial products. In the present embodiment, the sampling time interval is set in advance, for example, one day, three days, one week, and the like. In view of the changing characteristics of the financial object trading market, the correlation between the trend of the price and the time series in the short time is significantly higher than the correlation between the trend of the price and the time series in the long time, and therefore, in the present embodiment, the sampling time interval is usually set to a short time, such as one day, 12 hours, 8 hours, and the like. The predetermined number is predetermined. E.g., 3, 5, 10, etc.
In step S101, when the prices of the financial objects in the future preset time need to be analyzed, the actual prices and the actual moving average prices collected in the latest preset number of sampling time intervals need to be obtained, for example, the sampling time intervals are taken as a day, and when data is obtained, the actual prices and the actual moving average prices of each day need to be obtained within 5 days before the current day. Where, in a general sense, the moving average price is the price of the material calculated by the SAP system according to the moving average method, and in a financial market, for example, a foreign exchange market, the moving average price may be the average closing price over the past N time periods. The actual price can be obtained by averaging the prices corresponding to each time point in the sampling time interval.
Step S102: an input variable is constructed from the sampling time interval, the actual price, and the actual moving average price.
In step S102, after a preset number of actual prices and actual moving average prices are obtained, an input variable having a strong time correlation is constructed according to the actual prices, the actual moving average prices, and the sampling time intervals, where the input variable includes not only the sampling time intervals but also the actual prices and the actual moving average prices that are collected in time sequence based on the sampling time intervals.
Further, in some embodiments, the step S102 specifically includes:
1. and acquiring the actual price and the actual moving average price corresponding to the sampling time intervals of the preset number.
2. And calculating the standard deviation of the actual price according to the actual price.
3. Constructing an input variable according to the actual moving average price, the actual price, the standard deviation and the sampling time interval, wherein the input variable is expressed as: wherein, X is an input variable, a first order difference representing the actual moving average price, a first order difference representing the actual price,representing the first order difference of the standard deviation, t representing the sampling time interval, and n representing the period of the sampling time interval.
Specifically, in the present embodiment, the input variables including the four parameters of the actual moving average price, the actual price, the standard deviation, and the sampling time interval are constructed, so that the correlation between the input variables and time is enhanced to a great extent, and more accurate analysis is facilitated based on the correlation between the input variables and time.
Step S103: and inputting the input variable into a pre-trained back propagation neural network model for analysis, and confirming the price trend of the financial subject matter in the future preset time according to the analysis result.
In step S103, after the input variable is acquired, the input variable is input into the trained back propagation neural network model for analysis, so as to obtain an analysis result, and then the price trend of the financial subject matter in the future preset time is determined according to the analysis result. Wherein, for the convenience of analysis and for ensuring the accuracy of analysis, the future preset time is preferably set to be the same as the sampling time interval.
Further, the price trend includes a moving average price trend of the financial subject matter for a preset time in the future.
Further, in step S103, determining a price trend of the financial object in a future preset time according to the analysis result, specifically including: comparing the analysis result with a preset trend variation range, wherein the preset trend variation range is preset; when the analysis result is higher than the maximum value of the preset trend variation range, confirming that the price of the financial object is in an ascending trend within the future preset time; when the analysis result is lower than the minimum value of the preset trend variation range, confirming that the price of the financial subject matter is in a descending trend within the preset time in the future; and when the analysis result is within the preset trend variation range, confirming that the price of the financial subject matter is in a stable trend within the preset time in the future.
Specifically, representing this price trend as D, then:
wherein d represents the analysis result, a represents the maximum value of the preset trend variation range, a represents the minimum value of the preset trend variation range, a represents the preset trend variation range, 1 represents the ascending trend, 0 represents the steady trend, and 1 represents the descending trend.
It should be noted that, in this embodiment, the back propagation neural network model is obtained by training in advance, and the back propagation neural network model is obtained by training in the following manner:
1. and constructing a training sample according to the pre-acquired historical price, the historical moving average price and the sampling time interval, and acquiring a historical actual price trend corresponding to the sampling time interval.
Specifically, a plurality of historical prices and historical moving average prices need to be obtained in advance, and a plurality of training samples are constructed by using the plurality of historical prices, the historical moving average prices and the sampling time interval, so as to ensure the preset precision of the back propagation neural network model training or meet the requirement of training the back propagation neural network model for preset times.
2. And inputting the training sample into a back propagation neural network model to be trained for analysis, and confirming the expected price trend of the fused object in the historical event section corresponding to the training sample according to the historical analysis result.
It should be noted that, a Back-ProPagation neural Network model (Back-ProPagation Network) continuously corrects a Network weight and a threshold value through training of sample data to enable an error function to descend along a negative gradient direction to approach an expected output, and the Back-ProPagation neural Network model is a neural Network model with wide application and is mainly used for function approximation, model identification and classification, data compression, time series prediction and the like. The back propagation neural network model is composed of an input layer, a hidden layer and an output layer, wherein the hidden layer can be composed of one or more layers.
And 3, reversely propagating and updating the reverse propagation neural network model by combining the expected price trend, the historical actual price trend and a preset loss function.
Specifically, the historical price trend is compared with the historical actual price trend, and the back propagation neural network model is updated according to the comparison result and the back propagation of the loss function.
In this embodiment, the back propagation neural network model is a machine learning model established based on a BP neural algorithm, and includes an input layer, a hidden layer, and an output layer, where the number of the hidden layers is at least two.
The input layer carries out normalization processing on input variables, and the calculation formula is as follows: wherein, aiFor the ith training sample, n is the total number of training samples, max () represents the maximum value, min () represents the minimum value, xiThe normalized ith training sample is obtained;
the formula for calculating the output value of the hidden layer is: wherein h isjFor the output value of the hidden layer, m represents the number of neurons in the input layer, m is less than or equal to n, wijIs the weight between the ith neuron of the input layer and the jth neuron of the hidden layer, thetajThe threshold value of the jth neuron of the hidden layer is f, and the number of the neurons of the hidden layer is f;
the calculation formula of the output value of the output layer is as follows: wherein, ykIs the output value of the output layer, wjkIs the weight between the jth neuron of the hidden layer and the kth neuron of the output layer, thetakIs the threshold of the kth neuron of the output layer, and g is the number of neurons of the output layer
In addition, m, g, and f satisfy the following relationship:
wherein b is a preset empirical constant.
Further, before constructing the training sample according to the pre-obtained historical price, the historical moving average price and the sampling time interval, the method further comprises the following steps: and performing data washing on the historical prices and the historical moving average prices.
Specifically, the cleaned object includes abnormal data in the historical price and the historical moving average price, for example, data whose value is clearly different from a normal value.
Step S104: and generating a trading strategy suggestion in the future preset time according to the price trend based on the brink trading method.
It should be noted that, taking the stock market as an example, the bouquet is a channel drawn by connecting points of the upward and downward standard deviations of the moving average, and the bouquet becomes wider during the period of high fluctuation rate, and becomes narrower during the period of low fluctuation rate, and the whole stock market transverse plate shows a low fan during the period of low fluctuation rate, and the bouquet shrinks toward the moving average.
In this embodiment, the analysis of the price trend is an ascending trend, a descending trend or a steady trend, and then a trading strategy suggestion in a future preset time is generated according to the analysis result based on the brink trading method.
Further, in some embodiments, the generating of the trading strategy suggestion in the future preset time according to the price trend based on the brink trading method specifically includes:
1. and when the price trend is an ascending trend, amplifying the set value of the brining according to a preset rule.
Specifically, when the price trend is an ascending trend, the prospect of the financial subject matter may be better, and in order to obtain more benefits, a more risky policy may be adopted to perform the transaction, so that the preset rule may be an amplification rule of the brink by amplifying the set value of the brink according to the preset rule, for example, different set values may be set according to the ascending amplitude in unit time, and the larger the ascending amplitude is, the larger the corresponding setting is.
2. And when the price trend is a descending trend, reducing the set value of the Braun strip according to a preset rule.
Specifically, when the price trend is a descending trend, the prospect of the financial subject matter may be poor, and in order to reduce the loss, a more conservative strategy may be adopted to perform the transaction, so that the preset rule may refer to a reduction rule of the brink belt by reducing the setting value of the brink belt according to the preset rule, for example, different setting values may be set according to the reduction range in unit time, and the larger the reduction range is, the larger the corresponding setting is.
3. And when the price trend is a stable trend, setting the set value of the afforestation belt as a preset conventional value according to a preset rule.
Specifically, when the price trend is a steady trend, the prospect of the financial subject matter does not change greatly, and the setting of the afforestation belt can be maintained according to the preset rule, and the setting value of the afforestation belt is set to a preset conventional value, such as 1 standard deviation interval.
In the embodiment, the trading strategy of the financial subject matter is automatically adjusted according to the price trend, so that the user is assisted to make rich trading strategies, the user is helped to obtain more benefits, and the benefit loss of the user is reduced.
Further, the embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The data analysis method based on the neural network in the embodiment of the invention constructs the input variables by utilizing the actual price, the actual moving average price and the sampling time interval which are collected based on the sampling time interval, not only considers the correlation between the price momentum of the financial object and the recent price, but also considers the correlation between the price momentum and the price sampling time price, and utilizes the input variables constructed according to the actual price, the actual moving average price and the sampling time interval and combines the pre-trained back propagation neural network model to carry out data analysis, so that the analysis result obviously approaches to the actual result, the trading strategy of the financial object is more perfect, and the trading strategy suggestion can be more reasonably provided for the user.
Fig. 2 is a functional block diagram of a data analysis apparatus based on a neural network according to an embodiment of the present invention. As shown in fig. 2, the data analysis apparatus 20 based on neural network includes an acquisition module 21, a construction module 22, an analysis module 23, and a generation module 24.
The acquisition module 21 is configured to acquire an actual price and an actual moving average price of the financial object at a latest preset number of sampling time intervals;
a construction module 22, configured to construct an input variable according to the sampling time interval, the actual price, and the actual moving average price;
the analysis module 23 is configured to input the input variable into a pre-trained back propagation neural network model for analysis, and determine a price trend of the financial object within a future preset time according to an analysis result;
and the generating module 24 is configured to generate a trading strategy suggestion in the future preset time according to the price trend based on a brink trading method.
Optionally, the neural network-based data analysis apparatus 20 further comprises a training module, and the training module is configured to: constructing a training sample according to the pre-acquired historical price, the historical moving average price and the sampling time interval, and acquiring a historical actual price trend corresponding to the sampling time interval; inputting the training sample into a back propagation neural network model to be trained for analysis, and confirming the expected price trend of the fused object in the historical event section corresponding to the training sample according to the historical analysis result; and updating the back propagation neural network model by combining the expected price trend, the historical actual price trend and the preset loss function back propagation.
Optionally, the back propagation neural network model comprises an input layer, a hidden layer and an output layer;
the input layer carries out normalization processing on input variables, and the calculation formula is as follows: wherein, aiFor the ith training sample, n is the total number of training samples, max () represents the maximum value, min () represents the minimum value, xiThe normalized ith training sample is obtained;
the formula for calculating the output value of the hidden layer is: wherein h isjFor the output value of the hidden layer, m represents the number of neurons in the input layer, m is less than or equal to n, wijIs the weight between the ith neuron of the input layer and the jth neuron of the hidden layer, thetajThe threshold value of the jth neuron of the hidden layer is f, and the number of the neurons of the hidden layer is f;
the calculation formula of the output value of the output layer is as follows: wherein, ykIs the output value of the output layer, wjkIs the weight between the jth neuron of the hidden layer and the kth neuron of the output layer, thetakIs the threshold of the kth neuron of the output layer, and g is the number of neurons of the output layer
Optionally, the operation performed by the building module 22 to build the input variable according to the sampling time interval, the actual price and the actual moving average price may be further: acquiring actual prices and moving average prices corresponding to a preset number of sampling time intervals; calculating the standard deviation of the actual price according to the actual price; constructing an input variable according to the moving average price, the actual price, the standard deviation and the sampling time interval, wherein the input variable is expressed as: wherein, X is an input variable, a first order difference representing the moving average price,a first order difference representing the actual price,representing the first order difference of the standard deviation, t representing the sampling time interval, and n representing the period of the sampling time interval.
Optionally, the operation performed by the generation module 24 to generate the trading strategy suggestions in the future preset time according to the price trends based on the brink trading method may be further: when the price trend is an ascending trend, amplifying the set value of the linen belt according to a preset rule; when the price trend is a descending trend, reducing the set value of the Braun belt according to a preset rule; and when the price trend is a stable trend, setting the set value of the afforestation belt as a preset conventional value according to a preset rule.
Optionally, before the training module performs the operation of constructing the training sample according to the pre-acquired historical price, the historical moving average price and the sampling time interval, the training module is further configured to: and performing data washing on the historical prices and the historical moving average prices.
Optionally, the price trend includes a moving average price trend of the financial subject matter over a preset time in the future.
For other details of the technical solution implemented by each module in the data analysis apparatus based on the neural network in the foregoing embodiment, reference may be made to the description in the data analysis method based on the neural network in the foregoing embodiment, and details are not repeated here.
It should be noted that, in the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other. For the device-like embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present invention. As shown in fig. 3, the computer device 30 includes a processor 31, a memory 32, and program instructions stored in the memory 32, which when executed by the processor 31, cause the processor 31 to perform the following steps:
acquiring the actual price and the actual moving average price of the financial object at the latest sampling time intervals of preset quantity;
constructing an input variable according to the sampling time interval, the actual price and the actual moving average price;
inputting the input variable into a pre-trained back propagation neural network model for analysis, and confirming the price trend of the financial subject matter in the future preset time according to the analysis result;
and generating a trading strategy suggestion in the future preset time according to the price trend based on the brink trading method.
The processor 31 may also be referred to as a CPU (Central Processing Unit). The processor 31 may be an integrated circuit chip having signal processing capabilities. The processor 31 may also be a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a storage medium according to an embodiment of the invention. A storage medium of an embodiment of the invention stores program instructions 41 that are capable of implementing all of the methods described above, the program instructions 41 when executed implement the steps of:
acquiring the actual price and the actual moving average price of the financial object at the latest sampling time intervals of preset quantity;
constructing an input variable according to the sampling time interval, the actual price and the actual moving average price;
inputting the input variable into a pre-trained back propagation neural network model for analysis, and confirming the price trend of the financial subject matter in the future preset time according to the analysis result;
and generating a trading strategy suggestion in the future preset time according to the price trend based on the brink trading method.
The program instructions 41 may be stored in the storage medium in the form of a software product, and include several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, or various media capable of storing program codes, or a computer device such as a computer, a server, a mobile phone, or a tablet.
In the several embodiments provided in the present application, it should be understood that the disclosed computer apparatus, device and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit. The above embodiments are merely examples and are not intended to limit the scope of the present disclosure, and all modifications, equivalents, and flow charts using the contents of the specification and drawings of the present disclosure or those directly or indirectly applied to other related technical fields are intended to be included in the scope of the present disclosure.
Claims (10)
1. A data analysis method based on a neural network is characterized by comprising the following steps:
acquiring the actual price and the actual moving average price of the financial object at the latest sampling time intervals of preset quantity;
constructing an input variable according to the sampling time interval, the actual price and the actual moving average price;
inputting the input variable into a pre-trained back propagation neural network model for analysis, and confirming the price trend of the financial subject matter in the future preset time according to the analysis result;
and generating a trading strategy suggestion in the future preset time according to the price trend based on a brink trading method.
2. The neural network-based data analysis method of claim 1, wherein the back propagation neural network model is trained by:
constructing a training sample according to the pre-acquired historical price, the historical moving average price and the sampling time interval, and acquiring a historical actual price trend corresponding to the sampling time interval;
inputting the training sample into a back propagation neural network model to be trained for analysis, and confirming the expected price trend of the financial subject matter in a historical event section corresponding to the training sample according to a historical analysis result;
and updating the back propagation neural network model by combining the expected price trend, the historical actual price trend and preset loss function back propagation.
3. The neural network-based data analysis method of claim 2, wherein the back-propagation neural network model comprises an input layer, a hidden layer, and an output layer;
the input layer normalizes the input variables, and the calculation formula is as follows:wherein, aiFor the ith training sample, n is the total number of training samples, max () represents the maximum value, min () represents the minimum value, xiThe normalized ith training sample is obtained;
the calculation formula of the output value of the hidden layer is as follows:j-0, 1,. 1, f-1; wherein h isjFor the output value of the hidden layer, m represents the number of neurons in the input layer, m is less than or equal to n, wijIs the weight between the ith neuron of the input layer and the jth neuron of the hidden layer, thetajThe threshold value of the jth neuron of the hidden layer is f, and the number of the neurons of the hidden layer is f;
the calculation formula of the output value of the output layer is as follows:k is 0, 1,. ang, g-1; wherein, ykIs the output value of the output layer, wjkIs the weight between the jth neuron of the hidden layer and the kth neuron of the output layer, thetakThe threshold value of the kth neuron of the output layer is g, and the number of the neurons of the output layer is g;
4. The neural network-based data analysis method of claim 1, wherein said constructing input variables from said sampling time interval, said actual prices, and said actual moving average prices comprises:
acquiring the actual prices and the actual moving average prices corresponding to a preset number of sampling time intervals;
calculating the standard deviation of the actual price according to the actual price;
constructing the input variable according to the actual moving average price, the actual price, the standard deviation and the sampling time interval, wherein the input variable is expressed as:
wherein X is the input variable,a first order difference representing the actual moving average price,a first order difference representing the actual price,represents a first order difference of the standard deviation, t represents the sampling time interval, and n represents a period of the sampling time interval.
5. The neural network-based data analysis method of claim 1, wherein the generating of the trading strategy suggestions within the future preset time according to the price trends based on the brink-based trading method comprises:
when the price trend is the rising trend, amplifying the set value of the brining belt according to a preset rule;
when the price trend is the descending trend, reducing the set value of the brining belt according to the preset rule;
and when the price trend is the stable trend, setting the set value of the greenbelt as a preset conventional value according to the preset rule.
6. The method of claim 2, wherein before constructing the training samples according to the pre-obtained historical prices, the historical moving average prices, and the sampling time interval, the method further comprises:
and performing data washing on the historical prices and the historical moving average prices.
7. The neural network-based data analysis method of claim 1, wherein the price trend comprises a moving average price trend of the financial subject matter over the preset time in the future.
8. A neural network-based data analysis apparatus, comprising:
the acquisition module is used for acquiring the actual price and the actual moving average price of the financial subject matter at the latest sampling time intervals of the preset number;
the construction module is used for constructing an input variable according to the sampling time interval, the actual price and the actual moving average price;
the analysis module is used for inputting the input variable into a pre-trained back propagation neural network model for analysis and confirming the price trend of the financial object in the future preset time according to the analysis result;
and the generating module is used for generating the trading strategy suggestions in the future preset time according to the price trend based on the brink trading method.
9. A computer device, characterized in that the computer device comprises a processor, a memory having stored therein program instructions which, when executed by the processor, cause the processor to carry out the steps of the neural network based data analysis method according to any one of claims 1-7.
10. A storage medium storing program instructions capable of implementing the neural network-based data analysis method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111094470.5A CN113919945A (en) | 2021-09-17 | 2021-09-17 | Data analysis method, device, equipment and storage medium based on neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111094470.5A CN113919945A (en) | 2021-09-17 | 2021-09-17 | Data analysis method, device, equipment and storage medium based on neural network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113919945A true CN113919945A (en) | 2022-01-11 |
Family
ID=79235460
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111094470.5A Pending CN113919945A (en) | 2021-09-17 | 2021-09-17 | Data analysis method, device, equipment and storage medium based on neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113919945A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115545790A (en) * | 2022-10-20 | 2022-12-30 | 北京宽客进化科技有限公司 | Price data prediction method and device, electronic equipment and storage medium |
WO2023159756A1 (en) * | 2022-02-22 | 2023-08-31 | 平安科技(深圳)有限公司 | Price data processing method and apparatus, electronic device, and storage medium |
-
2021
- 2021-09-17 CN CN202111094470.5A patent/CN113919945A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023159756A1 (en) * | 2022-02-22 | 2023-08-31 | 平安科技(深圳)有限公司 | Price data processing method and apparatus, electronic device, and storage medium |
CN115545790A (en) * | 2022-10-20 | 2022-12-30 | 北京宽客进化科技有限公司 | Price data prediction method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Tsantekidis et al. | Using deep learning to detect price change indications in financial markets | |
EP3992975A1 (en) | Compound property analysis method and apparatus, compound property analysis model training method, and storage medium | |
Cortez et al. | Modeling wine preferences by data mining from physicochemical properties | |
CN111967971B (en) | Bank customer data processing method and device | |
Du et al. | Exploration of financial market credit scoring and risk management and prediction using deep learning and bionic algorithm | |
Maknickienė et al. | Application of neural network for forecasting of exchange rates and forex trading | |
CN113919945A (en) | Data analysis method, device, equipment and storage medium based on neural network | |
Teng et al. | Customer credit scoring based on HMM/GMDH hybrid model | |
CN108875836B (en) | Simple-complex activity collaborative recognition method based on deep multitask learning | |
Hua | Bitcoin price prediction using ARIMA and LSTM | |
Panigrahi et al. | Effect of normalization techniques on univariate time series forecasting using evolutionary higher order neural network | |
Emir et al. | A stock selection model based on fundamental and technical analysis variables by using artificial neural networks and support vector machines | |
Güvenç et al. | Comparison of KNN and DNN classifiers performance in predicting mobile phone price ranges | |
Rizos et al. | Modelling sample informativeness for deep affective computing | |
Zhang et al. | Deep learning models for price forecasting of financial time series: A review of recent advancements: 2020–2022 | |
Chan et al. | A correlation-embedded attention module to mitigate multicollinearity: An algorithmic trading application | |
Biase et al. | On supervised learning to model and predict cattle weight in precision livestock breeding | |
Chen et al. | A fundamental analysis-based method for stock market forecasting | |
Jia et al. | A dendritic neuron model with nonlinearity validation on Istanbul stock and Taiwan futures exchange indexes prediction | |
Raipitam et al. | Comparative study on stock market prediction using generic CNN-LSTM and ensemble learning | |
Ni et al. | A self-organising mixture autoregressive network for FX time series modelling and prediction | |
Broström et al. | Exotic derivatives and deep learning | |
Wang et al. | Bayesian deep learning based exploration-exploitation for personalized recommendations | |
Gurav et al. | RNNLBL: A Recurrent Neural Network and Log Bilinear based Efficient Stock Forecasting Model | |
Soni et al. | Bitcoin price prediction-an analysis of various regression methods |
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 | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 40062565 Country of ref document: HK |