Warren Buffett bought Berkshire Hathaway (BRK.A -0.39%) (BRK.B -0.56%) about 60 years ago. At the time the business was in decline and the purchase seemed like folly. But today, Berkshire Hathaway is worth over $1 trillion. And it reached this height thanks to Buffett smartly reinvesting the company's cash over the decades.

Given his impressive track record, I steadily study Buffett's mentality to improve my own investing skills. My office is littered with highlighted and underlined copies of his annual letters to shareholders as well as worn-out books on Buffett. Suffice it to say I'm a student and a fan.

On Nov. 14, Berkshire Hathaway released its quarterly stock holdings to the public. Normally I'm intrigued by the investing decisions. But this time, the company sold Ulta Beauty (ULTA -0.91%) and Floor & Decor (FND -1.16%). And I think those moves are mistakes.

I have high respect for Warren Buffett and Berkshire Hathaway, so I don't say this flippantly. But I believe shares of Ulta Beauty and Floor & Decor are poised to outperform the S&P 500 over the next five years. And that's why I humbly disagree with Berkshire's decisions to sell.

1. Ulta Beauty

With over 1,400 locations already, Ulta Beauty is a large retail chain for cosmetics, which suggests that future growth opportunities are limited. This is reflected in management's guidance for 2024, which implies a slight pullback in net sales as same-store sales modestly drop. This lackluster growth has investors souring on the stock.

Growth is certainly important. But there are other paths to strong stock performance and Ulta Beauty has what it takes. For starters, the company is strongly profitable even in slower times for business. It expects an operating margin of close to 13% this year and it expects to keep it above 12% long term.

With profits, Ulta Beauty is repurchasing shares -- it just authorized a $3 billion buyback plan in October. And reducing the share count can boost its earnings per share (EPS) at a much faster rate than revenue. In fact, management expects double-digit EPS growth from here.

Double-digit EPS growth can be enough to boost Ulta Beauty stock at a faster rate than the S&P 500. Moreover, I believe there's little risk with this investment. Cosmetic spending is extremely resilient. And the stock trades at its third lowest price-to-earnings (P/E) valuation ever, mitigating downside risk if profits keep climbing.

ULTA PE Ratio Chart

ULTA PE Ratio data by YCharts

2. Floor & Decor

Floor & Decor stock has dropped 30% from its all-time high. And the short story is that the home-improvement market is contracting, impacting the company's sales. Its same-store sales are expected to drop about 8% year over year in 2024. But I don't think it's a problem to worry about right now. As the chart below shows, sales growth largely mirrors existing U.S. home sales.

US Existing Home Sales Chart

US Existing Home Sales data by YCharts

I'm not an eternal optimist here. To the contrary, if home sales were to pick up and Floor & Decor's sales still remained challenged, that would be a time for serious concern. But I believe fears are premature. The housing market is cyclical and should eventually pick back up, boosting Floor & Decor when that happens.

With only 241 locations as of the end of the third quarter of 2024, Floor & Decor has plenty of room for expansion. In fact, management is targeting 500 locations long term. In 2024 it's opening 30 new stores total, 20 of which it had already opened prior to the end of Q3. And in 2025 it expects to open 25 more -- a slower pace than usual, acknowledging the soft housing market.

During this lean time, Floor & Decor's management is maintaining profitability by cutting expenses where it can. Granted, its profit margin through the first three quarters of 2024 is only 4.7% -- it's been as high as 9% in recent years. But these profits mean that the company is still getting stronger financially, setting it up well for when the housing market recovers.

I'm not sure when the housing market will recover and neither is Floor & Decor's management. But given the usual ebb and flow in the housing market, I expect a recovery within the next five years. And when that happens, I would expect sales to bounce back and profit margins to rise back to more historical levels. And this will almost certainly translate to a strong performance for the stock.

Buffett's Berkshire Hathaway sold Ulta Beauty stock and Floor & Decor stock and the company is known for making great investing decisions. But if you're looking to outperform the S&P 500 over the next five years, I believe both Ulta Beauty and Floor & Decor provide low-risk chances to do just that. For this reason, I humbly disagree with the decision to sell and I believe both stocks are good ones to buy today.