Shuqi-li / PEN

The code of PEN: Prediction-Explanation Network to Forecast Stock Price Movement with Better Explainability

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

code

This is the source code and some evaluation scripts for our paper PEN: Prediction-Explanation Network to Forecast Stock Price Movement with Better Explainability. Our code is based on https://github.com/yumoxu/stocknet-code

Dependencies

  • Python 2.7.11
  • Tensorflow 1.4.0
  • Scipy 1.0.0
  • NLTK 3.2.5

Directories

  • src: source files;
    • The core code of our model is in MSINModule.py
  • res: resource files including,
    • Vocabulary file vocab.txt;
    • Pre-trained embeddings of GloVe. We used the GloVe obtained from the Twitter corpora which you could download here.
  • data:
    • ACL18 consisting of tweets and prices which you could download here.
    • DJIA consisting of news and prices which you could download here.

Configurations

All details about hyper-parameters are listed in src/config.yml and src/config_d.yml.

See more information in 'Experimental Setup' of our paper.

Running

Use sh src/run.sh or python src/Main.py in your terminal to start model training and testing.

The default code corresponds to ACL18. For DJIA, simply replace Executor to Executor_d in src/Main.py.

About

The code of PEN: Prediction-Explanation Network to Forecast Stock Price Movement with Better Explainability


Languages

Language:Python 100.0%Language:Shell 0.0%