Investors brushed off early jitters about a potential slowdown in China and pushed the Dow to its highest close of 2013.
The Dow Jones industrial average rose 38.16 points to 14,127.82, nearing its record close of 14,164 reached on Oct. 9, 2007.
Stocks dropped at the opening bell and stayed lower in the morning amid concern about new steps by the Chinese government to cool that country's booming housing market.
"The U.S. market continues to digest the negative news and hang tough," said Ryan Detrick, a senior strategist at Schaeffer's Investment Research.
The stock market has rallied this year on optimism that the U.S. housing market is recovering and signs that companies are hiring more. Strong corporate earnings and continuing economic stimulus from the Fed have also boosted stock prices.
Despite the strong gains this year, stocks may still be able to maintain their momentum as investors move money out of bonds, Rob Lutts, chief investment officer at Cabot Money Management, said.
"It's all about where the money is going," Lutts said. "If the money that is sitting on the sideline, or in bonds, is moving into equities, that alone is enough to create that shift."
The Standard & Poor's 500 rose 0.46 percent to 1,525.20. The Nasdaq composite rose 0.39 percent to 3,182.03.