Stock bargains are hard to come by these days. The S&P 500 has soared 18% since the start of the year, and many of its members are up by multiples of that figure.

Underperforming stocks don't always represent better values, since there are usually good reasons for an investment to lag the broader market. But that's not the case for the stocks highlighted here. These companies simply look like better deals after having missed at least a piece of the 2017 market rally.

1. Coca-Cola

Coca-Cola (NYSE:KO) has modestly trailed the market this year despite solid operating results. Sure, the beverage titan's growth pace is weak, with global volume holding flat in the most recent quarter. However, profitability is jumping, thanks to a refranchising initiative that's taking low-margin bottling revenue out of the system.

A glass of soda.

Image source: Getty Images.

Coca Cola is hoping the reformulation of over 500 products this year, with an emphasis toward reducing sugar content, will deliver faster growth. The Coca-Cola Zero Sugar brand is already lifting results in its early days in the U.S. market, in preparation for a global rollout in early 2018. Patient investors can wait for that launch to boost organic growth while collecting this Dividend Aristocrat's sparkling 3.2% annual yield.

2. Colgate-Palmolive

Colgate-Palmolive (NYSE:CL) stumbled earlier in the year, when organic sales came in flat, missing management's growth forecast for its fiscal second quarter. But the slump didn't last long. The toothpaste giant's expansion pace rebounded to 1.5% in the third quarter, after executives poured extra resources into advertising.

A mom and daughter smiling while brushing their teeth.

Image source: Getty Images.

The increased marketing budget is holding back profit gains right now, but Colgate believes that challenge will fade away once industry demand trends improve. Investors who agree can buy a truly dominant consumer staples company that accounts for 44% of the global toothpaste market and 33% of the toothbrush market.

3. UPS 

UPS (NYSE:UPS) shares have barely budged this year, and that result stands in contrast to a business that's just growing stronger. The package delivery giant posted revenue gains across its three main operating segments last quarter despite several natural disasters -- including hurricanes and earthquakes -- that affected its service area. The U.S. division led the way higher, with rising volume even in the context of increased delivery rates.

With peak shipping demand hitting the system over the next few weeks, investors may be worried that UPS's network will be overwhelmed as it has been in the past. Yet this past quarter's performance suggests that the $3.7 billion the company has poured into its infrastructure this year has produced a business that's better able to handle the intense seasonality that e-commerce demand is bringing to the industry.

4. Starbucks

Starbucks (NASDAQ:SBUX) reduced both its 2017 and long-term operating targets this year, and so it's no surprise that investors left it out of the stock market rally. Yet even at a slower growth profile, this business looks attractive.

Two coffee cups seen from above, with brown and white swirled foam on the surface of the drinks.

Image source: Getty Images.

Starbucks is just starting to benefit from its presence in China, for example, where comparable-store sales spiked 8% in the most recent quarter.

The U.S segment, meanwhile, returned to positive customer traffic with help from an expanded food menu that CEO Kevin Johnson and his team believe will push food up to 25% of the business by 2021 -- from 19% today. These wins should help Starbucks achieve its 12% annual profit growth target that marks just a minor downgrade from the 15% that executives had forecast in early 2017.

Pessimism cuts both ways in the stock market. You shouldn't ignore the collectively downbeat judgement of investors when it signals a weak selling period ahead for a company. On the other hand, Wall Street often overreacts to temporary operating setbacks. That short-term focus can create opportunities for investors to buy otherwise strong businesses -- ideally at a discount.

Demitrios Kalogeropoulos owns shares of Starbucks. The Motley Fool owns shares of and recommends Starbucks. The Motley Fool has a disclosure policy.