The stock market had some turbulence on Wednesday, and although most market benchmarks finished in positive territory, there's still plenty of uncertainty about the future. Investors got the latest minutes from the Federal Reserve's monetary policy-setting body, and they revealed that the central bank remains ready and able to take aggressive action to curtail inflationary pressure, even if it means pushing the economy into recession. After spending much of the day lower, the Dow Jones Industrial Average (^DJI -0.65%), S&P 500 (^GSPC -1.20%), and Nasdaq Composite (^IXIC -1.79%) all rose modestly.

Index

Daily Percentage Change

Daily Point Change

Dow

+0.23%

+70

S&P 500

+0.36%

+14

Nasdaq

+0.35%

+40

Data source: Yahoo! Finance.

Even with today's gains, most major indices remain down substantially from their highs in 2021. However, a few stocks were able to push higher to all-time records on Wednesday. Below, we'll look more closely at why General Mills (GIS 1.69%) and Eli Lilly (LLY -0.12%) are doing so well even in a tough stock market.

General Mills leaves investors feeling satisfied

Shares of General Mills were up almost 1.5% on Wednesday. That was enough to lift the stock price to a 13% gain for the year so far, and bullish investors see even more reason for optimism.

General Mills is one of the biggest manufacturers of cereal and other food products, and its business has held up well over the past couple of years. After seeing a growth hiccup during its 2021 fiscal year ending May 31, General Mills bounced back in 2022, posting double-digit growth rates on the bottom line even as it continued to boost its sales. With a valuation of less than 20 times trailing earnings, it's easy to see General Mills as a value stock, and its dividend yield of nearly 3% is also appealing to many.

Investors have gotten excited about General Mills in light of the decision from rival Kellogg (K -0.04%) to break itself into three separate businesses. Some investors might speculate that General Mills could do something similar in order to unlock value and boost its share price.

Inflationary pressures are hitting General Mills with higher costs, but with strong brand awareness, the company might be able to pass a sizable portion of those costs to customers. On the other hand, if inflation  abates, then it could bring a new wave of growth to General Mills.

Lilly is looking healthy

Shares of Eli Lilly enjoyed a nearly 1% gain on Wednesday. The drugmaker has a lot going for it lately, and investors are starting to recognize its long-term prospects.

Lilly has had a lot of good news recently. In May, the company received approval from the U.S. Food and Drug Administration (FDA) for its diabetes medication Mounjaro. The company followed that up with FDA approval for using its Olumiant treatment for hospitalized COVID-19 patients and for those with the autoimmune condition alopecia. Other pipeline treatments are showing substantial promise as well.

Lilly doesn't look as attractive as General Mills from a value standpoint. The stock currently trades at nearly 50 times its trailing earnings over the past 12 months, and its dividend yield is a relatively puny 1.2%. That's a far cry from what you can expect from other major pharmaceutical stocks, particularly at a time when many drug companies have faced bigger challenges.

Among these two stocks, General Mills looks more likely to continue to advance higher. However, both companies have promising outlooks, and both could keep climbing further into record territory in the months to come.