Skip to content
/ PEN Public

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

Notifications You must be signed in to change notification settings

Shuqi-li/PEN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages