A time series forecasting system for stock market data
Patent Information
- Application Number
- DE202024107429
- Authority / Receiving Office
- DE · DE
- Patent Type
- Utility models
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-02-20
- Estimated Expiration
- 2034-12-31
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
FIELD OF THE INVENTION
[0001] The present disclosure relates to a time series forecasting system for stock market data, using financial time series data to predict stock prices. More specifically, the present invention relates to a system that uses deep convolutional and recurrent neural networks with a modified triplet attention mechanism to predict stock prices. The proposed system uses time series data, i.e., a sequence of observations measured at regular intervals over a certain period of time, with stock market data being an example of financial time series data. BACKGROUND OF THE INVENTION
[0002] Time series data is a sequence of observations measured at regular intervals over a specific period of time. Stock market data is an example of financial time series data. Stock market forecasts are crucial for minimizing investment risks and increasing returns. Depending on the type and complexity of the data, different techniques are used for time series analysis, such as statistical methods, machine learning, and deep learning. Traditional forecasting models such as ARIMA, ARMA, and GARCH struggle with the nonlinear and volatile nature of the stock market, resulting in limited accuracy. Machine learning (ML) and deep learning (DL) models—such as support vector machines, LSTMs, and CNNs—improve these methods but face challenges such as overfitting, high computational requirements, and the inability to effectively process large-scale, unstructured financial data such as news sentiment and economic indicators.
[0003] Hybrid models such as BiLSTM-MTRAN-TCN and MS-SSA-LSTM have attempted to integrate multiple data sources for improved predictions. However, these models still suffer from data imbalance, scalability issues, and limited robustness, resulting in insufficient prediction accuracy for practical use.
[0004] To address the above challenges, the present invention proposes a system using a triplet attention-based deep convolutional and recurrent neural network (TAM-HDCNNRNN). By capturing both spatial and channel-related features and optimizing computational performance, the proposed system significantly improves prediction accuracy and reliability, providing a valuable advancement for stock market forecasting. SUMMARY OF THE INVENTION
[0005] The present disclosure relates to a time series forecasting system for stock market data. The invention represents a system based on a triplet attention-based deep convolutional and recurrent neural network (TAM-HDCNNRNN) designed to predict stock prices, improving the accuracy and robustness of stock market forecasts. The proposed system utilizes a triplet attention module that captures essential spatial and channel features and overcomes the challenges of data imbalance, overfitting, and computational complexity inherent in traditional and existing hybrid models. By utilizing both historical stock data and news sentiment from the Bombay Stock Exchange (BSE) and the National Stock Exchange Fifty (NIFTY 50), the model optimizes feature extraction, reduces the gradient vanishing problem, and provides a more reliable forecasting framework.The proposed system for the stock market performs accurate stock market forecasts and is therefore a valuable tool for investors and companies.
[0006] This disclosure is intended to provide a time series forecasting system for stock market data. The system comprises: an input module configured to retrieve stock market data, including historical news data, price details (opening, high, low, closing, volume), and market indicators from data sources such as the BSE and Nifty 50 datasets; a preprocessing module configured to eliminate redundant data and normalize input data using data normalization techniques, providing organized data patterns; a feature extraction module configured to extract relevant features from the preprocessed data, including statistical features, entropy features, principal component analysis (PCA) features, and technical indicators that help identify historical and current trends within the stock market data;a deep learning-based classification module comprising a processor trained using a hybrid deep convolutional neural network and recurrent neural network (HDCNNRNN) model with a modified Triplet Attention Mechanism (TAM), wherein the processor of the deep learning-based classification module is configured to analyze extracted features and perform accurate stock price predictions by capturing cross-dimensional information and addressing data imbalance issues; and an output module configured to output stock price predictions based on the processed input data.
[0007] In one embodiment, the preprocessing module comprises a self-attention-based time series analysis that organizes historical stock price data and identifies extended historical data patterns.
[0008] In one embodiment, the feature extraction module further comprises: a principal component analysis (PCA) sub-module configured to reduce data dimensions by converting correlated variables into uncorrelated variables, thereby simplifying data representation to improve attribution and prediction accuracy; and a technical indicators sub-module configured to calculate market indicators, including simple moving average, exponentially weighted moving average, Bollinger Bands, relative strength index (RSI), money flow index (MFI), average true range (ATR), force index, and freedom of movement, which assist in training predictive models and improve trading decision-making.
[0009] In one embodiment, the deep learning-based classification module comprises: a CNN (Convolutional Neural Network) classifier model configured to capture temporal dependencies within the input data through multiple convolutional and pooling layers, thus extracting complex patterns; a RNN (Recurrent Neural Network) classifier model configured to store and utilize historical information through multiple layers with time-dependent activation functions, thereby facilitating sequential data processing and storing past stock trends; and a triplet attention mechanism integrated with the CNN and RNN models to improve prediction accuracy by capturing cross-dimensional channel and spatial interactions.
[0010] In one embodiment, the triplet attention mechanism further comprises: a channel attention module configured to analyze channel-based feature information; a spatial attention module configured to analyze spatial feature information; and a parameter-free attention module configured to access and use information with minimal computational effort, contributing to improved model performance.
[0011] In one embodiment, the deep learning-based classification module comprises a loss function evaluated by distance metrics. These include: a Euclidean distance metric for measuring the accuracy of prediction results based on the geometric proximity between historical and predicted data points; and a Manhattan distance metric for calculating differences in data attributes across dimensions, thereby optimizing model performance by reducing prediction errors.
[0012] In one embodiment, the deep learning-based classification module uses an Improved Hybrid Algorithm (IHA) optimization component configured to improve the predictive performance of the system by minimizing gradient vanishing problems and improving training stability within large-dimensional data constraints, wherein the hybrid optimization uses the loss function and wherein, based on the distance metrics, the loss function is reduced to improve the predictive ability.
[0013] In one embodiment, the output module comprises a visualization module configured to provide a graphical representation of the predicted results, wherein the graphical representation of the predicted results is displayed using a user interface, and the provided stock price predictions are optimized for complex data patterns, reduced time complexity, and increased computational power.
[0014] An object of the present invention is to provide a time series forecasting system for stock market data.
[0015] Another object of the present invention is to provide a stock market prediction system that improves accuracy by capturing both spatial and channel features through a triplet attention mechanism.
[0016] Another objective of the present invention is to solve the problems of data imbalance and overfitting that commonly occur in existing stock forecasting systems. This is achieved by implementing a time-dependent activation function.
[0017] Another objective of the present invention is to improve the robustness and generalizability of stock price forecasts by integrating structured historical stock data and news sentiment.
[0018] Another object of the present invention is to reduce the computational complexity and inference time through an optimized deep neural network architecture, making the system suitable for processing large amounts of data.
[0019] Another object of the present invention is to overcome gradient vanishing problems and provide higher prediction accuracy and stability in volatile stock markets.
[0020] Another objective of the present invention is to improve the system's performance in feature learning and classification by applying extended distance metrics, such as Euclidean and Manhattan distances, in the loss function.
[0021] Another objective of the present invention is to develop a stock forecasting system that integrates data from the Bombay Stock Exchange (BSE) and the National Stock Exchange Fifty (NIFTY 50), thus ensuring relevance and adaptability to the Indian stock market.
[0022] To further clarify the advantages and features of the present disclosure, a more detailed description of the invention will be given with reference to specific embodiments thereof illustrated in the accompanying drawings. It should be noted that these drawings represent only typical embodiments of the invention and are therefore not to be considered limiting its scope. The invention will be described and explained in additional detail and in greater detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE CHARACTERS
[0023] These and other features, aspects, and advantages of the present disclosure will be better understood when the following detailed description is read with reference to the accompanying drawings, in which like characters represent like parts throughout. Fig. 1 shows a block diagram of a time series forecasting system for stock market data according to an embodiment of the present disclosure; Fig. 2 shows a block diagram of the proposed system according to an embodiment of the present disclosure; Fig. 3 is a diagram illustrating the architecture of the classification performed by the proposed system according to an embodiment of the present disclosure; and Fig. 4 is a diagram illustrating the architecture of the Triplet Attention Mechanism according to an embodiment of the present disclosure.
[0024] Furthermore, those skilled in the art will appreciate that elements in the drawings are shown for convenience and may not necessarily be drawn to scale. For example, the flowcharts illustrate the method by key steps to enhance understanding of aspects of the present disclosure. Moreover, with respect to device construction, one or more components of the device may have been represented in the drawings by conventional symbols, and the drawings may show only those specific details relevant to understanding embodiments of the present disclosure in order not to clutter the drawings with details that would be readily apparent to those skilled in the art who would benefit from the description herein. DETAILED DESCRIPTION:
[0025] To facilitate an understanding of the principles of the invention, reference will now be made to the embodiment illustrated in the drawings and described in specific language. It is to be understood, however, that this is not intended to limit the scope of the invention, as such changes and further modifications to the illustrated system and such further applications of the principles of the invention as illustrated therein are contemplated as would normally occur to one skilled in the art to which the invention pertains.
[0026] It will be understood by one skilled in the art that the foregoing general description and the following detailed description are exemplary and explanatory of the invention and are not intended to be limiting thereof.
[0027] References in this specification to "one aspect," "another aspect," or similar language mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present disclosure. Therefore, occurrences of the phrase "in one embodiment," "in another embodiment," and similar language throughout this specification may or may not all refer to the same embodiment.
[0028] The terms "comprises," "comprising," or other variations thereof are intended to cover non-exclusive inclusion, such that a process or method comprising a list of steps not only includes those steps, but may also include other steps not expressly listed or inherent in such process or method. Likewise, one or more devices or subsystems or elements or structures or components preceded by "comprises...a" does not preclude, without further limitation, the existence of other devices or other subsystems or other elements or other structures or other components or additional devices or additional subsystems or additional elements or additional structures or additional components.
[0029] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The system, methods, and examples provided herein are for illustrative purposes only and should not be considered limiting.
[0030] Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0031] The functional units described in this specification have been referred to as devices. A device may be implemented in programmable hardware devices such as processors, digital signal processors, central processing units, field-programmable gate arrays, programmable array logic, programmable logic devices, cloud processing systems, or the like. The devices may also be implemented in software for execution by various types of processors. An identified device may contain executable code and may, for example, comprise one or more physical or logical blocks of computer instructions, which may be organized, for example, as an object, procedure, function, or other construct.However, the executable file of an identified device need not be physically located together, but may comprise different instructions stored in different locations which, when logically linked together, constitute the device and fulfill the stated purpose of the device.
[0032] Indeed, executable code of a device or module may be a single instruction or multiple instructions, and may even be distributed across several different code segments, among different applications, and across multiple storage devices. Similarly, operational data may be identified and represented within the device and embodied in any suitable form and organized in any suitable type of data structure. The operational data may be captured as a single set of data or distributed across different locations, including different storage devices, and may exist, at least in part, as electronic signals in a system or network.
[0033] References in this specification to "a selected embodiment," "an embodiment," or "an embodiment" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the disclosed subject matter. Therefore, the appearances of the phrases "a selected embodiment," "in an embodiment," or "in an embodiment" in various places in this specification do not necessarily refer to the same embodiment.
[0034] Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the disclosed subject matter. However, one of ordinary skill in the art will recognize that the disclosed subject matter may be practiced without one or more of the specific details, or with different methods, components, materials, etc. In other instances, well-known structures, materials, or operations are not shown or described in detail to avoid obscuring aspects of the disclosed subject matter.
[0035] According to the example embodiments, the disclosed computer programs or modules may be executed in many example ways, for example, as an application stored in the memory of a device or as a hosted application running on a server and communicating with the device application or browser using a variety of standard protocols such as TCP / IP, HTTP, XML, SOAP, REST, JSON, and other suitable protocols. The disclosed computer programs may be written in example programming languages that execute from memory on the device or from a hosted server, for example, BASIC, COBOL, C, C++, Java, Pascal, or scripting languages such as JavaScript, Python, Ruby, PHP, Perl, or other suitable programming languages.
[0036] Some of the disclosed embodiments comprise or otherwise involve data transmission over a network, such as communicating various inputs or files over the network. The network may comprise, for example, one or more of the following: the Internet, wide area networks (WANs), local area networks (LANs), analog or digital wired and wireless telephone networks (e.g., a PSTN, Integrated Services Digital Network (ISDN), a cellular network, and Digital Subscriber Line (xDSL)), radio, television, cable, satellite, and / or any other delivery or tunneling mechanism for transmitting data. The network may comprise multiple networks or subnetworks, each of which may comprise, for example, a wired or wireless data path. The network may comprise a circuit-switched voice network, a packet-switched data network, or any other network capable of transmitting electronic communications.For example, the network may include networks based on Internet Protocol (IP) or Asynchronous Transfer Mode (ATM), and may support voice using, for example, VoIP, Voice over ATM, or other comparable protocols used for voice data communications. In one implementation, the network includes a cellular network configured for the exchange of text or SMS messages.
[0037] Examples of the network include, but are not limited to, a Personal Area Network (PAN), a Storage Area Network (SAN), a Home Area Network (HAN), a Campus Area Network (CAN), a Local Area Network (LAN), a Wide Area Network (WAN), a Metropolitan Area Network (MAN), a Virtual Private Network (VPN), an Enterprise Private Network (EPN), the Internet, a Global Area Network (GAN), and so on.
[0038] Fig. 1 shows a block diagram of a time series forecasting system (100) for stock market data according to an embodiment of the present disclosure.
[0039] With reference to Fig. 1, the system (100) comprises an input module (102) configured to retrieve stock market data, including historical news data, price details (opening, high, low, closing, volume), and market indicators from data sources such as the BSE and Nifty 50 datasets; a preprocessing module (104) configured to eliminate redundant data and normalize the input data through data normalization techniques, providing organized data patterns; a feature extraction module (106) configured to extract relevant features from the preprocessed data, including statistical features, entropy features, principal component analysis (PCA) features, and technical indicators that help identify historical and current trends in the stock data;a deep learning-based classification module (108) comprising a processor (108a) trained using a hybrid deep convolutional neural network and recurrent neural network (HDCNNRNN) model with a modified triplet attention mechanism (TAM), wherein the processor (108a) of the deep learning-based classification module (108) is configured to analyze extracted features and perform accurate stock price predictions by capturing cross-dimensional information and addressing data imbalance issues; and an output module (110) configured to output stock price predictions based on the processed input data.
[0040] In one embodiment, the preprocessing module (104) comprises a self-attention-based time series analysis that organizes historical stock price data and identifies extended historical data patterns.
[0041] In one embodiment, the feature extraction module (106) further comprises: a principal component analysis (PCA) sub-module (106a) configured to reduce data dimensions by converting correlated variables into uncorrelated variables, thereby simplifying data representation to improve attribution and prediction accuracy; and a technical indicators sub-module (106b) configured to calculate market indicators, including simple moving average, exponentially weighted moving average, Bollinger Bands, relative strength index (RSI), money flow index (MFI), average true range (ATR), force index, and freedom of movement, which support the training of predictive models and improve trading decision-making capabilities.
[0042] In one embodiment, the deep learning-based classification module (108) comprises: a convolutional neural network (CNN) classifier model (108b) configured to capture temporal dependencies within the input data through multiple convolutional and pooling layers, thereby extracting complex patterns; a recurrent neural network (RNN) classifier model (108c) configured to store and utilize historical information through multiple layers with time-dependent activation functions, thereby facilitating sequential data processing and storing past stock trends; and a triplet attention mechanism (108d) integrated with the CNN and RNN models to improve prediction accuracy by capturing cross-dimensional channel and spatial interactions.
[0043] In one embodiment, the triplet attention mechanism (108d) further comprises: a channel attention module (108e) configured to analyze channel-based feature information; a spatial attention module (108f) configured to analyze spatial feature information; and a parameter-free attention module (108g) configured to access and use information with minimal computational effort, contributing to improved model performance.
[0044] In one embodiment, the deep learning-based classification module (108) comprises a loss function evaluated by distance metrics, including: a Euclidean distance metric for measuring the accuracy of prediction results based on the geometric proximity between historical and predicted data points; and a Manhattan distance metric for calculating the differences in data attributes across dimensions, thereby optimizing model performance by reducing prediction errors.
[0045] In one embodiment, the deep learning-based classification module (108) uses an Improved Hybrid Algorithm (IHA) optimization component configured to improve the predictive performance of the system by minimizing gradient vanishing problems and improving training stability within large-dimensional data constraints, wherein the hybrid optimization uses the loss function and wherein based on the distance metrics, the loss function is reduced to improve the predictive ability.
[0046] In one embodiment, the output module (110) comprises a visualization module (110a) configured to provide a graphical representation of the predicted results, wherein the graphical representation of the predicted results is displayed using a user interface (110b), wherein the provided stock price predictions are optimized for complex data patterns, reduced time complexity, and increased computing power.
[0047] In one embodiment, the input unit (102), the preprocessing unit (104), the feature extraction unit (106), the deep learning-based classification unit (108), and the output unit (110) may be implemented in programmable hardware devices such as processors, digital signal processors, central processing units, field-programmable gate arrays, programmable array logic, programmable logic devices, cloud processing systems, or the like.
[0048] The present invention relates to a system (100) for predicting stock prices, wherein the system uses a deep convolutional and recurrent neural network based on deep learning with a modified triplet attention mechanism to carry out the stock market prediction.
[0049] Fig. 2 shows a block diagram of the proposed system (100) according to an embodiment of the present disclosure.
[0050] In relation to Fig. 2, the present invention provides a system for predicting stock price based on various market indicators to predict the future stock price. The proposed system receives news data as input from the BSE and Nifty 50 datasets. It then undergoes a preprocessing phase where all redundant features are removed and uses a data normalization technique to organize the data. Technical indicators and principal component analysis (PCA) functions are used to extract relevant data features. After feature extraction, the result or the selected features are fed into the classification model of the proposed system to accurately predict the stock price.The classification model of the proposed system increases prediction accuracy by using a triple attention (TA) mechanism integrated with the HDCNNRNN (Hybrid Deep Convolutional and Recurrent Neural Network) model, which reduces representation performance, time complexity, and gradient vanishing problems, while showing good performance on complex patterns with large-dimensional data. By removing the computational cost, the classification model of the proposed system, which uses the TAM-HDCNNRNN model for stock price prediction, offers remarkable performance. In contrast, the proposed system makes stock price predictions by considering past news data. The basic block diagram of the proposed system is shown in . Fig. 2. The detailed operation of the proposed system is described step by step below: 1. Input for the proposed system: The input data for the invention comes from the Bombay Stock Exchange (BSE) dataset and the Nifty 50 dataset. These datasets provide historical stock data over a period of ten years, including daily price details such as opening price, low price, high price, volume, and closing price, as well as relevant news data. This information forms the basic input for further processing and prediction tasks. 2. Preprocessing phase of the system
[0051] In the preprocessing phase, normalization and self-attention-based time series analysis are performed to improve the historical data patterns.
[0052] Data normalization: In this step, redundant and irrelevant data is removed from the historical stock price data to bring it into a structured format. The normalization process ensures that the data is appropriately scaled and prepares it for subsequent SATS analysis. 3. Feature extraction phase of the system
[0053] After preprocessing, the organized data is entered into the feature extraction phase. In this phase, important features are extracted from the historical stock data to enable accurate stock market forecasts. These extracted features include: a. PCA Features: Principal component analysis (PCA) is used to reduce the dimensions of the data. PCA transforms correlated variables into uncorrelated ones, enabling efficient feature matching. This step reduces redundancy by transforming large, correlated data sets into smaller, uncorrelated ones, simplifying the matching process and providing insights into inventory and risk factors. b. Technical indicators: Technical indicators provide mathematical representations of historical stock data and help traders and investors make predictions about future stock prices. The most important extracted technical indicators include: - Simple Moving Average (SMA) Deviation: Calculates the deviation rate using a 24-hour moving average to determine average price changes. - Exponentially Weighted Moving Average (EWMA): Calculates a weighted average of prices, giving more weight to recent data points to reflect more accurate trends. - Bollinger Bands: Measures the standard deviation around the simple moving average to establish upper and lower price limits. - Relative Strength Index (RSI): Compares recent gains and losses over a specific period of time, using a scale of 0 to 100 to indicate market conditions. - Money Flow Index (MFI): Assesses investor sentiment towards a stock over incremental time intervals ranging from 0 to 100. - Average True Range (ATR): Measures price volatility over a 24-hour period by averaging the high, low, and lag prices. - Power Index: Evaluates the energy required to change the asset price by comparing current and past values over a specified period of time. - Freedom of movement: Quantifies momentum and volume information to examine price fluctuations and improve trading effectiveness.
[0054] Each of these technical indicators is calculated individually and their results are combined into a comprehensive set of technical functions.
[0055] Finally, all extracted features—including statistical, entropy, PCA, and technical indicators—are combined to create a complete feature vector. This feature vector serves as input to the system's main prediction system or classification module, capturing the essential patterns and insights needed for accurate stock market forecasting.
[0056] Fig. 3 is a diagram showing the architecture of the classification performed by the proposed system according to an embodiment of the present disclosure.
[0057] With reference to Fig. 3 contains the proposed system architecture, which is Fig. As shown, an attention-based sequential processing approach for predicting stock price indices is used. This system integrates deep convolutional neural network (DCNN) and recurrent neural network (RNN) classifiers to improve prediction accuracy. The DCNN component is designed to capture complex temporal dependencies within the data, while the RNN component focuses on storing historical information, thus supporting accurate time series predictions. The RNN phase uses a multi-layer perceptron approach to storing historical information, processing various input layers and producing the desired output results. Each RNN within the system consists of multiple neurons operating with a time-dependent activation function.
[0058] In addition to the RNN phase, the DCNN phase effectively handles the prediction process. This classifier requires a large dataset within time series constraints and operates as a feedforward neural network consisting of multiple layers, including convolutional and pooling layers. In the convolutional layer, dense data is processed by a kernel filter before entering the pooling layer, where the system extracts internal representations of class scores, weights, and biases. This design addresses issues such as time complexity and gradient vanishing, improving the model's prediction accuracy.
[0059] The system also uses a loss function evaluated by hybrid distance metrics—both Euclidean and Manhattan distances. These metrics help reduce the model's loss function, thus improving its predictive ability. To further improve efficiency and performance, an attention mechanism is implemented as shown below.
[0060] Fig. 4 is a diagram illustrating the architecture of the Triplet Attention Mechanism according to an embodiment of the present disclosure.
[0061] The modified Triplet Attention Mechanism is a key component of the system and focuses on the automatic extraction of informative features from the data source. This mechanism comprises three modules: the channel attention module, the spatial attention module, and the parameter-free attention module. Together, these modules facilitate the prediction process in the system. The features extracted from these modules serve as input to the main system and contain various spatial positions across different channels.
[0062] Some channels contain significant spatial features, while others have less weighted modules with fewer spatial features. The three-branch triplet attention module captures cross-dimensional interactions between channel and spatial dimensions. By effectively processing these interactions, the attention mechanism improves the system's feature learning ability, leading to an improvement in overall prediction accuracy. The structure of this modified triplet attention mechanism is shown in Fig. 4 shown.
[0063] In an exemplary embodiment, the stock forecasting system is implemented in the PyCharm software environment using a Windows 11 configuration with 16 GB RAM and 128 GB ROM. This setup supports the computing power requirements for effective processing and analysis of large data sets and enables the system to perform efficient stock price forecasts. The input data for the stock price forecasting system includes historical stock price information from two main sources: the BSE (Bombay Stock Exchange) and the Nifty 50 data sets. 1. BSE Dataset: This dataset contains daily stock price data from the Bombay Stock Exchange, including key financial indicators such as opening price, closing price, high price, low price, and share volume. These data points provide comprehensive historical details on BSE stocks, sourced from finance.yahoo.com. The BSE dataset serves as the basic input that enables the system to analyze and predict stock trends. 2. Nifty 50 Dataset: Similar to the BSE dataset, the Nifty 50 dataset provides daily historical stock price data, including opening, closing, high, low, and volume values. These values are also sourced from finance.yahoo.com and cover a period from January 3, 2014, to March 31, 2024. Both the BSE and Nifty 50 datasets are used during the training and testing phases, providing a reliable basis for accurate stock price predictions.
[0064] Additionally, stock market news data was extracted from websites with BSE and Nifty information using web scraping techniques. This additional data input helps improve the system's prediction accuracy by incorporating real news events into the analysis.
[0065] The performance of the system is evaluated using the following metrics to assess the accuracy and error of the predictions: 1. Root Mean Square Error (RMSE): Measures the standard deviation of prediction errors. RMSE provides insight into the accuracy of the system's stock price prediction by highlighting deviations between predicted and actual values. 2. Mean Absolute Error (MAE): Represents the average of the absolute errors between predicted and actual stock prices. MAE provides a simple understanding of forecast accuracy. 3. Mean Square Error (MSE): Calculates the average of the squared prediction errors and penalizes larger errors more heavily than MAE. MSE provides an accurate measure of the system's prediction accuracy. 4. R-squared (R2) : Evaluates the proportion of variance in stock prices that can be predicted given the input characteristics. This metric provides insight into the overall system fit and performance and ranges from 0 to 1, with values closer to 1 indicating higher prediction accuracy.
[0066] These metrics are important to assess the effectiveness of the system and ensure that it meets the desired accuracy standards for stock price forecasts.
[0067] The proposed stock price prediction system effectively processes and analyzes historical data to predict stock values, including closing, opening, high, and low prices. By employing data normalization techniques, the system minimizes input noise and improves prediction reliability. This system reduces investor risks by providing accurate stock predictions, thus improving investment decision-making. Key improvements include addressing interpretability issues, reducing computational complexity, and solving vanishing gradient problems. The system's Triplet Attention (TA) function significantly improves prediction accuracy by enabling robust feature extraction and leading to accurate evaluation metrics such as MSE, RMSE, MAE, and R. 2 contributes.
[0068] The drawings and the foregoing description provide examples of embodiments. Those skilled in the art will recognize that one or more of the described elements may well be combined into a single functional element. Alternatively, certain elements may be separated into multiple functional elements. Elements from one embodiment may be added to another embodiment. For example, orders of the processes described herein may be changed and are not limited to the manner described herein. Furthermore, the actions of any flowchart need not be implemented in the order shown; nor do all actions necessarily need to be performed. Also, those actions that are not dependent on other actions may be performed in parallel with the other actions. The scope of the embodiments is in no way limited by these specific examples.Numerous variations, whether explicitly stated in the specification or not, such as differences in structure, dimensions, and material use, are possible. The scope of the embodiments is at least as broad as indicated in the following claims.
[0069] Advantages, other benefits, and solutions to problems have been described above with reference to specific embodiments. However, the advantages, benefits, solutions to problems, and any components that may cause an advantage or solution to occur or become more apparent are not to be construed as a critical, required, or essential feature or component of any or all of the claims. REFERENCES 100 Block diagram of a time series forecasting system for stock market data. 102 Input module 104 Preprocessing module 106 Feature extraction module 106a Submodule Principal Component Analysis (PCA) 106b Submodule Technical Indicators 108 Deep Learning based classification module 108a processor 108b CNN classifier model 108c RNN classifier model 108d Triplet attention mechanism 108e Channel Attention Module 108f Module on Spatial Attention 108g Parameter-free attention module 110 Output module 110a Visualization module 110b User Interface 202 data set 204 Entrance 206 Preprocessing 208 Feature extraction 210 Deep Learning-Based Prediction Using DCNN, RNN With TAM 212 Expected result 302 Deep Convolutional Neural Network (DCNN) 304 Recurrent Neural Network (RNN) 306 Triple attention mechanism 308 Edition 402 Input tensor 404 Z-Pool 406 Conversion 408 average 410 Permutation 412 Sigmoid 414 Identity QUOTES CONTAINED IN THE DESCRIPTION
[0000] This list of documents submitted by the applicant was generated automatically and is included solely for the convenience of the reader. This list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions. Cited non-patent literature
[0000] Opening, closing, high, low, and volume values. These values also come from finance.yahoo.com and cover a period from January 3, 2014, to March 31, 2024
[0063]
Claims
[1] A time series forecasting system (100) for stock market data, comprising: an input module (102) configured to retrieve stock market data, including historical news data, price details (opening, high, low, closing, volume) and market indicators from data sources such as the BSE and Nifty 50 datasets; a preprocessing module (104) configured to eliminate redundant data and normalize input data through data normalization techniques and provide organized data patterns; a feature extraction module (106) configured to extract relevant features from the preprocessed data, including statistical features, entropy features, principal component analysis (PCA) features, and technical indicators that help identify historical and current trends within the stock data; a deep learning-based classification module (108) comprising a processor (108a) trained using a hybrid deep convolutional neural network and recurrent neural network (HDCNNRNN) model with a modified triplet attention mechanism (TAM), wherein the processor (108a) of the deep learning-based classification module (108) is configured to analyze extracted features and perform accurate stock price predictions by capturing cross-dimensional information and addressing data imbalance issues; and an output module (110) configured to output stock price forecasts based on the processed input data. [2] The system (100) of claim 1, wherein the preprocessing module (104) comprises a self-attention-based time series analysis that organizes historical stock price data and identifies extended historical data patterns. [3] The system (100) of claim 1, wherein the feature extraction module (106) further comprises: a principal component analysis (PCA) sub-module (106a) configured to reduce data dimensions by converting correlated variables into uncorrelated variables, thereby simplifying data representation to improve mapping and prediction accuracy; and a technical indicators sub-module (106b) configured to calculate market indicators, including simple moving average, exponentially weighted moving average, Bollinger Bands, relative strength index (RSI), money flow index (MFI), average true range (ATR), strength index and freedom of movement, which support the training of predictive models and improve trading decision-making capabilities. [4] The system (100) of claim 1, wherein the deep learning-based classification module (108) comprises: a classifier model (108b) comprising a convolutional neural network (CNN) configured to capture temporal dependencies within the input data through multiple convolutional and pooling layers, thereby extracting complex patterns; a recurrent neural network (RNN) classifier model (108c) configured to store and utilize historical information across multiple layers with time-dependent activation functions, facilitating sequential data processing and storing past stock trends; and a triplet attention mechanism (108d) integrated into the CNN and RNN models to improve prediction accuracy by capturing cross-dimensional channel and spatial interactions. [5] The system (100) of claim 4, wherein the triplet attention mechanism (108d) further comprises: a channel attention module (108e) configured to analyze channel-based feature information; a spatial attention module (108f) configured to analyze spatial feature information; and a parameter-free attention module (108g) configured to access and utilize information with minimal computational effort, contributing to improved model performance. [6] The system (100) of claim 1, wherein the deep learning-based classification module (108) comprises a loss function evaluated by distance metrics comprising: a Euclidean distance metric to measure the accuracy of prediction results based on the geometric proximity between historical and predicted data points; and a Manhattan distance metric for calculating differences in data attributes across dimensions, thereby optimizing model performance by reducing prediction errors. [7] The system (100) of claim 6, wherein the deep learning-based classification module (108) uses an Improved Hybrid Algorithm (IHA) optimization component configured to improve the predictive performance of the system by minimizing gradient vanishing problems and improving training stability within large-dimensional data constraints, wherein the hybrid optimization uses the loss function and wherein based on the distance metrics, the loss function is reduced to improve the predictive capability. [8] The system (100) of claim 1, wherein the output module (110) comprises a visualization module (110a) configured to provide a graphical representation of the predicted results, the graphical representation of the predicted results being displayed using a user interface (110b), the provided stock price predictions being optimized for complex data patterns, reduced time complexity, and increased computing power.