Skip to content

Used re-constructed news title data to predict stock by deep learning(LSTM).This is the final project of NTUST CS5144701 Practices of Deep Learning course.

License

Notifications You must be signed in to change notification settings

0lidaxiang/dp-predict-stock

Repository files navigation

dp-predict-stock

Final project of NTUST CS5144701 Practices of Deep Learning course.

The goal of this project is to improve the performance of this paper by using RNN-LSTM model instead of EB-CNN for prediction.

Training Guide

Scripts in this project

Script Description
process_data.ipynb Fetch data from stock price API and news dataset and generate data frame pickle file train.pkl.
reverb.ipynb Preprocess data for reverb OpenIE phrase extraction reverb_pre.txt and extract the result reverb_result.txt for training model train_reduce.pkl.
word2Vec.ipynb Produce word embedding model word2vec.model.
main.ipynb Model training and evaluation.

Reverb usage

Download jar from the Reverb Website Prepare newsdata.txt and run:

java -Xmx512m -jar ./test-reverb/reverb.jar reverb_pre.txt reverb_result.txt

About the Datasets

  • News dataset: financial-news-dataset includes 450,341 news from Bloomberg and 109,110 news from Reuters within the date range from 2000 to 2013.

  • Stock price dataset: alphavantage API.

References

How to Run

  1. process
  2. reverb & local command
  3. word2Vec
  4. main

Progress

  1. Decide using which dataset, including stock data and news data (2018-05-20).

  2. To know how to use reverb to split one news title sentence (2018-05-25).

  3. Process the news data: got the title and time (2018-05-27).

  4. Process the stock data: got the price (2018-05-28).

  5. Reconstruct the stock price data, only save the result that compared with last day price.If today's price is smaller than last days, it will be saved on 0 and other situation will be saved on 1 (2018-05-29).

  6. Using the Reverb technology to split a news title sentence of all news's data to the three part format (2018-05-29).

  7. Generate the word_embedding model, using reverb-result (2018-05-30).

  8. Generate embedding_matrix, using Keras's tool (2018-05-30).

  9. Construct the neural network model(Event-LSTM) (2018-05-30).

  10. Train and predict (2018-05-30).

  11. If the predict's result dont bigger than 65%, to find and modify the errors (2018-06-01).

  12. Generate the final project documents and slides (2018-06-18).

About

Used re-constructed news title data to predict stock by deep learning(LSTM).This is the final project of NTUST CS5144701 Practices of Deep Learning course.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published