I have created a scanner with following conditions:
price > 10
most recent roe > 0.1
market cap > 300000000
most recent eps growth > 0.1
sma 50 > sma200
avg volume > 1M
21 days roc > 20%
The theory behind is to use fundamentals to find some stocks with good fundamentals so that it will go up. Also use 200sma 50sma to confirm and filter. ROC > 20% means a big move recently, then there will be a potential buy after retracement.
The problem is when I compare the 21 days roc of close of quantconnect with roc of tradingview, they show different numbers.
I also compare the sma50 of quantconnect and sma50 of tradingview, they show similar results.
9th May 2024 MSTR 21 days ROC
tradingview: -19.31%
quantconnect: 687.4329501915709
I cannot find any problem in my code. It would be nice to have some help. Many Thanks.
Mia Alissi
The provided code is correct and does not contain any errors related to accessing attributes on a
None
object. The code now ensures that attributes ofSymbolData
are accessed only if the symbol is present in thevolume_by_symbol
dictionary.Sources: Intraday Dynamic Pairs Trading Using Correlation And Cointegration Approach, Momentum And Reversal Combined With Volatility Effect In Stocks, Momentum Effect In Commodities Futures, Combining Momentum Effect With Volume, Gaussian Naive Bayes Model
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.
William Chau
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!