Marigold / universal-portfolios

Collection of algorithms for online portfolio selection
Other
779 stars 214 forks source link

Predictive measure for portfolio rebalancing #57

Closed jmrichardson closed 3 years ago

jmrichardson commented 3 years ago

Hi,

I am very new to OLPS/universal-portfolios and very impressed! I was hoping that UP could implement a ranking strategy using a predictive measure to rebalance the portfolio. The idea is described here and basically involves balancing a portfolio daily based on a prediction value for each equity (probability in my case). Is this something that could be implemented? I have looked through the algos and thought it could be done with something like best_so_far?

Thanks for any guidance!

jmrichardson commented 3 years ago

Downloaded and learned more about OLPS and this lib. Looks like it does what I need it to do. Thanks.

Marigold commented 3 years ago

Hey @jmrichardson, I found the reddit post quite interesting and thought it would be a good example for this package. So I've done a quick implementation in this notebook https://github.com/Marigold/universal-portfolios/blob/master/examples/Beating%20the%20market%20with%20the%20simple%20possible%20predictive%20metric.ipynb. You can run experiment with it and validate with mybinder https://mybinder.org/v2/gh/Marigold/universal-portfolios/HEAD?urlpath=https%3A%2F%2Fgithub.com%2FMarigold%2Funiversal-portfolios%2Fblob%2Fmaster%2Fexamples%2FBeating%2520the%2520market%2520with%2520the%2520simple%2520possible%2520predictive%2520metric.ipynb

jmrichardson commented 3 years ago

hi @Marigold ,

Wow! Thank you so much for putting this together. I have looked through the notebook and amazed how efficiently you rebuilt the methodology! I am going to spend some time learning how to use your lib withthese noteboooks. Also, would it be ok to reply to the reddit post with a reference to the notebook? I think it would be helpful to others who may be enticed by his claim. I was thinking how could it be possible that simply ranking a basket of stocks by almost any measure and rebalancing each day produce those kind of results? Thank you again and looking forward to learning and using this lib!

Marigold commented 3 years ago

I am going to spend some time learning how to use your lib withthese notebooks

There's actually nothing fancy from the library. It just constructs weight matrix and then run CRP which is the simplest thing possible.

Also, would it be ok to reply to the reddit post with a reference to the notebook?

Absolutely, but please be aware that the notebook might have bugs (especially due to my misunderstanding).

I was thinking how could it be possible that simply ranking a basket of stocks by almost any measure and rebalancing each day produce those kind of results?

Even random long strategy on Nasdaq would have huge sharpe ratio during that period. I think that this strategy prefers high volatility stocks which performed even better.