I believe that Joel Greenblatt’s Magic Formula is one of the methods every investor should know.
The reason?
Simplicity.
It is incredibly easy to select stocks for your portfolio using this system. In this post, I’ll show you exactly how to apply this global strategy to the Brazilian stock market (B3).
What is the Magic Formula?
Popularized in the book “The Little Book That Beats the Market”, this strategy identifies undervalued companies with high potential for solid returns.
It uses a ranking system based on two key indicators:
- EV/EBIT (Enterprise Value / Earnings Before Interest and Taxes): This measures how “cheap” a company is relative to its operating profit. In this formula, lower is better.
- ROIC (Return on Invested Capital): This measures how efficiently a company generates profit from the capital invested. Here, higher is better.
By combining these two, we find “Good companies at cheap prices.”
Step-by-Step: Ranking Brazilian Stocks
To build this ranking for the Brazilian market, we will use data from Fundamentus, a popular free financial database for B3 stocks.
Step 1: Gathering the Data
- Go to Fundamentus.com.br.
- Click on “Busca Avançada por Empresa” (Advanced Company Search).
- To filter for quality, enter
100,000in the “Liquidez” (Liquidity) field. This ensures we only look at stocks that are easy to buy and sell. - Click “Buscar” (Search). You will see a list of all Brazilian companies.
- Copy this data into a spreadsheet (Google Sheets or Excel).
Step 2: Cleaning the Spreadsheet
Keep only three columns: Ticker (Papel), EV/EBIT, and ROIC. Delete all other columns.
- Important: Delete any rows with negative or zero EV/EBIT. We only want profitable companies.
Step 3: Creating the Ranking
Now, we create the “Magic” ranking:
- Rank by EV/EBIT: Sort the list from Smallest to Largest. Assign a score from 1 to the top stock, 2 to the second, and so on.
- Rank by ROIC: Now, sort the list by ROIC from Largest to Smallest. Again, assign a score starting from 1 for the highest ROIC.
- The Magic Formula Score: Create a final column that adds the two scores together (EV/EBIT Rank + ROIC Rank).
Step 4: The Final Result
Sort your final column from Smallest to Largest. The companies at the top of the list (with the lowest combined score) are your “Magic Formula” picks for the B3!
Building Your Portfolio (The Rules)
Joel Greenblatt suggests a few specific rules when picking from the top of the list:
- Avoid certain sectors: Traditionally, the formula ignores Financials (Banks and Insurance) and Utilities (Electricity/Water) because their balance sheets are structured differently.
- Diversify: Don’t buy everything at once. Buy 2 or 3 stocks every few months until you have a portfolio of 20-30 stocks.
My Experience: I’ve been studying this formula for years. While the market is complex and risks always exist, my long-term balance has been positive.
Want to see this in action? See the [Full Results of my 5-Year Study here].
Conclusion
The Magic Formula is a systematic way to remove emotion from investing. It forces you to buy what is cheap and efficient, even if the news doesn’t look great at the moment.
Have you tried applying the Magic Formula to the Brazilian market? Share your results in the comments below!