For every seven stocks on the decline, nearly eight rose on the New York Stock Exchange, where almost 705 shares traded. Composite volume topped 3.3 billion.
The dollar fell against the currencies of major U.S. trading partners and the yield on the 10-year Treasury note used in figuring mortgage rates and other consumer loans fell 3 basis points to 2.65 percent.
Gold futures added $9.70, or 0.7 percent, to $1,317.80 an ounce, while crude-oil futures rose $1.43, or 1.5%, to $94.80 a barrel.
Stocks added to their gains after the Conference Board's leading economic indicators rose 0.7 percent in September.
"With the leading index pushing higher yet again, those calling for a 'top' in equities are likely to be thwarted a bit longer," Dan Greenhaus, chief global strategist at BTIG, noted in emailed commentary.
Wall Street's advance, which has the S&P 500 up nearly 24 percent for the year, is "a little odd," said Pavlik. "Longer term, the whole thing smells to me like the stock market could use a bit of a pause to refresh. If it doesn't occur within the next couple of weeks, then it's likely to happen in the last week or two of the year," Pavlik said. Likely catalysts in December would include worries about another "government shutdown; sequester cuts that are supposed to be taking place in 2014, and then tapering talk," he added.
On Wednesday, Ralph Lauren hiked the low end of its full-year sales outlook on expectations of robust gains during the holiday season, with the upscale-clothing retailer raising its dividend.
Of the 423 companies in the S&P 500 that have reported earnings for the third quarter, 68.3 percent have reported earnings above expectations, 9.5 percent have matched, and 22.2 percent have missed, according to Greg Harrison, a senior research analyst at Thomson Reuters. Typically, 63 percent beat, 17 percent match and 21 percent miss, he noted.
Of those that have reported, 53.5 percent have beaten revenue estimates and 46.5 percent missed, compared to 61 percent that beat and 39 percent that typically miss, added Harrison.
After the close, investors are looking to the pricing of Twitter's IPO, with the offering expected to price in a range of $23 to $25 a share, up from $17 to $20 a share.
Reports on gross domestic product and non-farm payrolls are expected later in the week.
Fed officials have reiterated in each policy announcement this year that their target interest rate would stay close to zero so long as unemployment surpasses 6.5 percent and as long as projected inflation is not above 2.5 percent.
"Goldman said they expect the Fed to lower the number for unemployment, so 6 percent rather than 6.5 percent," said Pavlik of written comments on Tuesday by Jan Hatzius, chief economist at Goldman Sachs Group, who noted two papers by Fed board members supported the notion of a lower threshold for hiking the federal funds rate.