Very impressive results on your algo! As Dan mentioned above, I think the decreasing leverage over time is a minor issues, and in fact it was a simple fix for me to update and re-run the backtest. I only modified a single line of code in a cloned version of your algo (I've attached it here in this response, along with the corresponding tearsheet). The Max Drawdown just goes up a slight amount, from -10% to -12%, and the Sharpe Ratio improves as well. As well, for clarification, Max Drawdown is defined as 'peak-to-trough' drawdown, so using your hypothetical example above of "10K loss on 200K will be reported as 10% drawdown on 100K"; the 10k loss on 200k is actually only 5% drawdown.
I think you made a great point that there might be some selection bias in your universe because you mentioned you hand-selected the stocks using the criteria of being over $100 per share. This may unnaturally bias you to select known good performing stocks (since most companies do not IPO at $100, thus if they were up at $100 when you selected them they would have no doubt gone up significantly historically). This is just speculation on my part, but worth investigating further. As a robustness test, perhaps you could use our fundamentals data to dynamically select the top 200 (or the same number as are in your current list) stocks by marketcap (since it seems you are using large-cap stocks) as your universe, and then have your portfolio construction logic applied to this dynamically selected universe and then see how well the performance compares to the existing algo.
Let me know if you have any other questions or thoughts.
Small aside: in the attached backtest, I renamed the 'context.XLE', and 'xle' variables to 'context.HEDGE' and 'hedge' just to make the code more readable since the SPY sid() was being stored off in context.XLE and had me confused for a little while :)
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.