Stock Prediction: a method based on extraction of news features and recurrent neural networks

Zeya Zhang, Weizheng Chen, Hongfei Yan · DOI

Abstract

This paper proposed a method for stock prediction. In terms of feature extraction, we extract the features of stock-related news besides stock prices. We first select some seed words based on experience which are the symbols of good news and bad news. Then we propose an optimization method and calculate the positive polar of all words. After that, we construct the features of news based on the positive polar of their words. In consideration of sequential stock prices and continuous news effects, we propose a recurrent neural network model to help predict stock prices. Compared to SVM classifier with price features, we find our proposed method has an over 5% improvement on stock prediction accuracy in experiments.

Introduction

Predicting stock market movements is a complex task due to the influence of macroeconomic policies, industry trends, and company-specific events. While technical analysis focuses on historical price data, it often ignores the significant impact of external news events. Conversely, many sentiment-based models treat news as isolated events, failing to account for the temporal persistence of news impact. This paper addresses these gaps by integrating automated sentiment extraction from financial news with historical price data using a Recurrent Neural Network (RNN) architecture designed to capture sequential dependencies.

Methodology

System Overview

The proposed framework consists of two parallel feature extraction pipelines: one for news sentiment and one for price differences. These features are then fed into an RNN to predict the direction of stock price movement.

Overview of the proposed stock prediction framework integrating news and price features.

News Feature Extraction

To quantify news impact, we developed a domain-specific polarity extraction method. We began with a set of "seed words" representing positive (e.g., "benefit," "improve") and negative (e.g., "decline," "loss") sentiment. Using Pointwise Mutual Information (PMI) on a corpus of over 85,000 articles, we calculated the relationship between these seeds and other words. An optimization problem was then formulated to assign a "positive polarity" score to every word in the vocabulary. Daily news is represented as a histogram of these word scores, creating a fixed-length feature vector.

Recurrent Neural Network Model

We utilize an RNN to model the temporal effects of news and price changes. Unlike standard classifiers, the RNN maintains a hidden state that allows "yesterday's" news to influence "today's" prediction, reflecting the natural "half-life" of financial information.

Detailed RNN architecture showing the integration of price returns and news sentiment features.

The model takes dual inputs: daily price returns and the news sentiment histogram. It employs ReLU activation in hidden layers and a Softmax output layer for binary classification (up vs. down/flat).

Experimental Setup

The study utilized data from the Shanghai Stock Exchange (SSE) A-share market from January 1, 2013, to August 31, 2015. The dataset included 1,078 stocks over 644 trading days and 85,060 news articles. Articles were filtered to include only those where the stock name appeared in the title to ensure high relevance.

Results and Discussion

The proposed RNN model was compared against baseline Support Vector Machine (SVM) approaches. The results demonstrate that incorporating news features significantly improves prediction accuracy. Furthermore, the RNN's ability to model temporal sequences provided an additional boost over the static SVM model.

  • Price + SVM: ~50.4% accuracy
  • Price + News + SVM: ~53.6% accuracy
  • Price + News + RNN (Proposed): ~55.84% accuracy

We observed that "high-density" stocks—those with frequent news coverage—showed the most substantial gains in accuracy, with the RNN model achieving a 5.44% improvement over the price-only baseline.

Conclusion

This research highlights the importance of domain-specific sentiment analysis and temporal modeling in financial forecasting. By combining an optimized word-polarity method with an RNN, we achieved significant accuracy gains. Future work will explore predicting the magnitude of price changes and incorporating broader industry-level news features.

Summary updated

BibTeX
@misc{zhang2017stock,
  author = {Zeya Zhang and Weizheng Chen and Hongfei Yan},
  title = {{Stock Prediction: a method based on extraction of news features and recurrent neural networks}},
  year = {2017},
  eprint = {1707.07585},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1707.07585},
}
Figure