No stock can stave off the bearish whims of the market and rise constantly. Experienced investors are more than familiar with this fact and will often take advantage of the dips in quality stocks, picking up shares at a discount.

While the S&P 500 has roared 23% higher since the start of the year, there are some compelling stocks that haven't enjoyed similar performances. Bearing this in mind, two Fool.com contributors believe that patient investors on the prowl for solid stocks will be well served to consider oil supermajor Chevron (CVX 0.37%) and building automation specialist Johnson Controls (JCI 1.02%) right now despite their respective year-to-date declines of 17% and 18%.

A drop in energy prices provides a great opportunity to pick up Chevron

Scott Levine (Chevron): Despite a wave of market enthusiasm this year that has pushed a variety of stocks higher, Chevron has moved in the opposite direction. But it's not that all that surprising really. Because there's a close correlation between the movements of energy stocks and the price of energy, it's logical that a company that operates through the energy value chain like Chevron would also tumble since oil benchmarks West Texas Intermediate and Brent crude have fallen 11.5% and 8.5%, respectively, since the start of the year.

But this recent volatility belies the longer-term trend of Chevron's stock. Expanding their view to the recent 10-year period, for example, investors will find that while oil benchmarks have fallen, shares of Chevron have risen. Clearly, over the long term, clearer heads prevail, suggesting that investors who buy now and plan on holding for multiple years stand to prosper.

CVX Chart

CVX data by YCharts.

A titan in the energy industry, Chevron has long been an attractive option, but its planned acquisition of Hess makes it even more appealing. After the transaction closes (presumably in the first half of 2024), Chevron will have a more robust upstream portfolio thanks to Hess' assets in Guyana, the Bakken, and the Gulf of Mexico. Management states that the acquisition will result in Chevron benefiting from $1 billion in annual synergies as well as generating "longer-term free cash flow growth." In fact, Chevron expects to hike its quarterly dividend 8% in January, thanks to the projected long-term free-cash-flow growth potential the Hess acquisition offers.

With the recent sell-off, shares of Chevron are attractively priced. Valued at 11.1 times trailing earnings, Chevron's stock is priced at a discount to its five-year average earnings multiple of 21.4. For investors who favor the cash-flow multiple, shares still seem like a bargain, valued at 7.9 times operating cash flow -- a discount to their five-year average cash-flow multiple of 9.4.

Johnson Controls can climb a wall of worry

Lee Samaha (Johnson Controls): Heating, ventilation, and air conditioning (HVAC), building controls, and fire and security products company Johnson Controls has work to do to rebuild confidence with investors. After disappointing investors in August with its fiscal third-quarter earnings report, management did the same again in the recent, delayed, fourth-quarter earnings report.

The results were delayed due to assessing the impact of a cyber attack on its operations, and there was an impact. Still, it wasn't enough to completely explain the revenue and earnings miss in the quarter. For example, management had guided toward adjusted earnings per share (EPS) of $1.10 in the fourth quarter only to deliver $1.05 with a $0.04 negative impact from the cyber attack. In addition, management's adjusted EPS guidance of $3.65 to $3.80 for fiscal 2024 was weaker than Wall Street analysts' consensus expectation of $3.96.

But here's the thing. It's not that Johnson Controls' growth isn't strong, it's more that it isn't quite as strong as management and the market had previously thought. For example, the midpoint of the 2024 earnings guidance puts the stock at 14 times earnings and around 16.5 times free cash flow (FCF).

Those are attractive multiples of a company growing revenue in the mid-single-digit range. In addition, the company's install orders grew by 9% in the quarter, taking the install backlog up 8% year over year. It's a key metric to follow because building solution equipment installations tend to lead to building solution services and global product sales.

That's positive news, but the company will still have to overcome the negative impact of the cyber attack in the first quarter, weak global product sales (as dealers continue to rebalance their inventory after building them up during the pandemic), and ongoing weakness in residential HVAC sales.

Still, there's an opportunity for Johnson Controls to regain the trust of investors by hitting its 2024 guidance. If it can do so, the stock could be notably higher this time next year.

Should you buy these stocks now?

For investors looking to power their portfolios with a leading energy dividend stock, Chevron is a great consideration -- one that's even more attractive with the Hess acquisition. Those uninterested in playing in the oil patch, however, should certainly give Johnson Controls, a leader in smart building solutions, a close look.