Skip to content

An automated stock screening system which isolates top companies based on time-tested growth criteria.

License

Notifications You must be signed in to change notification settings

starboi-63/growth-stock-screener

Repository files navigation

Growth Stock Screener

Growth Stock Screener

Official Website

An automated stock screening system which isolates and ranks top-tier growth companies based on relative strength, liquidity, trend, revenue growth, and institutional demand.

Features:

  • Five distinct screen iterations based on time-tested criteria for predicting stock super-performance.
    • RS Ratings calculated using methodology from William O'Neil Securities.
    • Stage-2 uptrend criteria derived from strategies of U.S. investing champions Mark Minervini and Oliver Kell.
    • Revenue growth sourced directly from the SEC's EDGAR XBRL data APIs.
  • Customizable screen settings for fine-tuning.
  • Rapid web scraping using asynchronous requests.
    • Utilize aiohttp and asyncio when desired data is present in a website's static HTML structure.
    • Deploy a thread pool to launch concurrent Selenium browser instances when desired data is dynamically added to the DOM by JavaScript.
  • Parsable JSON outfiles for evaluation of screen criteria.
  • Colorful logging in the terminal.
  • Easy-to-access .csv outfiles storing screen results.
  • Support for Linux, Mac, and Windows.
    • Tested on Ubuntu 22.04.3, macOS Sonoma 14.5 (23F79), and Windows 11 22H2.

Installation

Prerequisites

First, ensure that you have Python 3.11+ and Firefox installed.

Note for Mac users: Python now includes its own private copy of OpenSSL and no longer uses Apple-supplied OpenSSL libraries. After installing Python, navigate to your Applications/Python X.XX/ folder and double-click Install Certificates.command.

Note for Linux users: the 'snap' version of Firefox that comes pre-installed may cause issues when running Selenium. To troubleshoot, follow these instructions to install Firefox via 'apt' (not snap).

Next, navigate to the directory where you would like to install the screener, and run the following commands in a terminal application:

Clone this Repository:

git clone https://github.com/starboi-63/growth-stock-screener.git

Navigate to the Root Directory:

cd growth-stock-screener

Install Python Dependencies:

pip3 install -r requirements.txt

Usage

Running the Screener:

python3 growth_stock_screener/run_screen.py

Modifying Settings:

To customize screen settings, modify values in settings.py.

Viewing Results:

Screen results are saved in .csv format in the project root directory, and can be opened with software like Excel.

Screen Results

Troubleshooting Errors:

By default, the screener attempts to calculate an ideal number of concurrent broswer instances to create based on the number of CPU cores present on your machine. In rare cases, this number may be too high. If you notice failed stock symbols with errors such as Browsing context has been discarded, Tried to run command without establishing a connection, WebDriver session does not exist, or Failed to decode response from marionette during the trend or institutional accumulation iterations, you are likely creating too many browser instances at once.

Consider decreasing the value of threads in settings.py to 1-3 if you are experiencing this.

Screen Iterations

An initial list of stocks from which to screen is sourced from NASDAQ.

NASDAQ Listings

Then, the following screen iterations are executed sequentially:

Iteration 1: Relative Strength

The market's strongest stocks are determined by calculating a raw weighted average percentage price change over the last $12$ months of trading. A $40\%$ weight is attributed to the most recent quarter, while the previous three quarters each receive a weight of $20\%$.

$$\text{RS (raw)} = 0.2(Q_1\ \%\Delta) + 0.2(Q_2\ \%\Delta) + 0.2(Q_3\ \%\Delta) + 0.4(Q_4\ \%\Delta)$$

These raw values are then assigned a percentile rank from $0\to 100$ and turned into RS ratings. By default, only stocks with a relative strength rating greater than or equal to $90$ make it through this stage of screening.

Iteration 2: Liquidity

All micro-cap companies and thinly traded stocks are filtered out based on the following criteria:

$$ \begin{aligned} \text{Market Cap} &\geq $1\ \text{Billion}\\ \text{Price} &\geq $10\\ 50\ \text{day Average Volume} &\geq 100,000\ \text{Shares} \end{aligned} $$

Iteration 3: Trend

All stocks which are not in a stage-two uptrend are filtered out. A stage-two uptrend is defined as follows:

$$ \begin{aligned} \text{Price} &\geq 50\ \text{Day SMA}\\ \text{Price} &\geq 200\ \text{Day SMA}\\ 10\ \text{Day SMA} &\geq 20\ \text{Day SMA} \geq 50\ \text{Day SMA}\\ \text{Price} &\geq 50\%\ \text{of}\ 52\ \text{Week High} \end{aligned} $$

Iteration 4: Revenue Growth

Only the most rapidly growing companies with high revenue growth are allowed to pass this iteration of the screen. Specifically, the percent increase in the most recent reported quarterly revenue versus a year ago must be at least $25\%$; if available, the percent increase in the prior period versus the same quarter a year ago must also be at least $25\%$. Revenue data is extracted from XBRL from company 10-K and 10-Q SEC filings, which eliminates foreign stocks in the process.

The current market often factors in future revenue growth; historically, this means certain exceptional stocks have exhibited super-performance without having strong on-paper revenue growth (examples include NVDA, UPST, PLTR, AI, etc.). To ensure that these stocks aren't needlessly filtered out, a small exception to revenue criteria is added: stocks with an $\text{RS} \geq 97$ can bypass revenue criteria and make it through this screen iteration.

Iteration 5: Institutional Accumulation

Any stocks with a net-increase in institutional-ownership are marked as being under accumulation. Institutional-ownership is measured by the difference in total inflows and outflows in the most recently reported financial quarter. Since this information lags behind the current market by a few months, no stocks are outright eliminated based on this screen iteration.

About

An automated stock screening system which isolates top companies based on time-tested growth criteria.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages