It's a general truth about the stock market that share prices tend to follow business fundamentals over the long term. Therefore, if a company can grow its business strongly over five years, there's a good chance that its stock price will follow.

Yet, shorter-term stock moves don't always seem so logical. Take two of the biggest winners of 2023: online car-buying platform Carvana (NYSE: CVNA) and Burger King franchisee Carrols Restaurant Group (NASDAQ: TAST). These two stocks absolutely crushed the S&P 500 this year. But one wouldn't have expected these sensational returns considering their lackluster revenue results over the past year.

CVNA Chart

CVNA data by YCharts

What gives? It's all about the market's perception of the fundamentals and also what could lay ahead. In 2022, business was deteriorating at Carvana and Carrols. Worse yet, both companies carried considerable long-term debt -- not good when interest rates are rising. Both stocks consequently fell to all-time lows (or near to it) based on their price-to-sales (P/S) multiples.

Yet, in 2023 the market flipped. Investors now believe things will get better, and the valuations for Carvana and Carrols consequently have soared. Carvana renegotiated some of its debt and bought itself more time whereas Carrols returned to profitability. Therefore, these fundamental improvements sparked a change in how investors feel about these two companies.

What really also helped was that market sentiment was extraordinarily low to begin with -- and now the market's outlook has improved.

CVNA Chart

CVNA data by YCharts

Looking to 2024

Turning to 2024, let's consider thee other stocks that are currently down and out: car parts retailer Advance Auto Parts (AAP 0.58%), shoe retailer Foot Locker (FL 0.23%), and premium mattress company Sleep Number (SNBR -0.35%). Could these be the next bounce-back opportunities? As seen in the 10-year chart below, all three trade near all-time low valuations.

AAP PS Ratio Chart

AAP PS Ratio data by YCharts

If market sentiment improves for Advance Auto Parts, Foot Locker, and Sleep Number in 2024, then these stocks could soar. But investors will want to make sure the company's long-term business prospects are also set to improve, not just how the market feels about a stock in the short term.

With this in mind, let's take a closer look at the pros and cons for Advance Auto Parts, Foot Locker, and Sleep Number -- and how things could improve for each company. Be sure to read to the end to see which one I believe is best set up beyond just next year.

1. Advance Auto Parts

Advance Auto Parts has absolutely fallen apart operationally. Net sales are at an all-time high, but through the first three quarters of 2023, the company's operating profit is down 65% from the comparable period of 2022. Its paltry operating margin of 2% is extremely disappointing considering operating margins for some of its closest competitors are 10 times this amount.

Advance Auto Parts could surprise investors in 2024. Again, it's not facing a consumer demand problem -- sales are at all-time highs. It's facing operational issues. To fix its operations, the company just brought in a new CEO who's shaking up the rest of the leadership team.

And one change in particular has caught my eye: The company plans to sell its Worldpac brand. Advance's margins started slipping after acquiring Worldpac in 2014. Selling it now could both improve margins and give it a cash infusion to pay down debt.

2. Foot Locker

As with Advance Auto Parts, Foot Locker's profits have cratered in 2023. Through the first three quarters, the company's net income is down by almost 82% year over year.

Management has lowered prices to stimulate demand as much as possible, which is why profits have dropped. And overall sales are still down 9% despite all of this promotional activity.

In fairness to Foot Locker, the last few years have been a huge challenge for retail businesses. The pandemic produced incredible surges in demand, and the subsequent drop-off has been unpredictable. Even with these complexities, Foot Locker has stayed profitable on a trailing-12-month basis, which counts for something.

In 2024, there's a good chance that the retail environment will get more predictable for management as the economy continues to move further away from the pandemic. If management is able to pull back on promotional sales, the company's profits could bounce back, improving the market's feelings about Foot Locker.

3. Sleep Number

There's often cyclicality in the mattress industry and Sleep Number's sales are currently dropping. As management said in its most recent earnings call, "The bedding industry has now been operating at recessionary levels for two years." In response, management is closing 40 to 50 underperforming stores (out of about 650) and laying off 500 employees.

Even with the struggles, Sleep Number still has a year-to-date net profit of almost $10 million. And it believes it will be cash-flow-positive in 2024 even if things get worse.

And that's an interesting proposition: If consumer demand stays the same or even improves in the coming year, the company's cash flow could soar and pleasantly surprise the market.

Are any long-term buys today?

So what conclusions are to be drawn about these three stocks? In the case of Foot Locker, I do question the long-term viability of the business model. Management expects business to grow as e-commerce and loyalty sales meaningfully increase by 2026.

But considering that the shoe companies (whose merchandise it sells) all have e-commerce portals of their own these days, that could be a hard proposition. Foot Locker could be forced to keep incentivizing customers with bargain prices -- and bargain prices are part of its problem.

Therefore, while Foot Locker stock is dirt cheap and results in 2024 could be better, I wouldn't personally bet on improving long-term fundamentals.

At Sleep Number, the sales and marketing budget is extreme at over 40% of net sales. I do believe this brand has staying power, but I'm slightly concerned with that level of spending when sales are expected to continue to be lackluster in the coming year.

Sleep Number stock could eventually bounce back. But the business fundamentals could also still be challenged for a while -- if it pulls back on marketing, sales could drop but high marketing spending hurts profitability. Therefore, investors might be better off waiting.

That leaves Advance Auto Parts as the best balance of risk and reward of these three. Investors today are putting a lot of faith in a new management team, which is a little risky. But it's less risky than betting on the past management team and its track record. Moreover, the plan to get margins back up seems sound, and I think this stock will turn heads in 2024 as profits improve.

In my view, Advance Auto Parts is undoing the negative impacts of a bad acquisition from years ago. And that could be the first step toward long-term fundamental improvements to the business.