This document summarizes a novel deep learning approach to predict stock price movements based on newspaper articles. It uses a combination of convolutional and recurrent neural networks, including word embedding, convolutional layers, and long short-term memory (LSTM). The approach achieves an accuracy of 54.82% on a dataset containing news articles and corresponding stock prices. Future work is proposed to improve the model by addressing noise in the dataset and comparing results to other approaches in literature.
3. ‘Language is probably the hardest problem in science;
nobody really knows how it works,
nobody really knows where it came from
and yet we can all do it.
Michael Corballis
Emeritus Professor at the University of Auckland
TedX talk – The Origins and Evolution of Language: https://www.youtube.com/watch?v=nd5cklw6d6Q&t=95s
6. Background domain
The ‘Natural Language for Financial Forecasting’ domain has been growing rapidly in
the last decade
Number of ‘NLFF’ publications in scientific journals
7. Problem
While stock price movements are known to be mostly influenced by news updates,
most financial companies only include stock price information in their predictive models.
By not including news updates, a huge opportunity is missed
9. Type of problem
Predicting stock price movements based on newspaper articles amounts to
classifying each article as being a positive/negative article
10. Approach
The approach, that combines convolutional- and recurrent layers, originates from the
NLP domain and has not been applied to the NLFF domain yet
Start: T articles
Transforming articles into
numerical representations
Deep learning approaches
to learn the algorithm
Final: Classification
11. Data preprocessing
Data from two separate sources were used to create a dataframe that contains both
textual- as well as stock information
Stock prices
Source: Yahoo Finance
News articles
Source: Lexis Nexis Academic
15. Intuition: Convolutional Neural Network (CNN)
CNNs learn to recognize features at different abstraction levels
Face
Hand
Eyes
Nose
Mouth
Ear
Human Face
1 layer 1 layer
16. Convolutional Neural Network applied on word embeddings
A filter (A) recognizes a pattern in the text (B). The convolutional output (C) represent
the text in terms of a feature
0.46 0.51 0.18 0.43 0.53
18. Intuition: Recurrent layer – Long Short Term Memory (LSTM)
To make decisions, a LSTM uses information from both the near as well as distant past
I start off with a broad
knowledge base
Not of all of my knowledge
is relevant so I forget some
Knowledge
Me preparing for the Big Data Expo
Knowledge
New, relevant information is
added to my knowledge
My presentation combines
both prior- as well as new
knowledgeExpo
Knowledge
p=(y|X)
p=(y|X)
19. Long Short Term Memory – Recurrent Neural Network
The cell state contains the current knowledge,
to and from which information is added and removed
Article input
(from convolutional layer)
Cell state
Forget gate
Input gate
Candidate values
Output gate Current knowledge (Cell state)
1. What can be forgotten from cell state? (Forget gate)
New information
2. What new information can be added to the cell state?
(Candidate values)
3. How much of the new information should be updated?
(Input gate)
Output article
4. What information needs to be outputted per article?
(Output gate)
21. Results
Combining a CNN and RNN, yields the best performance
Full model CNN RNN
Sentiment
analysis
Accuracy 56.25% 55.54% 54.82% 52.54%
Accuracy is calculated by dividing the total number of true predictions,
by the total number of predictions
22. Example dataset
The current dataset contains a lot of noise
Company: Alphabet
Article: ‘Eric Schmidt is executive chairman of Alphabet. not chief executive as incorrectly stated in a column
on November 23.’
Company: Tesla
Article: ‘Mars doesn't have an extradition treaty with the US. - Jim Chanos discussing Tesla with CNBC’
Company: Verizon
Article: ‘China surpassed the US to become the top recipient of foreign direct investment in 2014. The inflow to
the US fell by 60 per cent. primarily because of the Verizon pullout by Vodafone. Five of the top 10 FDI recipients
are developing markets.’
Company: Intel & Tesla
Article: ‘Microsoft and Intel's evolution from the PC to the data centre is proving painful. Uber has settled a key
class-action lawsuit. Tesla's chief has an idea for public transport. #techFT is a daily newsletter on technology.
media and telecoms. You can sign up here.’
Company: Netflix
Article: ‘Whether reaching millennial consumers who want to escape marketing messages. or 'cordcutting’
television viewers. who ditch cable and satellite subscriptions in favour of ad-free Netflix. advertisers are having
to work harder than ever to find their audience. Read the report’
23. Results literature
The results are similar to the results obtained in the literature
Accuracy Dataset Approach
Pang et al, 2018 53.2% Stock data LSTM
Matsubara et al, 2018 59.0% News articles Deep neural generative model
Huynh at al, 2017 59.98% News articles Combination of LSTM and GRU
Rumelhart et al, 2017 64.74% News articles RNN and self-trained word embedding
Selvin et al, 2017 55.9% Stock data LSTM and CNN
26. Contact information
Please contact me for further inquiries
Emil Rijcken
Email: emil@cwi.nl
Linkedin: https://www.linkedin.com/in/emilrijcken/
Mobile: 06 53137886
28. Problem complexity
Checking all solutions is unfeasible
Assuming:
- 2000 dimensions (e.g. there are 16 convolutional layers with 128 filters each)
- 10 options per dimension
- 31 860 000 000 000 000 calculations per second (fastest computer in the world)
Then: it takes approximately 1.99 x 101979
years (!) to calculate all possible solutions
29. Finding solution
Through trial and error, different solutions are proposed. The slope of the solution
determines how parameters are set
Example of solution space in 3D-space
1
0