Dados B3 › Guides › Magic Formula
Guide · Quantitative strategy
How to use the Magic Formula (Greenblatt) on B3 stocks
In "The Little Book That Beats the Market", Joel Greenblatt proposed a two-question screen: is the company good (high return on capital) and cheap (a lot of earnings per unit of price)? The Magic Formula ranks each stock on both factors and sums the ranks. Lower sum, better.
The two factors
It isn't a single number — it's two independent rankings, then added together:
The earnings yield measures how cheap the company is: how much operating profit (EBIT) it delivers for each unit of the acquisition price (the EV, which includes the debt you'd inherit). Higher is cheaper.
The ROIC measures how good the company is: how much it earns on the capital it actually employs in the business. Higher is a better business. Greenblatt used earnings yield and return on capital precisely because one answers "is it cheap?" and the other "is it worth owning?".
How Dados B3 computes it (auditable, point-in-time)
We rank companies by earnings yield (highest to lowest) and, separately, by ROIC (highest to lowest). Each company gets two positions; we add them. The lowest sum ranks best on the Magic Formula.
EBIT comes from the standardized CVM account; EV uses market cap + net debt; and the price is point-in-time — the first trading session after the balance sheet was actually published, no look-ahead (see /guias/backtest). Every number carries its source account, so you can check it piece by piece.
The filters — and why they exist
- Banks and intermediation-based financials excluded. Greenblatt himself excludes financials. A bank (or an intermediation-based insurer such as IRB or BB Seguridade) has no EBIT or "net debt" in the operating sense — debt is the business, not a cost of capital, and applying EBIT/EV there produces garbage. An insurer that reports operationally (EBIT and revenue in the common chart of accounts), like Porto Seguro, is included normally — which is why it appears in the examples below. (More at /guias/analisar-banco.)
- Micro-caps excluded (market cap above R$ 2 bn only). In an illiquid company a tiny EV blows the earnings yield up to absurd numbers — that's noise, not a bargain. The size cut removes that false positive.
Real ranking examples (2025)
Companies ranking well on the B3 Magic Formula today, with both factors laid open:
| Ticker | Company | Earnings yield (EBIT/EV) | ROIC |
|---|---|---|---|
| WHRL3 | Whirlpool | 21% | 88% |
| PLPL3 | Plano & Plano | 19% | 47% |
| IGTI3 | Iguatemi | 18% | 15% |
| LEVE3 | Mahle Metal Leve | 16% | 42% |
| PSSA3 | Porto Seguro | 15% | 57% |
| POMO3 | Marcopolo | 14% | 20% |
| CURY3 | Cury | 12% | 101% |
Note the two-axis logic: WHRL3 pairs cheap (EY 21%) with an excellent business (ROIC 88%). CURY3 has a sky-high ROIC (101%) but is no longer that cheap (EY 12%). It's the sum of the two ranks that decides — not one factor alone.
The trap — what the screen does NOT see
The Magic Formula is a mechanical screen, not a recommendation. Three cautions:
- A high earnings yield can be cyclical profit at the peak — a commodity's EBIT at the top of the cycle vanishes at the bottom (see /guias/analisar-commodities). It can also be a declining company, "cheap" because the market already prices the fall.
- A sky-high ROIC on a holding company is usually an accounting artifact, not real operating return (see /guias/analisar-holding).
- Greenblatt proposed it as a diversified basket (dozens of names) held for about a year — not a single stock. The method is statistical; it doesn't replace judgment on each company.
How Dados B3 helps
EBIT, EV, net debt and ROIC all come with the source CVM account and a point-in-time price. The Magic Formula ranking comes ready and auditable — you can reproduce every position from the raw data. See /ranking and the /metodologia.