The Standard & Poor's 500 index is flirting with a new milestone: 1,900.
The index briefly climbed above that level before dropping back to close just below it. Still, it set an all-time closing high by a fraction of point.
Stocks have gained as most investors remain optimistic that the economy will start to accelerate this year following a cold winter that hit growth. First-quarter corporate earnings came in better than expected, giving stocks a lift.
Whether the S&P 500 climbs beyond the 1,900 level or falls back now depends on the how the economy develops, said John Canally, chief market strategist for LPL Financial. If growth falters, stocks will likely slide, he said.
"But if the economy can deliver... and the global economy can accelerate, we'll look back at 1,900 and say 'Yes that was just a stop on the way to 2,000','" he said.
The Standard & Poor's 500 index rose 0.8 points to 1,897.45, after climbing as high as 1,902 in early trading.
The Dow Jones industrial average rose 19.97 points to 16,715.44. The Nasdaq composite fell 13.7 points to 4,130.17.
Keurig Green Mountain was the biggest gainer in the S&P 500 index. Its stock surged after Coca-Cola raised its stake in the coffee company. Coca-Cola, the world's biggest beverage company, disclosed in a regulatory filing that a subsidiary now has a 16% stake in Keurig.
Nearly all companies in the S&P 500 have reported results, and earnings are forecast to grow by 3.3% when final figures are calculated, according to S&P Capital IQ data. Three weeks ago, analysts were expecting earnings to fall 1.1%.
Another encouraging sign was that company revenue growth accelerated in the quarter to 3.2%, from 1.6% in the fourth quarter.
Despite the positive backdrop, the stock market's move higher this year has been more of a grind compared with last year's surge. Along with worries about the US, there are concerns about growth overseas, as well as tensions with Russia after that country annexed the Crimea region in Ukraine.
Another factor is that stocks, having rallied for more than five years, are also no longer the bargain they once were.