i've been trying to recreate the “2.11 Sharpe” mean reversion strategy as outlined here:
The rules are straight forward but for some reason I'm not only way below his results, but also below the benchmark.
You can see i structured it with a SymbolData class where I'm keeping a track of the indicators for each symbol in the universe (SPY). I'm working on minute data as I understand that allows me to really get the opening time 09:31 instead of the 10:00 data. But this also didn't make any difference.
And then implemented the rules:
[QUOTE]
- Compute the rolling mean of High minus Low over the last 25 days;
- Compute the IBS indicator: (Close - Low) / (High - Low);
- Compute a lower band as the rolling High over the last 10 days minus 2.5 x the rolling mean of High mins Low (first bullet);
- Go long whenever symbol closes under the lower band (3rd bullet) and IBS is lower than 0.3;
- Close the trade whenever close is higher than yesterday's high;
- Also, close the trade whenever the price is lower than the 200-SMA.
[ENDQUOTE]
Given I'm x,xxx % off the article, I must be doing something drastically wrong?
Mia Alissi
Based on the knowledge sources provided, I can guide you on how to implement some of the rules mentioned in your strategy using QuantConnect's LEAN engine. However, I don't have the exact implementation for the “2.11 Sharpe” mean reversion strategy you mentioned.
Here's how you can implement some of the rules in Python:
Please note that this is a simplified version and you might need to adjust it according to your needs. Also, remember to handle the data properly, especially when dealing with multiple symbols.
For more detailed information on how to use QuantConnect's API, you can refer to the official documentation.
If you're still having trouble, I recommend posting your question on the QuantConnect Forum where the community and the QuantConnect team can provide more specific help.
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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Hannes R
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 QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect 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. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!