Building a Virtual Stock Portfolio Using the Magic Formula
Last month I wrote about smart investing, highlighting some principles of renowned investors. But how do we actually apply these principles?
In my quest to explore technical analysis for stock investments, I decided to dive into the world of virtual portfolios. My goal? To build a portfolio based on a proven methodology, re-evaluate it every six months, and measure its performance against the broader market.
Approach
To construct this portfolio, I delved into various techniques, watching countless hours of YouTube videos to familiarize myself with the basics of stock screening and selection. Ultimately, I chose the Joel Greenblatt Magic Formula as my guiding principle. This strategy is outlined in a video by the Swedish Investor, which became my blueprint for creating a stock screener.
Step 1: Filtering Stocks
I used TIKR, a robust stock research tool, to compile my initial list of stocks. These were my filtering criteria:
Fundamental Criteria:
- Exchange: Primary exchanges (e.g., NYSE, NASDAQ)
- Market Cap: > $30M
- Total Revenue (2014, 2017, LTM): Minimum thresholds set at $5M and $10M for LTM (Last Twelve Months)
- Operating Income (2014, 2017, LTM): > $0
- Shares Outstanding (2014, 2017, LTM): > $0
Display-Only Metrics:
- Total receivables, inventory, net property, plant, and equipment (LTM)
- Accounts payable, last TEV, net debt, EBIT, forward P/E (LTM)
I focused on years where I had reliable data: 2014, 2017, and 2021. If you have access to older datasets (e.g., 2006), incorporating them might improve the analysis.
Step 2: Calculating Metrics
I transferred the filtered list into Google Sheets and added custom formulas to calculate key metrics:
- Operating Margin (LTM): Operating Income ÷ Total Revenues
- Revenue Growth (2014–LTM, 2017–LTM)
- Operating Income Growth (2014–LTM, 2017–LTM)
- Revenue/Share (2014, 2017, LTM)
- ROIC (Return on Invested Capital)
- EV/EBIT (Enterprise Value to EBIT)
Additionally, I incorporated insider trading data from InsiderScreener, using XLOOKUP to integrate the values with my spreadsheet.
Step 3: Scoring and Weighting
Each stock was scored based on four key criteria, with assigned weights:
- Growth: 20%
- ROIC: 20%
- EV/EBIT: 40%
- Insider Purchases: 20%
The final score determined the ranking of stocks.
Step 4: Additional Filters
After scoring, I applied additional filters to refine the list:
- Growth Threshold: Must exceed -5%.
- Short Interest: Must not exceed 5% (data from MarketBeat).
- Net Debt/EBIT: Must not exceed 5x.
- Exclusions:
- Oil companies (personal preference).
- Companies heavily linked to China (potential regulatory risks).
- Companies based in Israel (personal preference).
Step 5: Normalization
To account for volatility, I normalized metrics such as revenue, operating income, and growth. This adjustment reshuffled the rankings, and I recalculated scores based on normalized values.
Final Portfolio
After thorough analysis, my portfolio consisted of the following 8 stocks:
Ticker | Company Name | Sector | Price | Score | Valuation1 |
LEN | Lennar Corporation | Homebuilding | $137.19 | 89% | 18.9% below fair value |
UPS | United Parcel Service | Logistics | $125.32 | 64% | 25% below fair value |
JNJ | Johnson & Johnson | Pharmaceuticals | $144.08 | 62.9% | 46.3% below fair value |
DHI | D.R. Horton, Inc. | Homebuilding | $139.82 | 61.8% | 38% below fair value |
KMB | Kimberly-Clark Corporation | Household Products | $131.04 | 61.7% | 31.3% below fair value |
UTMD | Utah Medical Products | Healthcare Equipment | $61.47 | 61.9% | 41.5% below fair value |
GPC | Genuine Parts Company | Distributors | $116.76 | 60.2% | 44.3% below fair value |
ALSN | Allison Transmission Holdings | Machinery | $108.60 | 59.9% | 37.5% below fair value |
Note: Verisign was removed after valuation adjustments showed it was slightly overvalued.
Reflections
This methodology aligns with the principles of the Magic Formula but includes additional factors, such as insider trading and market-specific filters, to tailor it to my preferences.
I am curious to see how this portfolio performs over time. Do these principles hold up in real-world scenarios? I’ll revisit this analysis in six months to measure progress and refine the approach.
- according to simplywall.st ↩︎