Code Monkey home page Code Monkey logo

adv-alstm's Introduction

Adv-ALSTM

Code for paper "Enhancing Stock Movement Prediction with Adversarial Training" IJCAI 2019

Requirements

Python 3.6.1

Tensorflow 1.8.0

Numpy 1.14.5

To run the proposed Adv-ALSTM, ALSTM, and LSTM on the ACL18 and KDD17 dataset, run the commands in the hyperparameter file.

Reference

For usage of this code, please cite our paper

@article{feng2019enhancing,
  title={Enhancing Stock Movement Prediction with Adversarial Training},
  author={Feng, Fuli and Chen, Huimin and He, Xiangnan and Ding, Ji and Sun, Maosong and Chua, Tat-Seng},
  journal={IJCAI},
  year={2019}
}

adv-alstm's People

Contributors

fulifeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

adv-alstm's Issues

Attention Layer (PyTorch)

Hello, thank you for sharing this work. Can I find the PyTorch codes of your attention layer anywhere?

about parameter

Thanks for your good work.

But from parameter file which could reproduce your work,

Adv-ALSTM:
    python pred_lstm.py -l 5 -u 4 -l2 1 -v 1 -rl 1 -q ./saved_model/acl18_alstm/exp -la 0.01 -le 0.05

Adv-ALSTM:
    python pred_lstm.py -p ./data/kdd17/ourpped/ -l 15 -u 16 -l2 0.001 -v 1 -rl 1 -q ./saved_model/kdd17_alstm/model -la 0.05 -le 0.001 -f 1

seems attention("-a") and hinge loss("-hi") is not used, which is a key improvement points of your paper,
could you please tell me the reason ? Thanks !

Question about the pretrained model

Hello, thank you for your sharing!
I can reproduce your results successfully. But I notice that when you conduct your 'Adv-ALSTM' method, you load a pretrained model, which is not used for other methods. I wonder how can I get the pretrained model because when I train the model with random initialization, I can't get a good result.

About skipping label 0 when constructing dataset

Firstly, thank you for sharing your code and data.
However, when loading data, the code just skips samples with label 0, whose next-day return is between -0.5% and 0.55%. It's not good especially for test set. For unknown data in test set, It actually have 3 labels, and the code destroys the distribution of test data.
I just wonder whether my understand is correct.

Question about 'ourpred' data

I followed the feature definition in the paper to build the dataset, many of the data are very small numbers, but in your dataset there are many numbers greater than 1, according to the formula for defining features, these data should be very small, so it is not very clear how the data in ourpred is built

为什么训练数据排列是把一个时间点的所有数据顺序排列?

比如一只股票s,它的输入数据不应该是按时间来排列的吗?看代码中的实现是:按时间点开始,把所有当前时间点的股票数据排列在一起,然后在训练的时候,取batch个数据,这个时候这个输入序列并不是时间序列了呀,望解惑!!!

About 'ourpped' data (both KDD and ACL)

First of all, Thank you for sharing this work.
We have several questions. May I ask if you don't mind?

  1. We've researched your work, but we are not able to find your code to generate 'ourpped' data.
    Could you let us know where the code exist or share the code?

  2. In raw data in kdd, there are the number, -123321. What dose this number mean? Plus, I wonder meanings/information of each column. (There are 13 columns in AAPL. However, there are only 9 columns (OLHC, volumes) in kdd/price_long_50)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.