The Standard & Poor's 500 took a run at a record close, climbing to 1,855 points in midday trading before settling down to close at 1,847.61 points, up 0.62 percent or 11.36 points, just shy of a record.
The blue-chip Dow Jones industrial average added 0.64 percent, 103.84 points, to 16,207.14. The Nasdaq composite index gained 29.56 points, 0.69 percent, to 4,292.97.
On the New York Stock Exchange, 1,916 issues advanced while 1,201 declined on a volume of 3.8 billion shares traded.
In Tokyo, the Nikkei 225 index lost 27.99 points, 0.19 percent, to 14,837.68. In London, the FTSE 100 index added 25.80 points, 0.41 percent, to 6,865.86.
The 10-year U.S. treasury fell 3/32 to yield 2.745 percent.
The dollar was lower against the euro at $1.3733. The yen was higher at 102.47 yen.
Gold added $13.40, reaching $1,337 per ounce on the Comex exchange. Silver gained 20.5 cents to reach $22.02.
Crude oil gained 61 cents on the New York Mercantile Exchange, reaching $102.77 in late trading.
On the Chicago Board of Trade May delivery corn hit $4.56 per bushel, off 3 cents. May soybeans added 13.75 cents to $13.74. Wheat added 11.75 cents to reach $6.0725.