Hi, how can I pick stocks that are constituents of SPY and then filter further based on historical P/E?
I would like to choose stocks that have reached a new P/E low.
QUANTCONNECT COMMUNITY
Hi, how can I pick stocks that are constituents of SPY and then filter further based on historical P/E?
I would like to choose stocks that have reached a new P/E low.
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.
Nico Xenox
Hey Jacek TrociĆski,Â
I think you're searching for this:
For the stocks that are within the SPY Index, it gets a little more difficult, you either use the QC 500 Example or you filter the 500 most liquid stocks with a market cap above 500 million in the universe
Hope it helps ;)
Jacek TrociĆski
Nico Xenox I would like to search back for the historical P/E of a stock.
E.g., compare the P/E of MSFT today vs the P/E over the last 2 years.
Do I need to create a consolidator to do that?
Nico Xenox
Hey Jacek TrociĆski,
you would have to use a rolling window because currently, we can't access fundamental historical data in the backtester.
Here's an example how you could do that:
After you done that you can then compare the values in the rolling window and the ones from the current time
Jacek TrociĆski
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!