NEW YORK (AP) - It was a stock market squeaker.
After piercing its all-time high in early trading, then yo-yoing below and above that level several times during the day, the Standard and Poor's 500 index on Wednesday managed to eke out a record at the close, besting the old one by just two-hundredths of a point.
Financial and technology companies had some of the biggest gains. Bank stocks rose after Bank of America reported that its profit surged to $3.44 billion in the fourth quarter. Apple was up nearly 2 percent.
Investors have been worried stocks would stall in the new year after a surge of nearly 30 percent in the S&P 500 last year. The first few trading days in 2014 seemed to confirm their fears. As of the close of trading Monday, the S&P 500 was down 1.6 percent.
The S&P 500 gained 9.50 points, or 0.52 percent, to 1,848.38. The last closing high was 1,848.36 on Dec. 31, 2013. With Wednesday's rise, the index is now basically flat for the year. In 2013 the S&P 500 closed at record highs 45 times.
The Dow Jones industrial average closed up 108.08 points, or 0.7 percent, to 16,481.94. It is 94.72 points from its closing high, just one good up day away. The Nasdaq composite rose 31.87 points, or 0.76 percent, to 4,214.88.
The tech-heavy index is still 16 percent below its high during the dot-com bubble more than a decade ago.