CN110782345A - Intelligent stock selection method based on market transaction big data - Google Patents

Intelligent stock selection method based on market transaction big data Download PDF

Info

Publication number
CN110782345A
CN110782345A CN201910924716.3A CN201910924716A CN110782345A CN 110782345 A CN110782345 A CN 110782345A CN 201910924716 A CN201910924716 A CN 201910924716A CN 110782345 A CN110782345 A CN 110782345A
Authority
CN
China
Prior art keywords
stock
model
training
intelligent
classification
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.)
Withdrawn
Application number
CN201910924716.3A
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.)
Mdt Infotech Ltd Hefei Hefei
Original Assignee
Mdt Infotech Ltd Hefei Hefei
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 Mdt Infotech Ltd Hefei Hefei filed Critical Mdt Infotech Ltd Hefei Hefei
Priority to CN201910924716.3A priority Critical patent/CN110782345A/en
Publication of CN110782345A publication Critical patent/CN110782345A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks

Abstract

The invention discloses an intelligent stock selection method based on market transaction big data, and relates to the technical field of financial investment. The invention comprises the following steps: step S01, stock data preprocessing; s02, designing an integral model structure and selecting a model training mode; s03, making an intelligent stock selection strategy; step S04, model training and retesting experiments. The invention classifies according to the price fluctuation range of the stocks, constructs the LSTM neural network as a classification model, and outputs a prediction result through the classification model, so that the price interval estimation of each stock can be obtained, and the stock selection is intelligently guided; establishing an intelligent stock selection strategy on the basis of the stock price classification prediction model result; the method has high accuracy and can obtain high benefit for the user.

Description

Intelligent stock selection method based on market transaction big data
Technical Field
The invention belongs to the technical field of financial investment, and particularly relates to an intelligent stock selection method based on market trading big data, which can realize stock price prediction and intelligent stock selection by utilizing a deep recurrent neural network.
Background
The financial industry refers to a special industry for operating financial commodities, and includes banking, insurance, trust, securities, and rental industries. In the current market environment, the biggest problem in the investment process of scattered households is information asymmetry, and cost is required for acquiring real information, so that the scattered households often rely on cost-free 'small track messages' rather than scientific technical analysis. Stock price prediction is used for predicting future trends (ultra-short line, short and medium-term) of each stock every day, the predicted contents comprise future rising probability, rising amplitude, falling probability, falling amplitude, short and medium-term trend and industry rising trend and falling trend of the stocks, and a user can find out that the stocks and the industries are likely to rise through a large amount of prediction data provided every day.
The invention mainly studies stock price prediction in the financial field; stock price prediction is to make a prediction on the direction and possibility of future tendency of stocks by using stock morphological analysis theory, the theoretical basis is to search the same or similar trend with the current trend of a certain stock from massive historical data, and judge the future stock price according to the historical trend.
Disclosure of Invention
The invention aims to provide an intelligent stock selection method based on market trading big data, which comprises the steps of preprocessing stock historical data, using an LSTM neural network as a classifier, training a model to predict a test set, completing a stock classification task, making a proper stock selection strategy, and finally performing a return test experiment on the test set, so that the problems of difficult stock selection and low stock income are solved.
In order to solve the technical problems, the invention is realized by the following technical scheme:
the invention relates to an intelligent stock selection method based on market transaction big data, which comprises the following steps:
step S1, stock data preprocessing: selecting an explanation variable, a response variable, a division training set, a verification set and a test set from historical stock data;
step S2, designing an integral model structure and selecting a model training mode: selecting a sub-industry training mode and designing an integral model structure;
step S3, making an intelligent stock selection strategy: making a proper stock selection strategy and loss stopping operation according to the prediction result of the classification model;
step S4, model training and retest experiment: training a four-classification LSTM model by using a training set, and performing a retest experiment by using a test set according to an intelligent stock selection strategy;
in step S3, the intelligent stock selection policy includes the following steps:
step S31: training and predicting separately according to industries, and outputting a probability value predicted as a stock with larger amplitude on a test set by stocks in each industry every day;
step S32: sorting the stocks to be recommended according to the size of the probability value of stock prediction;
step S33: adding a loss-stopping strategy, and canceling the recommendation of the stock when the stock continuously drops to a threshold value;
step S34: and only selecting the four-classification models which are predicted to have larger amplitude in stock selection.
Preferably, in the step S1, the stock data preprocessing includes constructing an interpretation variable, a response variable, and dividing a training set, a validation set, and a test set;
the construction explanatory variables are used for searching key factors influencing the stock price change by calculating 17 technical indexes of the previous 20 days; the construction response variable is used for stock classification by calculating the rise and fall amplitude of the stock price of the next trading day relative to the price of the current day; the stocks are divided into 4 types according to price fluctuation, namely four types of large fluctuation (the fluctuation is higher than a, a is more than 3 per thousand), small fluctuation (the fluctuation is between 3 per thousand and a, a is more than 3 per thousand), small fluctuation (the fluctuation is between b and 3 per thousand, b is less than 3 per thousand) and large fluctuation (the fluctuation is lower than b, b is less than 3 per thousand); the division of the training set, the validation set and the test set is realized by dividing data into 72%, 8% and 20% data sets in proportion.
Preferably, in the step S2, the training mode is industry-based training for putting the stock data of the same industry together for training to obtain a prediction model, and then using the model to predict the price fluctuation classification of the next day of the single stock in the industry; the prediction model is a long-short term memory network (LSTM) model.
Preferably, in step S4, the survey experiment sets the initial fund to 2600 yuan, and the fund is bought into stock and large plate respectively under the stock-selecting strategy, and the results of the two are compared to obtain a survey image.
The invention has the following beneficial effects:
the invention pre-processes the stock history data, uses the LSTM neural network as a classifier, trains a model to predict a test set, completes the stock classification task, makes a proper stock selection strategy, and finally performs a retest experiment on the test set, improves the precision rate of stock classification, provides an intelligent stock selection method, and enables users to obtain higher income.
Of course, it is not necessary for any product in which the invention is practiced to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of an intelligent stock selection method based on market trading big data according to the present invention;
FIG. 2 is a diagram of the correspondence between explanatory variables and response variables of the present invention;
FIG. 3 is a diagram of an LSTM neural network used in the present invention;
FIG. 4 is a diagram showing the results of the back test of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
Referring to fig. 1, the present invention is an intelligent stock selection method based on market transaction big data, including the following steps:
step S1, stock data preprocessing: selecting an explanation variable, a response variable, a division training set, a verification set and a test set from historical stock data; explanatory variables such as RSI (relative strength index), TRIX (mean smoothness of triple index, etc.) for finding key factors affecting stock price change;
step S2, designing an integral model structure and selecting a model training mode: selecting an industry-divided training mode, and designing an integral model structure, wherein the model structure can be a three-layer LSTM network structure or a four-layer LSTM network structure;
step S3, making an intelligent stock selection strategy: making a proper stock selection strategy and loss stopping operation according to the prediction result of the classification model;
step S4, model training and retest experiment: training a four-classification LSTM model by using a training set, and performing a retest experiment by using a test set according to an intelligent stock selection strategy;
in step S3, the intelligent stock selection policy includes the following steps:
step S31: training and predicting separately according to industries, and outputting a probability value predicted as a stock with larger amplitude on a test set by stocks in each industry every day;
step S32: sorting the stocks to be recommended according to the size of the probability value of stock prediction;
step S33: adding a loss stopping strategy, and canceling the recommendation of a stock when the stock falls to ten percent within three days;
step S34: and only selecting the four-classification models which are predicted to have larger amplitude in stock selection.
In step S1, stock data preprocessing includes constructing an explanatory variable, a response variable, and dividing a training set, a verification set, and a test set;
please refer to fig. 2, in which the technical index of the current day 20 is selected as an explanatory variable, and the category corresponding to the rise of the price of the stock of the next transaction day relative to the price of the current day is used as a response variable, so as to intuitively depict the time correspondence between the explanatory variable and the response variable.
Wherein, the construction explanatory variable is used for searching key factors influencing the stock price change by calculating 17 technical indexes of the previous 20 days; constructing response variables for stock classification by calculating the rise and fall amplitude of the stock price of the next trading day relative to the price of the current day; the stocks are divided into 4 types according to price fluctuation, namely four types of large fluctuation (the fluctuation is higher than a, a is more than 3 per thousand), small fluctuation (the fluctuation is between 3 per thousand and a, a is more than 3 per thousand), small fluctuation (the fluctuation is between b and 3 per thousand, b is less than 3 per thousand) and large fluctuation (the fluctuation is lower than b, b is less than 3 per thousand); the training set, validation set, and test set were partitioned by dividing the data into 72%, 8%, and 20% data sets in proportion.
In step S2, the training mode is industry-based training for training stock data of the same industry together to obtain a prediction model, and then the model is used to predict price fluctuation classes of individual stocks in the industry on the next day; the prediction model is a long-term and short-term memory network LSTM model;
referring to fig. 3, the stock price fluctuation classification prediction adopts a three-layer LSTM neural network, and the accuracy rate and precision rate of the classification prediction are higher than those of two comparison models, i.e., GRU and Logistic regression;
the LSTM is a long-short term memory network, is a time recursive neural network, and is suitable for processing and predicting important events with relatively long intervals and delays in a time sequence; here, three advantages of LSTM are listed:
(1) the problem of disappearance of RNN gradient is solved;
(2) the model solves the long-term dependence problem through the deliberate design;
(3) the structure of a forgetting gate discards information which does not conform to the algorithm authentication.
The LSTM as a variant of RNN has excellent performance in a plurality of fields such as translation, speech recognition and the like, so the LSTM network is selected as one of the reasons of comparison models.
Referring to fig. 4, when a retest experiment is performed again, 50 stock retest results in the financial industry are selected for display, the initial fund is set to 2600 yuan, the black line represents a fund curve obtained by selecting 50 stocks in the financial industry according to the intelligent stock selection strategy, the gray line represents a large disc index curve, and the comparison result shows that the intelligent stock selection has a large profit under the condition of good large disc shape and does not have much loss under the condition of large disc shape potential difference.
It should be noted that, in the above system embodiment, each included unit is only divided according to functional logic, but is not limited to the above division as long as the corresponding function can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
In addition, it is understood by those skilled in the art that all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing associated hardware, and the corresponding program may be stored in a computer-readable storage medium.
The preferred embodiments of the invention disclosed above are intended to be illustrative only. The preferred embodiments are not intended to be exhaustive or to limit the invention to the precise embodiments disclosed. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the invention and the practical application, to thereby enable others skilled in the art to best utilize the invention. The invention is limited only by the claims and their full scope and equivalents.

Claims (4)

1. An intelligent stock selection method based on market transaction big data is characterized by comprising the following steps:
step S1, stock data preprocessing: selecting an explanation variable, a response variable, a division training set, a verification set and a test set from historical stock data;
step S2, designing an integral model structure and selecting a model training mode: selecting a sub-industry training mode and designing an integral model structure;
step S3, making an intelligent stock selection strategy: making a proper stock selection strategy and loss stopping operation according to the prediction result of the classification model;
step S4, model training and retest experiment: training a four-classification LSTM model by using a training set, and performing a retest experiment by using a test set according to an intelligent stock selection strategy;
in step S3, the intelligent stock selection policy includes the following steps:
step S31: training and predicting separately according to industries, and outputting a probability value predicted as a stock with larger amplitude on a test set by stocks in each industry every day;
step S32: sorting the stocks to be recommended according to the size of the probability value of stock prediction;
step S33: adding a loss-stopping strategy, and canceling the recommendation of the stock when the stock continuously drops to a threshold value;
step S34: and only selecting the four-classification models which are predicted to have larger amplitude in stock selection.
2. The intelligent stock selection method based on market transaction big data as claimed in claim 1, wherein in the step S1, stock data preprocessing includes constructing an explanatory variable, a response variable and dividing a training set, a verification set and a test set;
the construction explanatory variables are used for searching key factors influencing the stock price change by calculating 17 technical indexes of the previous 20 days; the construction response variable is used for stock classification by calculating the rise and fall amplitude of the stock price of the next trading day relative to the price of the current day; the division of the training set, the validation set and the test set is realized by dividing data into 72%, 8% and 20% data sets in proportion.
3. The method according to claim 1, wherein in step S2, the training mode is industry-divided training for training stock data of the same industry together to obtain a prediction model, and then the model is used to predict price fluctuation classification of the next day of individual stocks in the industry; the prediction model is a long-short term memory network (LSTM) model.
4. The method as claimed in claim 1, wherein in step S4, the survey experiment sets initial fund to 2600 yuan, and the fund is bought into stock and large disc under the stock strategy, and the survey image is obtained by comparing the result of the two.
CN201910924716.3A 2019-09-27 2019-09-27 Intelligent stock selection method based on market transaction big data Withdrawn CN110782345A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910924716.3A CN110782345A (en) 2019-09-27 2019-09-27 Intelligent stock selection method based on market transaction big data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910924716.3A CN110782345A (en) 2019-09-27 2019-09-27 Intelligent stock selection method based on market transaction big data

Publications (1)

Publication Number Publication Date
CN110782345A true CN110782345A (en) 2020-02-11

Family

ID=69384685

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910924716.3A Withdrawn CN110782345A (en) 2019-09-27 2019-09-27 Intelligent stock selection method based on market transaction big data

Country Status (1)

Country Link
CN (1) CN110782345A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112884576A (en) * 2021-02-02 2021-06-01 上海卡方信息科技有限公司 Stock trading method based on reinforcement learning
CN113590659A (en) * 2021-07-22 2021-11-02 上海汇正财经顾问有限公司 Data classification processing-based stock selection control method, device and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112884576A (en) * 2021-02-02 2021-06-01 上海卡方信息科技有限公司 Stock trading method based on reinforcement learning
CN113590659A (en) * 2021-07-22 2021-11-02 上海汇正财经顾问有限公司 Data classification processing-based stock selection control method, device and system
CN113590659B (en) * 2021-07-22 2023-12-05 上海汇正财经顾问有限公司 Stock selection control method, device and system based on data classification processing

Similar Documents

Publication Publication Date Title
Hájek et al. Forecasting corporate financial performance using sentiment in annual reports for stakeholders’ decision-making
Souma et al. Enhanced news sentiment analysis using deep learning methods
Honegger Shedding light on black box machine learning algorithms: Development of an axiomatic framework to assess the quality of methods that explain individual predictions
Swicegood et al. Off‐site monitoring systems for predicting bank underperformance: a comparison of neural networks, discriminant analysis, and professional human judgment
De Andrés et al. Bankruptcy forecasting: A hybrid approach using Fuzzy c-means clustering and Multivariate Adaptive Regression Splines (MARS)
Bao et al. Intelligent stock trading system by turning point confirming and probabilistic reasoning
Ni et al. Exchange rate prediction using hybrid neural networks and trading indicators
CN104781837B (en) System and method for forming predictions using event-based sentiment analysis
CN112215604B (en) Method and device for identifying transaction mutual-party relationship information
Oh et al. Using change-point detection to support artificial neural networks for interest rates forecasting
Fonseca et al. A two-stage fuzzy neural approach for credit risk assessment in a Brazilian credit card company
Chaudhuri Modified fuzzy support vector machine for credit approval classification
Siering " Boom" or" Ruin"--Does It Make a Difference? Using Text Mining and Sentiment Analysis to Support Intraday Investment Decisions
Sun et al. Financial distress prediction based on similarity weighted voting CBR
CN110782345A (en) Intelligent stock selection method based on market transaction big data
Bai et al. C2P2: a collective cryptocurrency up/down price prediction engine
Díaz et al. Machine learning and statistical techniques. An application to the prediction of insolvency in Spanish non-life insurance companies
Hansson Evolution of topics in central bank speech communication
Haryono et al. Aspect-based sentiment analysis of financial headlines and microblogs using semantic similarity and bidirectional long short-term memory
Khademolqorani et al. A hybrid analysis approach to improve financial distress forecasting: Empirical evidence from Iran
Saboor et al. Predicting the stock market using machine learning: Long short-term memory
Wimmer et al. Leveraging vision-language models for granular market change prediction
Bunker et al. Improving a credit scoring model by incorporating bank statement derived features
Zhukov et al. A stochastic dynamics model for shaping stock indexes using self-organization processes, memory and oscillations
Windsor The intellectual ideas inside central banks: what's changed (or not) since the crisis?

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200211