Stock price prediction computer system based on big data
Through big data analysis and deep learning modules, combined with natural language processing and time series analysis, the interaction problems between data integration and market events in the existing technology are solved, and the accuracy and responsiveness of stock price predictions are improved, which is suitable for high volatility market.
Patent Information
- Application Number
- CN202411094370.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-13
AI Technical Summary
The existing technology is difficult to effectively integrate data from different channels and cannot capture the complex interactions between market events, limiting the accuracy of stock price prediction and the application effect in a highly volatile market environment.
Using a big data-based stock price prediction computer system, including data acquisition unit, data processing unit and prediction model unit, uses natural language processing and deep learning modules to collect and analyze financial news, social media and market data in real time, combined with time series analysis and long and short-term memory networks, generate stock price predictions, and adjust the prediction results through event weighting and sentiment analysis.
It realizes effective integration of multiple data sources and in-depth analysis of complex relationships in market events, improving the accuracy and responsiveness of stock price predictions, especially in a highly volatile market environment, which can provide timely market insights and investment decision support. .
Smart Images

Figure CN119130655A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of financial technology, and in particular to a stock price prediction computer system based on big data. Background Art
[0002] In modern financial markets, accurately predicting stock prices is extremely important for investors. The success of investment decisions often depends on understanding market dynamics and accurately predicting future price changes. With the rapid development of information technology, the application of technologies such as big data analysis, natural language processing, and machine learning in stock market forecasting has become increasingly common. Through these technologies, analysts can extract valuable information from large amounts of data to support more complex investment strategies.
[0003] In the prior art, a variety of systems and methods have been developed to analyze financial news, social media comments, and historical trading data to predict future stock trends. These systems usually rely on traditional statistical models or basic machine learning algorithms to process data and generate predictions. However, these methods often process data sources in a single way and lack in-depth analysis of the complex relationships between data.
[0004] Although existing technologies provide certain predictive capabilities, they still have obvious limitations. In particular, in terms of processing and interpreting large-scale real-time data, existing systems often fail to effectively integrate data from different channels and have difficulty capturing the complex interactions between market events, which limits the application of predictive models in highly volatile market environments. In addition, existing technologies often perform poorly in predicting market trends driven by multiple related events and cannot provide sufficiently in-depth market insights. Summary of the invention
[0005] In view of the deficiencies of the prior art, the present invention provides a stock price prediction computer system based on big data, which solves the problem that traditional systems are often unable to effectively integrate data from different channels and have difficulty in capturing the complex interactions between market events.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a stock price prediction computer system based on big data, comprising:
[0007] a data collection unit configured to collect data from financial news, social media, and financial market databases in real time;
[0008] a data processing unit configured to analyze the collected data through natural language processing techniques and extract event and sentiment scores;
[0009] a forecasting model unit, comprising a time series analysis module and a deep learning module, wherein the time series analysis module is configured to generate forecasts based on historical price data, and the deep learning module is configured to process nonlinear characteristics of the time series data;
[0010] The output unit is configured to integrate the outputs of the time series analysis and deep learning modules, and consider the weights of the events and the sentiment analysis results to adjust the final stock price prediction.
[0011] Preferably, the data collection unit is configured with multiple API interfaces for exchanging data with different financial news websites, social media platforms and financial market databases to obtain financial news, social media trends and stock trading data in real time, and the data collection unit further includes a real-time data buffer for temporarily storing the acquired data for subsequent processing.
[0012] Preferably, the data processing unit uses a pre-trained natural language processing model based on a transformer architecture to perform semantic understanding and sentiment analysis of the text, wherein the model is trained to identify finance-related entities and events, and numerically represent key information and sentiment tendencies in the text data, wherein the sentiment score S(t) is calculated by analyzing the vocabulary and syntactic structure in the text.
[0013] Preferably, the time series analysis module specifically adopts an autoregressive integrated moving average model, the parameters φp, θq, c of which are optimized and configured through statistical analysis of historical stock data, for predicting short-term fluctuations in stock prices, and the module includes a model training subunit for periodically retraining the model to adapt to market changes.
[0014] Preferably, the deep learning module specifically adopts a long short-term memory network, which is configured to receive an input sequence X processed by the time series analysis module. t , and outputs predictions for future stock prices. In addition, the deep learning module includes a network training subunit for automatically updating network weights when new market data is received.
[0015] Preferably, the output unit is further configured to calculate the final stock price forecast based on the output results of the comprehensive model, specifically including weighted fusion of the output results of the autoregressive integrated moving average model and the long short-term memory network model, wherein the weights α, β are automatically optimized by the system to maximize the forecast accuracy, and are dynamically adjusted according to the influence and sentiment score of the market event to improve the responsiveness and accuracy of the forecast.
[0016] Preferably, the forecasting model unit may weight the market event W iIt is calculated by weighting the impact of the event's historical data on stock prices and the credibility of the event release source, and the event sentiment score S i Derived through a natural language processing model in the data processing unit and used to adjust stock price predictions.
[0017] Preferably, the forecasting model unit is configured with a parameter self-adjustment mechanism for automatically adjusting the operating parameters α, β, γ of the autoregressive integrated moving average model and the long short-term memory network model when stock market conditions change or abnormal market data are received, so as to maintain the efficiency and accuracy of the forecasting model.
[0018] Preferably, the output unit further comprises a user interface which displays historical data of stock prices, real-time forecasts and visual analysis of the impact of market events, and through which the user can adjust the viewing time range and parameter settings of the forecasting model.
[0019] Preferably, the system further comprises a monitoring module, which is responsible for monitoring and recording the occurrence of all market-related events and the predictive performance of the system, for retrospective analysis of system performance and improvement of future predictive models.
[0020] Working Principle: Data Collection Unit, the core function of this unit is to collect data from financial news, social media and financial market databases in real time. Through API interface connection with major data sources, the system can obtain the latest market dynamics, economic indicators and public sentiment information. The data collection unit also includes a real-time data buffer, which temporarily stores the received data for preliminary formatting and classification processing to ensure the quality and integrity of the data before further processing. Data Processing Unit, this unit uses pre-trained natural language processing models based on transformer architecture, such as BERT, to perform semantic understanding and sentiment analysis of text. The model analyzes the text transmitted from the data collection unit, extracts key financial events and sentiment tendencies, and digitizes these text information. For example, a financial report release may be identified as a positive event, while a corporate scandal may be marked as negative. The sentiment score is calculated by analyzing the vocabulary and syntactic structure in the text, which provides quantitative data about market sentiment for the prediction model. Prediction Model Unit, this unit contains two main modules: time series analysis module and deep learning module. The time series analysis module uses the autoregressive integrated moving average (ARIMA) model to predict short-term price changes based on historical stock price data. The module is retrained regularly to adapt to market changes. The deep learning module uses a long short-term memory network (LSTM), which processes the input sequence processed by the time series analysis and is able to consider the weight of the event and the results of sentiment analysis. The LSTM network automatically updates the network weights when receiving new market data, improving the accuracy and adaptability of the prediction. The output unit is responsible for synthesizing the output results of the time series analysis and deep learning modules, and dynamically adjusting them according to the influence and sentiment scores of market events to generate the final stock price prediction. The unit includes a user interface through which users can view historical stock price data, real-time predictions, and impact analysis of market events. Users can also adjust the parameter settings of the prediction model through the interface to adapt to personal analysis needs. Monitoring module The system also includes a monitoring module responsible for monitoring and recording the occurrence of all market-related events and the prediction performance of the system. This module helps to conduct retrospective analysis of system performance and improve future prediction models to ensure that the system can be continuously optimized and adapt to market changes.
[0021] The present invention provides a stock price prediction computer system based on big data.
[0022] Beneficial effects:
[0023] 1. The present invention can comprehensively analyze and predict stock prices by comprehensively utilizing multiple data sources, including financial news, social media, real-time transaction data, etc., combined with advanced natural language processing technology and machine learning models. This method of comprehensive utilization of big data greatly improves the accuracy of predictions, enabling investors to make investment decisions based on more reliable data.
[0024] 2. Through event-driven models and graph neural network technology, the system can deeply analyze the impact of market events and the complex relationships between events. This not only improves the understanding of the impact of a single event, but also enables the system to predict multiple related events and how they jointly affect the trend of the stock market.
[0025] 3. The system of the present invention can process and analyze a large amount of data collected from different channels in real time, ensuring that investors can obtain market dynamics and stock price changes in real time. This real-time analysis function is crucial for quickly responding to market changes and adjusting investment strategies in a timely manner, especially in a highly volatile market environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is the main framework diagram of the present invention;
[0027] Figure 2 It is a flow chart of the data acquisition unit of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] Example:
[0030] Please see attached Figure 1 - Attachment Figure 2 , an embodiment of the present invention provides a stock price prediction computer system based on big data, comprising:
[0031] a data collection unit configured to collect data from financial news, social media, and financial market databases in real time;
[0032] a data processing unit configured to analyze the collected data through natural language processing techniques and extract event and sentiment scores;
[0033] a forecasting model unit, comprising a time series analysis module and a deep learning module, wherein the time series analysis module is configured to generate forecasts based on historical price data, and the deep learning module is configured to process nonlinear characteristics of the time series data;
[0034] The output unit is configured to integrate the outputs of the time series analysis and deep learning modules, and consider the weights of the events and the sentiment analysis results to adjust the final stock price prediction.
[0035] Data acquisition unit
[0036] The data collection unit is responsible for collecting data about the stock market in real time from a variety of online data sources, including financial news, social media information, and real-time trading data. In order to perform this task efficiently, the system connects to major financial news websites and social media platforms such as Twitter and Facebook through an application program interface, and subscribes to financial market database services to obtain real-time trading data. The data collection unit is also equipped with a high-performance data buffer that can handle large amounts of data streams and perform preliminary formatting, such as unifying timestamps and classifying data, to ensure that the data maintains its integrity and accuracy before being passed to subsequent processing units.
[0037] Data processing unit
[0038] In the data processing unit, the system uses advanced natural language processing technology to analyze the collected text data. This unit deploys a pre-trained model based on the Transformer deep learning model architecture to parse key information in financial news and social media content, including market-related events and sentiment tendencies. Specifically, after the text data is processed by the model, it can be converted into sentiment scores and event labels, which will be used as input variables for subsequent prediction models. This step is crucial because it directly affects the input quality of the prediction model and the accuracy of subsequent predictions.
[0039] Prediction Model Unit
[0040] The forecasting model unit combines statistics and machine learning techniques to predict stock prices. Specifically, time series analysis processes historical data of stock prices through an autoregressive moving average model to identify trends and periodicity in price changes. The parameters of the model, such as the coefficients of the autoregressive term and the moving average term, are optimized and configured through historical data. At the same time, the long short-term memory network in the deep learning module processes the event labels and sentiment scores output by the data processing unit. These data contain information about market sentiment and the impact of events, which are particularly critical for predicting price fluctuations in the short term. The long short-term memory network can learn and remember long-term dependencies and is an indispensable part of predicting stock prices.
[0041] Output unit
[0042] The main task of the output unit is to combine the prediction results from the autoregressive moving average model and the long short-term memory network to form the final stock price forecast. The unit uses a weighted average method, where the weight parameters are optimized through backtesting of actual market data to ensure the accuracy of the prediction results. The output unit is also responsible for presenting the prediction results on the user interface, including the predicted value of the stock price, related market events, and the confidence interval of the prediction model. Users can use this information to make more informed investment decisions.
[0043] In this embodiment, the design of the entire system takes into account efficiency and practicality. Each step from the data acquisition unit to the data processing unit and then to the prediction model unit is carefully designed to ensure efficient transmission and processing of data streams. The system also includes a performance monitoring module to monitor the operating status of each unit in real time to ensure the stability of the system and the accuracy of the prediction. In addition, the system regularly undergoes performance evaluation and model adjustment to cope with changes in the market environment and ensure that the prediction model maintains high performance in the long term.
[0044] In a preferred embodiment, event relations and the application of graph neural networks
[0045] In this preferred embodiment, the system enhances the understanding and analysis of the relationship between market events by introducing graph neural networks, thereby improving the accuracy of stock price prediction. This approach allows the system to not only analyze the impact of a single event, but also understand the interactions and network effects between multiple events.
[0046] Framework setting of graph neural network
[0047] Definition of event node:
[0048] In the graph, each market event is considered a node. The characteristics of the node include the type of event, relevance, impact range, duration, and sentiment score.
[0049] Node features also include key information extracted from relevant news or social media, such as keywords and related practices.
[0050] Definition of edge:
[0051] The edges between event nodes represent the relationships between events, which may be causal, temporal, or impact relationships.
[0052] The weight of an edge is determined by the temporal proximity, content similarity, and historical impact data between events.
[0053] Graph construction and update:
[0054] As new events occur, the system continuously updates the graph structure, adding new nodes and edges while adjusting the weights of existing edges.
[0055] The update frequency and structural adjustment of the graph are based on real-time data streams to ensure that the model reflects the latest market dynamics.
[0056] Data processing and training of graph neural networks
[0057] Feature extraction:
[0058] Use natural language processing technology to extract features of event text, such as the embedding vector output by the natural language processing model.
[0059] Combined with other quantitative information of the event, a comprehensive feature vector is formed.
[0060] Message passing mechanism:
[0061] Graph convolutional network or graph attention network is used as the basic graph neural network structure.
[0062] The node status is updated through message passing between nodes, and the update of each node takes into account the information of its neighbor nodes and the weight of the edges.
[0063] Model training and optimization:
[0064] The graph neural network is trained using a supervised learning method with the goal of minimizing the error between the predicted price and the actual price.
[0065] Cross-validation and early stopping techniques are used to prevent overfitting and ensure the generalization ability of the model.
[0066] Ensemble of prediction models
[0067] Integration into the main prediction framework:
[0068] The output of the graph neural network model is used as feature input to the main stock price prediction model combined with the self-regression moving average model and the long short-term memory network model.
[0069] The results of the event graph analysis provide in-depth information about the interactions of market events, helping to improve time series forecasts of stock prices.
[0070] Dynamic adjustment and optimization:
[0071] Dynamically adjust the parameters of nodes and edges in the graph model based on market reactions and forecast results.
[0072] Combined with real-time market data feedback, event weights and impact assessments are optimized to ensure the timeliness and accuracy of the forecasting model.
[0073] The data collection unit is configured with multiple API interfaces for exchanging data with different financial news websites, social media platforms and financial market databases to obtain financial news, social media trends and stock trading data in real time, and the data collection unit further includes a real-time data buffer for temporarily storing the acquired data for subsequent processing.
[0074] The data processing unit uses a pre-trained natural language processing model based on the transformer architecture to perform semantic understanding and sentiment analysis of text. The model is trained to identify finance-related entities and events, and to numerically represent key information and sentiment tendencies in text data. The sentiment score S(t) is calculated by analyzing the vocabulary and syntactic structure in the text.
[0075] The time series analysis module specifically adopts an autoregressive integrated moving average model, whose parameters φp, θq, c are optimized and configured through statistical analysis of historical stock data to predict short-term fluctuations in stock prices. The module also includes a model training subunit for periodically retraining the model to adapt to market changes.
[0076] The deep learning module specifically uses a long short-term memory network, which is configured to receive the input sequence X processed by the time series analysis module t , and outputs predictions for future stock prices. In addition, the deep learning module includes a network training subunit for automatically updating network weights when new market data is received.
[0077] The output unit is further configured to calculate the final stock price prediction based on the output results of the comprehensive model, specifically including weighted fusion of the output results of the autoregressive integrated moving average model and the long short-term memory network model, where the weights α, β are automatically optimized by the system to maximize the prediction accuracy, and dynamically adjusted according to the influence and sentiment score of the market event to improve the responsiveness and accuracy of the prediction.
[0078] The prediction model unit can weight the market event W i It is calculated by weighting the impact of the event's historical data on stock prices and the credibility of the event release source, and the event sentiment score S i Derived through a natural language processing model in the data processing unit and used to adjust stock price predictions.
[0079] The forecasting model unit is configured with a parameter self-adjustment mechanism, which is used to automatically adjust the operating parameters α, β, γ of the autoregressive integrated moving average model and the long short-term memory network model when stock market conditions change or abnormal market data are received, so as to maintain the efficiency and accuracy of the forecasting model.
[0080] The output unit further includes a user interface that displays historical data of stock prices, real-time forecasts, and visual analysis of the impact of market events, through which the user can adjust the viewed time range and parameter settings of the forecast model.
[0081] The system further includes a monitoring module, which is responsible for monitoring and recording the occurrence of all market-related events and the system's forecasting performance for retrospective analysis of system performance and improvement of future forecasting models.
[0082] In a preferred embodiment, combined with an enhanced event-driven model
[0083] Enhanced event recognition and analysis
[0084] In the data processing unit, the enhanced event-driven model first conducts an in-depth analysis of the collected text data. A Transformer-based pre-trained model is used to perform preliminary parsing of the text to identify key market events and their attributes, such as event type, related stocks, impact scope, and duration. For each identified event, the model further performs sentiment analysis to assess its potential impact on the market.
[0085] Event Relationships and Graph Neural Networks
[0086] Each event not only considers its impact independently, but also needs to evaluate its relationship with other events, which is achieved through graph neural networks. Graph neural networks are able to handle complex relationships between events, such as interactions and impact propagation. For example, a policy change may affect multiple industries, and graph neural networks can help understand this multi-level impact structure.
[0087] In the forecasting model unit, the enhanced event-driven model will be integrated with the autoregressive moving average model and the long short-term memory network model to form a composite forecasting framework. The specific integration method is as follows:
[0088] Event Impact Rating:
[0089] Each event Ei is scored based on its sentiment score Si and historical impact data Hi;
[0090] Ei=λ×Si+(1-λ)×Hi
[0091] Where λ is a regulation factor used to balance the weights of sentiment analysis and historical influence.
[0092] Event impacts integrated into prediction models:
[0093] The ARIMA model is responsible for handling the historical trends of stock prices, while the LSTM model handles the nonlinear dependencies and dynamic effects of events in the time series:
[0094] PLSTM (t) = LSTM(X t ,E)
[0095] Where X t is the time series input, and E is the set of all event impact scores.
[0096] Final prediction output:
[0097] Combining the outputs of ARIMA and LSTM, and weighting the analysis results of the event-driven model:
[0098]
[0099] Among them, α, β, and γ are weight parameters optimized by data-driven methods to maximize the accuracy and responsiveness of the prediction.
[0100] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A computer system for predicting stock prices based on big data, characterized in that: include: a data collection unit configured to collect data from financial news, social media, and financial market databases in real time; a data processing unit configured to analyze the collected data through natural language processing techniques and extract event and sentiment scores; a forecasting model unit, comprising a time series analysis module and a deep learning module, wherein the time series analysis module is configured to generate forecasts based on historical price data, and the deep learning module is configured to process nonlinear characteristics of the time series data; The output unit is configured to integrate the outputs of the time series analysis and deep learning modules, and consider the weights of the events and the sentiment analysis results to adjust the final stock price prediction.
2. The stock price prediction computer system based on big data according to claim 1 is characterized in that: The data collection unit is configured with multiple API interfaces for exchanging data with different financial news websites, social media platforms and financial market databases to obtain financial news, social media trends and stock trading data in real time, and the data collection unit further includes a real-time data buffer for temporarily storing the acquired data for subsequent processing.
3. The stock price prediction computer system based on big data according to claim 1, characterized in that: The data processing unit uses a pre-trained natural language processing model based on a transformer architecture to perform semantic understanding and sentiment analysis of text. The model is trained to identify finance-related entities and events, and to numerically represent key information and sentiment tendencies in text data, wherein the sentiment score S(t) is calculated by analyzing the vocabulary and syntactic structure in the text.
4. The stock price prediction computer system based on big data according to claim 1, characterized in that: The time series analysis module specifically adopts an autoregressive integrated moving average model, the parameters φp, θq, c of which are optimized and configured through statistical analysis of historical stock data, and is used to predict short-term fluctuations in stock prices. The module also includes a model training subunit for periodically retraining the model to adapt to market changes.
5. The stock price prediction computer system based on big data according to claim 1, characterized in that: The deep learning module specifically adopts a long short-term memory network, which is configured to receive an input sequence X processed by the time series analysis module. t , and outputs predictions for future stock prices. In addition, the deep learning module includes a network training subunit for automatically updating network weights when new market data is received.
6. The stock price prediction computer system based on big data according to claim 1, characterized in that: The output unit is further configured to calculate the final stock price forecast based on the output results of the comprehensive model, specifically including weighted fusion of the output results of the autoregressive integrated moving average model and the long short-term memory network model, wherein the weights α, β are automatically optimized by the system to maximize the forecast accuracy, and are dynamically adjusted according to the influence and sentiment score of the market event to improve the responsiveness and accuracy of the forecast.
7. The stock price prediction computer system based on big data according to claim 1, characterized in that: The prediction model unit can weight the market event W i It is calculated by weighting the impact of the event's historical data on stock prices and the credibility of the event release source, and the event sentiment score S i Derived through a natural language processing model in the data processing unit and used to adjust stock price predictions.
8. The stock price prediction computer system based on big data according to claim 1, characterized in that: The forecasting model unit is configured with a parameter self-adjustment mechanism for automatically adjusting the operating parameters α, β, γ of the autoregressive integrated moving average model and the long short-term memory network model when stock market conditions change or abnormal market data are received, so as to maintain the efficiency and accuracy of the forecasting model.
9. The stock price prediction computer system based on big data according to claim 1, characterized in that: The output unit further includes a user interface that displays historical data of stock prices, real-time forecasts, and visual analysis of the impact of market events, through which the user can adjust the viewing time range and parameter settings of the forecast model.
10. The stock price prediction computer system based on big data according to claim 1, characterized in that: The system further includes a monitoring module, which is responsible for monitoring and recording the occurrence of all market-related events and the system's forecasting performance for retrospective analysis of system performance and improvement of future forecasting models.
