DEV Community

penny penguin
penny penguin

Posted on

I Ranked 151 US Large-Caps With a 15-Line Model

I Ranked 151 US Large-Caps With a 15-Line Model

TL;DR: A transparent, reproducible factor screen that ranks 151 US large-caps on momentum + quality. Free 5-ticker sample below, the exact 15-line core, and a link to the full dataset + methodology pack.


The Problem

Most factor screens you see online are one of two things:

  1. Too simple — single-factor (just momentum, just value) with no quality leg, so you're long the most volatile lottery tickets.
  2. Too complex — proprietary data, black-box models, "secret sauce" you can't inspect or reproduce.

I wanted something in the middle: simple enough to understand and run yourself, robust enough to be useful.

The Model (15 Lines)

Here's the entire scoring logic:

import pandas as pd
import numpy as np

# factors: DataFrame with one row per ticker, columns: ret_12m, vol_ann
mom_z = (factors["ret_12m"] - factors["ret_12m"].mean()) / factors["ret_12m"].std()
vol_z = (factors["vol_ann"] - factors["vol_ann"].mean()) / factors["vol_ann"].std()

momentum = mom_z
quality = -vol_z
composite = 0.5 * momentum + 0.5 * quality

factors["composite"] = composite
factors = factors.sort_values("composite", ascending=False).reset_index(drop=True)
factors.insert(0, "rank", range(1, len(factors) + 1))
Enter fullscreen mode Exit fullscreen mode

That's it. 50% momentum (12-month return z-score) + 50% quality (negative volatility z-score). No look-ahead. No proprietary data. No black box.

Full pipeline (for context)

  1. Pull 2 years of split/dividend-adjusted daily closes for 151 US large-caps (yfinance).
  2. Over the trailing 252 trading days, compute per ticker: 1m/3m/6m/12m returns, annualized realized vol, max drawdown, distance from 52-week high.
  3. Z-score the 12-month return cross-sectionally → Momentum.
  4. Z-score annualized vol and negate → Quality.
  5. Composite = 0.5 × Momentum + 0.5 × Quality, rank 1–151.

Free Sample: Top 10 (2026-09-14)

Here are the top 10 tickers by composite score from the full 151-stock screen:

# Ticker 12m Return Annualized Vol Composite
1 MU +505.6% 81.6% +1.650
2 VLO +153.6% 36.1% +0.749
3 WDC +335.6% 80.5% +0.737
4 STX +296.2% 75.2% +0.642
5 MPC +121.4% 34.2% +0.615
6 JNJ +55.5% 19.2% +0.595
7 PSX +102.8% 30.9% +0.589
8 INTC +288.0% 79.9% +0.489
9 FDX +70.5% 28.3% +0.469
10 TGT +79.9% 30.6% +0.469

What the screen is saying

  • Memory is the momentum story of the year. MU leads the entire universe with a +506% trailing-12m return (HBM cycle), followed by WDC (+336%), STX (+296%), and INTC (+288%). The momentum leg is doing the heavy lifting at the top.
  • Refiners are the quality story. VLO, MPC, PSX all sit in the top 7 with low volatility (31–36% ann), near 52-week highs, and double-digit 12m returns — the classic "earnings beat + low vol" profile the quality leg rewards.
  • Defensives are quietly ranking well. JNJ (#6) combines modest positive momentum with the lowest vol in the universe — the model's natural hedge sleeve.
  • The bottom of the table is a software/fintech cluster. ORCL, NOW, INTU, ZS, PLTR all show deep 52-week drawdowns combined with elevated vol — the model flags them as both weak momentum and poor quality.
  • The composite is doing exactly what it's designed to do — rewarding smooth, sustained momentum and penalizing lottery-ticket vol.

Get the Full 151-Stock Dataset

The free sample above is 10 tickers. The full pack includes:

  • ✅ All 151 tickers with raw factors, z-scores, and composite scores
  • ✅ Complete methodology documentation (factor definitions, z-scoring, weighting, edge cases)
  • ✅ The full runnable Python script with configuration knobs (universe, window, weights)
  • ✅ Dated CSV you can load into pandas and extend

👉 Get the Full Dataset + Methodology Pack on Whop →

$29 one-time. Whop is the merchant of record. You get the files immediately after purchase.

Why I'm Sharing This

I think most factor screens are either too simple or too complex. This sits in the middle: simple enough to understand and reproduce, robust enough to be useful.

The model is not magic. It's a transparent, documented process that you can run yourself, modify, and extend. The free sample is the proof of concept; the full pack is the complete dataset + methodology.

Disclaimer

This is research/educational output from public market data. Not personalized investment advice, not a recommendation to buy or sell any security. Past performance does not guarantee future results. Consult a licensed financial advisor before acting on any data.


LaunchTower — independent market-data desk. Data: yfinance (public). Regenerated from live data at generation time.

Top comments (0)