By Kate Gibson

Recent strength in commodity prices and weakness in the U.S. dollar were among the factors Monday that had U.S. stock market investors fleeing to the materials sector, which also benefited from brighter forecasts for global economic growth.

Improving expectations for global economic growth is "a strong positive for a sector that relies heavily on export growth," Oppenheimer equity analysts Brian Belski and Nicholas Roccanova wrote in a research note.

On Monday, material shares fronted gains, with Dow Chemical Co. (DOW) rising 6.4%, while packaging products maker Sealed Air Corp. (SEE) and lumber giant Weyerhaeuser Co. (WY) were among the session's top performers, both up more than 5%.

Reversing course in afternoon trade, the major indexes erased earlier declines to cross into positive territory. The Dow Jones Industrial Average (DJI) was recently up 11.19 points, or 0.1%, to 9,616.6. The S&P 500 Index (SPX) climbed 4.71 points, or 0.5%, to 1,047.44, while the Nasdaq Composite (RIXF) gained 6.22 points, or 0.3%, to 2,087.12.

Year-to-date, materials are up 34.1%, outperforming the broader market, which had the S&P 500 ahead 15.4% as of Friday's close.

"Once again, the market is beginning to rotate investment groups, from the financials to the materials. Materials and the technology sectors have been among the top groups since late second quarter and continue to do so today, again as investors expect real and lasting economic recovery," said Paul Nolte, director of investments, Hinsdale Associates.

Crude-oil futures in recent months have traded between $65 and $75 a barrel as the market looked to increase demand on expectations of a global recovery. On Monday, oil futures lapsed below $70 a barrel, while shares of natural gas jumped 8%. .

"We believe the correction in the local Chinese equity market is an early sign of pending correction in commodities along with materials," wrote Bank of America Merrill Lynch research analysts Mary Ann Bartels and Stephen Suttmeier.

Gold mining company Goldcorp. (GG) made Bank of America's latest "Most Attractive Buy" list, which identifies common stocks viewed as attractive on technical analysis.