QUANTCONNECT COMMUNITY
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.
Advocate Hasan Raza Khan
Not a Dip Buyer: The class is named EliteDipBuyer_MOC. However, you are buying stocks that are above their 200-SMA with the highest 252-day momentum (Sharpe). This is a classic Trend-Following Breakout/Momentum strategy, not a mean-reversion dip buyer.
Not MOC: The name says MOC (Market On Close), but your schedule rule is set to self.time_rules.at(8, 0). Orders placed at 8:00 AM ET will be queued and executed as MOO (Market On Open) orders at 9:30 AM.
Heavy Warm-Up Memory Load You have self.settings.automatic_indicator_warm_up = True. For 200 stocks, warming up a 252-period Sharpe Ratio and a 200-period SMA means the engine has to fetch tens of thousands of historical daily bars before the algorithm even starts. While QuantConnect can handle this, it might dramatically slow down your initialization or hit memory limits depending on the tier you are running.
The Delayed Stop-Loss Your intraday stop check (on_data) perfectly identifies when a stock collapses below the Kijun-ATR support and sets stop_flag = True. However, you don't actually sell the stock until _rebalance fires at 8:00 AM the next day. If a stock flashes a catastrophic drop at 10:00 AM, you hold it for the rest of the day and overnight, absorbing all that risk, only to sell it via a MOO (Market on Open) order the next morning.
Divide by self.MAX_POSITIONS instead of len(elite). This caps your maximum position size at 15% (1.5 / 10), meaning if only 5 stocks qualify, you simply run at 0.75x total leverage, keeping your per-asset risk consistent.
Advocate Hasan Raza Khan
This data confirms that your strategy is highly regime-dependent. When the broader market is in a smooth, low-volatility uptrend, this algorithm is an absolute money-printer. But when the market shifts into a volatile bear market or sideways chop (like 2022), it bleeds capital through repeated paper-cuts.
Given how severely the strategy struggled during the 2022 bear market, have you considered adding a broader market regime filter (such as requiring the SPY to be above its own 200-day SMA) to simply pause the algorithm and hold cash during extended downtrends?
QuantConnect Reconciliation
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.
This discussion is closed