Stocks rose for a second straight session on Tuesday even after Target issued a warning about its current quarter's profits, which put pressure on the broader retail sector.
The Dow Jones Industrial Average gained 264.36 points, or 0.8%, to close at 33,180.14. The S&P 500 rose 0.95% to 4,160.68, and the Nasdaq Composite added 0.94% to 12,175.23. The indexes opened solidly lower but trimmed those losses and turned positive as the day progressed.
The gains for the averages came in spite of weakness for retail stocks.
Target shares fell 2.3% after the retailer announced plans to work down excess inventory, though the stock trimmed its losses as the session progressed. The company said it will implement additional markdowns to products and cancel some orders. Target also lowered its operating margins guidance for the quarter. Walmart shares followed Target lower, sliding 1.2%. Amazon fell 1.4%.
Major retailers have delivered mixed results and outlooks in recent weeks, adding to stock market volatility as investors try to determine if the announcements signal the start of a potential recession or a rapid change in consumer spending that caught some companies off guard on the inventory side.
"I hear shifting spending, not stopping spending. So if you think about the past few years, you have had a move toward goods spending over services spending. That is now unwinding as we push further from the impact that Covid had on us," Brent Schutte from Northwestern Mutual Wealth Management said on CNBC's "Squawk on the Street."
Energy was one of top performing sectors on Tuesday as oil futures hovered near $120 per barrel. Exxon jumped more than 4% following an upgrade from Evercore ISI, putting the stock above $100 per share for the first time since 2014. Phillips 66 and Chevron gained about 3.7% and 1.9%, respectively.
Shares of Apple rose 1.7%, helping to boost the tech sector. In corporate deal news, Kohl's jumped 9.5% after the retailer said it was in exclusive negotiations with Franchise Group about a potential takeover.
Elsewhere, J.M. Smucker rose 5.7% following a better-than-expected quarterly report for the food company.
Equities may have been helped by developments in the bond market on Tuesday, as the benchmark 10-year Treasury yield retreated back below 3%.
Stocks are now well off their lows from mid-May, but investors are still waiting to see if the recent bounce in stocks is a bear market rally or has the market reached a bottom from this year's sell-off.
"For six consecutive weeks since the beginning of April, investors continued to add new shorts and, hence, extend their bearish bias on the market. While this bearish momentum did fade at the end of May, the past week has shown no signs of any bullish flow momentum to support a more sustained rally from here," Citi strategist Chris Montagu said in a note to clients.
Concerns about the macro economy may be limiting the recent gains for stocks. The Atlanta Federal Reserve's GDPNow tracker showed a growth rate of just 0.9% for the second quarter on Tuesday, down from 1.3% last week. The World Bank cut its global growth forecast to 2.9%.
The U.S. consumer, however, appears to still be a bright spot for investors, even with the mixed results for retailers.
"We're still looking at decent growth for this year, that's the main take away. The consumer's still in decent shape," said Ed Moya, senior market analyst at Oanda.
May's consumer price index reading, which is due out Friday, is the main economic indicator that investors are watching for this week. If the reading is cooler than April's numbers, as expected, some could interpret it as a sign that inflation has peaked.
-CNBC's Michael Bloom contributed to this report.
Correction: A previous version of this article mistakenly included Novavax in a group of stocks that rose Tuesday.