Hi everyone,
I am a new member of the community and I have spent my time here as a mostly as a learner, trying to grasp new concepts through the lectures and tutorials. This algorithm is the result of my first 'hands-on experience' of the Algorithm API. Most of my code is based out of concepts taught in the tutorials and lectures so one might find this extremely rudimentary.
I use the most common financial ratio - the debt to equity ratio to create a long-short equity strategy, targetting the top and bottom 2000 stocks ranked on the basis of the debt/equity value. I noticed that Quantopian ranks the metric based on the numerical value. So a company with practically zero debt to equity ratio was ranked way below than it should ideally be. So I had to short the stocks with the top ranks and vice-versa.
The algorithm is backtested on a 5-year window starting Jan'13 and ending Jan'18. Although I couldn't beat the SPY benchmark in the backtest but I learnt a lot throughout the process of creating it and this definitely serves as a kickstart for many more such algorithms to come!
Please feel free to point out any mistakes that I might have committed and do give your suggestions on how this can be improved.
AJ