Skip to content

JingyiGu/IndexGAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

IndexGAN

Implementation of Stock Broad-Index Trend Patterns Learning via Domain Knowledge Informed Generative Network

Train the model

Step 1: Install the packages

  • 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

Step 2: Preparation

  1. Download pre-trained word vectors from GloVe. Make a directory of ./data/glove/ and save glove.6B.50d.txt.
  2. Create a directory ./outputs to save the training log and trained model

Step 3: Run the model

The models with best performance: ./saved_model/data/final_model.pth

Corresponding parameters: ./saved_model_data/args.txt

DJI

python ./code/train.py \ 
    --data dji \
    --num_epochs 100 \
    --enc_size 100 \
    --dec_size 200 \
    --w2v_size 6 \
    --freq 5

SPX

python ./code/train.py \
    --data spx \
    --num_epochs 80 \
    --enc_size 100 \
    --dec_size 50 \
    --w2v_size 3 \
    --freq 7

Citation

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}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages