In the U.S., the Nasdaq composite inched up 4.04 points, or 0.1 percent, to 3,256.52.
Four of the 10 industry groups in the S&P 500 index edged higher. Utilities and health care, which investors tend to buy when they want to play it safe, made the biggest gains.
Health care is the best performing industry in the S&P this year, up 14 percent. That compares with a 10 percent rise for the S&P 500.
Kim Forrest, a senior equity analyst at Fort Pitt Capital, said it appears that many investors are treating certain stocks as if they were bonds.
"There's a recognition that bonds are overpriced, so people are moving into healthcare and utilities that pay a nice dividend," she said. "Those are pretty boring investments, and by that I mean their prices don't move a lot."
News about Italy also helped drive traders into the safety of U.S. government bonds, pushing benchmark yields to their lowest level this month. The yield on the 10-year Treasury note dropped to 1.84 percent, a steep fall from 1.91 percent late Tuesday.
The S&P 500 closed within three points of its record high of 1,565.15. The stock index hit that peak on Oct. 9, 2007, before the Great Recession and a financial crisis roiled financial markets.
Among other stocks making big moves:
â¿¿ Cliffs Natural Resources, an iron ore mining company, plunged 14 percent, the biggest loss in the S&P 500. Analysts warned that falling iron ore prices would likely sink the company's stock. Cliffs fell $2.97 to $18.46.
â¿¿ Science Applications International Corp. surged 5 percent after the security and communications technology provider reported a fourth-quarter profit that was better than analysts were expecting. SAIC also announced a special dividend of $1 per share, and its stock gained 50 cents to $13.32.