jankrepl / deepdow

Portfolio optimization with deep learning.
https://deepdow.readthedocs.io
Apache License 2.0
903 stars 138 forks source link

Learn to rank portfolio #114

Open rspadim opened 3 years ago

rspadim commented 3 years ago

Hello, could be posssible learn to rank examples with deepdow?

https://www.sciencedirect.com/science/article/abs/pii/S0925231217311098 https://www.researchgate.net/publication/315493458_Stock_portfolio_selection_using_learning-to-rank_algorithms_with_news_sentiment

https://arxiv.org/abs/2012.07149

https://ieeexplore.ieee.org/abstract/document/7519089

https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0241573

jankrepl commented 3 years ago

Thanks for creating this issue!

I had a quick look at some of the papers and I have to admit that Learning to rank could be easily applied to portfolio optimization. To me the only handwavy thing is taking the predicted ranks and turning them into portfolio weights. Anyway, deepdow supports any network that spits out portfolio weights. So as long as you keep things differentiable (using torch operations only) you are fine. In other words, nothing prevents you from having a RankNet, ListNet or similar inside of you network!

If you have anything more specific in mind feel free to describe it and maybe we can think of adding it to the codebase.

kayuksel commented 1 year ago

Hello, I've implemented a Siamese architecture model for contrastive-learning (by pair-wise ranking of the stock returns). It can be utilized for ranking the models. The accuracy in predicting the sell-offs is quite good and can be improved by fundamental ratios. I think it is a good approach for pre-training deep models for RL-based portfolio management, as it is done here. I think such pre-training and then transfer-learning are important as it may not be possible to converge a good model during early RL training. Let me know if you would be interested in adding that here, and I would share the codes for the contrastive pre-training (of GRU).