caokyhieu / DELAFO-DeEp-Learning-Approach-for-portFolio-Optimization

MIT License
23 stars 13 forks source link

DELAFO : DeEp Learning Approach for portFolio Optimization

Applications

Predict the optimized portfolio (based on Sharpe ratio) in future:

Training

All the data will be preprocessed before using to train our models.(preprocess_data.py):

Usage

Firstly, you need to download data and put it in data folder, you can download from Link download data from Entropy Contest 2019.

$ python main.py --data_path path/to/data --model model/name --load_pretrained True/False --model_path '' --timesteps_input time/window/input --timesteps_input time/window/output

--data_path: path to dataset.

--load_pretrained Bool value. True if you want to load pretrained model. Default False.

--model_path : if --load_pretrained == True . You have to specify the path to pretrained model.

--model_name : all available models at the moment are:

Additive Attention with RNN model

Self Attention with RNN model

* You can change the configuration of these models by changing the config file in config folder (We do not recommend to do it, because these hyperparameters had been tuned for these models). * You can design your own model by put it in `models` folder. **--timesteps_input** : time window for the input. **--timesteps_input** : time window for the output. ## DATA * Must be in csv file. * Now all the models just support for data have 4 fields ['ticker','date','price','volume'] like in picture: ## Requirements * python 3.6.2 * scikit-learn 0.21.3 * Keras 2.3.1 * pandas 0.25.1 * tensorflow 1.13.2 ## References We recommend you to cite our following paper when using these codes for further investigation: ```bash @inproceedings{hieu2020, title={DELAFO: An Efficient Portfolio Optimization Using Deep Neural Networks}, author={Cao Ky Hieu, Cao Ky Han, and Nguyen Thanh Binh}, booktitle={Proceedings of the 24th Pacific-Asia Conference on Knowledge Discovery and Data Mining, PAKDD 2020, Singapore}, year={2020} } ```