If you've ever seen a stock price chart, you know that stock movements, whether up or down, are never linear.

Sometimes, the way the stock behaves in the short term can influence investors to make poor decisions. A price jump can get investors excited, leading them to buy in only to see the stock fall. A drop can scare investors into selling shares of a company they had good reason to buy, leaving them to miss out on its recovery.

Nobody can consistently time the market, which is one of the reasons long-term buy-and-hold investing is the best way to go for retail investors.

Consider, for example, Ulta Beauty (ULTA 2.47%). The stock is down 22% over the past year, seriously underperforming the S&P 500, which is up 28% at the same time. But it has been a phenomenal stock to own over the long haul, and it has crushed the broader market's gains over the past 10 years, even with its recent drop.

At least one Wall Street analyst sees a major upside. Is now a good time to buy?

Building up a beauty empire

Ulta was a beauty industry disrupter when it opened its first stores more than 30 years ago, and it remains a differentiated contender in the industry today. Beauty has historically been split into two categories: upscale and expensive or mass and cheap. You would find upscale products at the department store and cheap products at the pharmacy.

Ulta has turned that binary on its head, selling products across a wide range of prices in its megastores, in addition to accessories. It also provides salon and beauty services that its peers don't offer.

The original categories still exist in this space, but today, there's a third: the direct-to-consumer segment, which ranges across both branded physical stores and e-commerce. Ulta still stands out with comprehensive offerings that straddle all three beauty categories.

Ulta's management understood something that's still at the core of its business: Beauty enthusiasts usually don't relegate themselves to just one category of products -- they'll purchase from all of them. In the past, a consumer would have to go to different venues for different types of products. At Ulta, they can find all of them under one roof.

There are two other main elements of Ulta's unique and successful model. One is its loyalty program. Beauty enthusiasts are steady in their shopping habits, and 95% of all sales at Ulta come from program members. Its services segment is also a major element of Ulta's model and reinforces loyalty.

Managing through inflation

Ulta has been reliably able to increase its sales and profits, but it has been struggling somewhat due to inflation. Since its customers come from a wide range of socioeconomic levels and it sells nonessential products, it's susceptible to shoppers holding back on discretionary spending when their budgets are under pressure. And since it offers wares across a wide gamut of prices, it's susceptible to its shoppers switching down when penny-pinching.

Considering the macroeconomic circumstances, its performance last fiscal year was admirable. Sales rose almost 10% in its fiscal 2023 (which ended Feb. 3, 2024), and more than 10% in its fiscal fourth quarter. Comparable sales increased 2.5% in Q4 -- a slowdown in growth, but still an increase.

The good news is that its customers are remaining loyal, even if they're buying cheaper products. That's reflected in the fact that transactions were up 4.5%, but the average ticket was down 1.9%. Ulta even managed to boost earnings per share (EPS) by 21% to $8.08, and expanded its operating margin from 13.9% in fiscal 2022 to 14.5% in fiscal 2023.

These earnings results were strong, but management gave a tepid outlook that disappointed investors. It guided for a 4% to 5% increase in comparable sales for fiscal 2024 with EPS of $26 to $27, which implies little to no growth. And its operating margin is expected to be in the 14% to 14.3% range -- below the 2023 level of 15%.

Bargain stock or value trap?

The market's strong disappointment looks more like a reaction to unmet expectations than finding fault in the business. Some companies like to provide conservative guidance so that they can beat it rather than fall short. Even if it isn't conservative, Ulta's forecast points more to external trends than problems in the business. Ulta looks healthy right now. It has plenty of growth opportunities, both from opening new stores and unlocking value from its loyal customers.

Currently, Ulta trades at a price-to-earnings ratio of 15. It has rarely had a lower valuation, and then only briefly. Wall Street's average target price for the company over the next 12 to 18 months is 40% higher than today's price, and analyst Michael Lasser of UBS Group sees it heading 71% higher.

This looks like a bargain to me. Ulta could trade sideways while the macro trends are against it, but if it reports an earnings beat, the stock will jump. Still, if you're investing for the long term, that short-term move won't really matter. What does matter is that this is an excellent business trading at a low valuation, and a buying opportunity for smart investors.