Quality — selection & rebalancing

How the top stocks are selected

At each rebalance, every S&P 500 company is scored by return on equity (ROE) — how much profit it generates per dollar of shareholder equity:

score = net income ÷ shareholder equity (most recent fiscal year)

The engine holds the N highest-ROE companies in equal weight. High, consistent ROE is the classic marker of a profitable, durable business; Quality pairs naturally with Low Volatility as a defensive style. Companies with missing or non-positive equity are skipped.

When it buys and sells (the rebalance)

Prices are month-end closes. Quality ranks on the prior month-end and trades at the current month-end close, using the latest fiscal-year figures reported as of that date.

Worked example — N = 5, quarterly rebalance

Data window & caveats. Fundamentals come from yfinance, which only exposes about 4–5 years of annual statements. So the Quality backtest effectively begins around 2023 — earlier months have no fundamentals and are skipped (much like Momentum's 12-month warm-up), while Market Cap, Momentum, and Low Volatility still run from 2016. It uses annual figures (not trailing-twelve-month), applied with a roughly one-year reporting lag, and scores on ROE only (not a multi-metric quality composite), on the current S&P 500 membership. Every trade is modeled at the month-end close. Educational only — not investment advice.

The Rebalance style controls what happens to the weights at each rebalance — a full equal-weight reset, a reset only when the line-up changes, or trading just the additions and removals.

Run this backtest →