Implementation of Stock Broad-Index Trend Patterns Learning via Domain Knowledge Informed Generative Network
- python 3.9.6
- pandas 1.3.1
- numpy 1.21.1
- nltk 3.6.2
- ta 0.7.0
- scikit-learn 0.24.2
- keras-Preprocessing 1.1.2
- torch 1.9.0
- tqdm 4.62.0
- matplotlib 3.4.2
- Download pre-trained word vectors from GloVe. Make a directory of ./data/glove/ and save glove.6B.50d.txt.
- Create a directory ./outputs to save the training log and trained model
The models with best performance: ./saved_model/data/final_model.pth
Corresponding parameters: ./saved_model_data/args.txt
python ./code/train.py \
--data dji \
--num_epochs 100 \
--enc_size 100 \
--dec_size 200 \
--w2v_size 6 \
--freq 5
python ./code/train.py \
--data spx \
--num_epochs 80 \
--enc_size 100 \
--dec_size 50 \
--w2v_size 3 \
--freq 7
If you use this code for your research, please kindly cite our paper:
@article{gu2023stock,
title={Stock Broad-Index Trend Patterns Learning via Domain Knowledge Informed Generative Network},
author={Gu, Jingyi and Deek, Fadi P and Wang, Guiling},
journal={arXiv preprint arXiv:2302.14164},
year={2023}
}