With millions of prospective buyers on the hunt for them at any time, bargain stocks don't stay hidden for long. That's especially true during a quickly rising market like the one that investors experienced through most of this year. When stocks' valuations are elevated, the potential for uncovering good values is diminished.

Yet there are always bargains around, including high-performing businesses that get left behind in favor of seemingly more exciting options. Let's take a look at two such companies, PepsiCo (PEP 1.05%) and Ulta Beauty (ULTA 3.24%), which seem primed for excellent returns ahead.

1. PepsiCo looks cheap

Consider Pepsi's recent track record. The company boosted its 2023 outlook in each of the last two quarters following huge growth in fiscal 2022. On top of those gains, the snack food and beverage giant achieved a blazing 14% boost in organic sales through the first half of this year, and earnings are rising at an even faster pace than revenue.

Sales are now on track to jump 10% this year, up from the initial forecast of 6% (Pepsi grew sales by 14% in 2022). Earnings should rise by 12%, or about double the initial target. Yet the stock has become cheaper this year.

You can own Pepsi for 2.8 times sales today, compared to Coca-Cola's price-to-sales ratio (P/S) of 6. For more context, spice and sauce specialist McCormick is priced at almost 4 times sales.

There's no telling when investors might wake up to that disparity and start awarding Pepsi with a more reasonable valuation. But Wall Street can't ignore Pepsi's expanding earnings power forever.

2. Ulta Beauty is everywhere you look

Ulta Beauty's stock chart for 2023 looks downright ugly today. The beauty products retailer is in negative territory through mid-August, while the S&P 500 has gained 16%.

But its business is in much better shape. Sure, sales growth is slowing and price cuts are becoming more prevalent in its industry. Comparable-store sales rose 9% last quarter, compared to a 16% spike in the prior quarter. Average spending fell in the period.

But Ulta's customer traffic jumped 11%, which puts it in a category of its own in this tough retailing environment. The company's operating profit margin is still on track to trounce peers this year, even after management reduced the 2023 forecast to around 14% of sales, rather than closer to 15% of sales.

The company is due to report Q2 earnings on Aug. 24, and that announcement will surely answer some burning questions for investors. The stock's trajectory so far implies that Wall Street expects more sluggish sales and profit metrics. Yet even if the 2023 year doesn't improve significantly on last year's excellent result, Ulta will remain highly profitable, even as it gains market share in the makeup industry.

Steady progress along those lines is the surest path to boosting the retailer's annual sales far above the current $10 billion level. And you can own a piece of that growth story for 2.2 times revenue today, down from pandemic highs of 3-plus. That's a pretty good deal.