Dear Quantopian community,
My name is Martin and I recently discovered this awesome website. I felt such a relief when I found out that there WAS a way to test investment strategies that easy.
In the context of a master thesis, I would like to test a contrarian strategy (inspired by Lakonishok, Shleifer and Vishny 1994). The strategy is the following:
for each sector i:
- Long the 10% lowest or first 10th decile of stocks from sector i ranked on a score averaging their P/E and P/B ratios
- Short the 10% higher or last 10th decile of stocks from sector i ranked on a score averaging their P/E and P/B ratios
- Reassess the composition of stocks every f weeks over the whole considered/available period (make sure that you still hold stocks from the top or bottom 10%/10-decile and make adjustments
The idea is to examine the influence of the sector i and the rebalancing frequence f on returns and risk-adjusted returns! Fun, isn't it.
My questions are:
- Suggestions on the strategy are more than welcome
- Is there a way to make the algorithm select stocks from a market by itself, instead of inputting it manually
- I am not familiar with python (more skilled in Java) and I know that this algorithm (https://www.quantopian.com/posts/trading-using-simple-p-slash-e-values-and-momentum) would help but I am not sure how to exactly use it... Any suggestions? (please?)
Thanks a lot,