Quant500 Academy

1. What a stock screener is and why it saves you time

Level 4: Stock Screening

Filtering 500 companies by hand, checking one by one whether they meet a set of criteria, is simply not viable. A stock screener is exactly the tool that solves that problem: a filter that sweeps a universe of shares and returns only those that meet the conditions you define — a minimum market capitalization, a maximum price/earnings ratio, a sector, or any technical indicator.

There are ready-made free screeners, such as Finviz or TradingView, and they are a good starting point. But almost all of them cap real customization unless you pay for a subscription — and as soon as your filtering criterion combines several specific conditions (a particular moving average, a ratio computed your way, an indicator you defined yourself), the only way to have full control is to program it yourself.

The good news is that a home-made screener does not require much infrastructure: with the data you already know how to download (Level 3) and a few lines of pandas, you can build a working one in a Jupyter notebook. The rest of this level builds three real screeners, from the simplest to the most sophisticated, over the 500 companies of the S&P 500.

The first step, common to all three, is having clean data to start from — exactly the same download and cleaning process as in Level 3 (scraping tickers from Wikipedia, downloading with yfinance, dropna to remove gaps). From there, each screener adds its own filtering criterion on top of that same data.

To go deeper into this lesson

The rest of Quant500

What you are learning, applied to the index every day:

The model portfolio, weekly in your inbox

Every Saturday, its week in one minute: how it went, the best and the worst, and which insiders bought with their own money. Plus, the day the model is rebuilt, which stocks come in and which go out. A simulation, not advice. At most one email a week, no ads, no account; one-click unsubscribe. Made by one person: Pol Gracia.

A model portfolio with simulated results, not a personalized recommendation. Your email is used for this only: privacy.

Behind the Academy and the rest of Quant500 there is one person: Pol Gracia Serrahima.