The advance came after a key index of manufacturing activity in June signaled expansion, while government data showed a rise in construction spending in May.
The reports were consistent with a gradually improving economy, but not strong enough to raise concerns about the Federal Reserve reducing its stimulus policies.
Stocks turned volatile last month as investors grappled with concerns about when the U.S. central bank will begin tapering its $85 billion-per-month bond buying program.
Despite falling about 1% in June, the major indexes gained between 2% and 5% in the second quarter.
A weak reading on U.S. GDP and dovish comments from Fed officials last week "seemed to settle the markets down and reverse some of the obvious overreaction," said Randy Frederick of the Schwab Center for Financial Research.
However, he said stocks will remain volatile as investors continue to weigh the implications of higher interest rates on the economy.
The holiday-shortened week ahead brings a number of top-tier ecnomic numbers, including Friday's all-important monthly report on hiring and unemployment. U.S. markets will be closed Thursday for Independence Day.
Geopolitics could also be a headwind. Egyptian president Mohamed Morsy was under pressure to restructure his government after the nation's military backed anti-government protesters in Cairo's Tahrir Square.
Rally back on track: Overall, the stock market has been on a tear this year.
The S&P 500 is up more than 12% in the first half, compared with an average gain of about 4% for every first half going back to 1945, according to Sam Stovall, chief equity strategist at S&P Capital IQ.
If history is any guide, the next six months should also be strong.
In years when the S&P 500 fell in the first half, the second half also tends to be sub-par. But in years when the index rose in the first half, it gained an average 5.4% during the second half, according to Stovall's calculations.
"History says the momentum is likely to continue," said Stovall.
What's moving: Shares of Zynga ( rose nearly 11% for the day and were up about 3% after the market closed following an announcement that CEO Mark Pincus will step down. )
Open Table ( shares fell after )Groupon ( debuted Groupon Reserve, a rival online service that allows customers to book tables online at restaurants in 10 U.S. cities. Groupon plans to add more cities and expand internationally by year-end. )
Shares of BlackBerry ( continued to falter after the company last week reported )first-quarter results that fell far short of analysts' forecasts.
Best Buy (Fortune 500) shares jumped on a bullish analyst report. , Pandora (was upgraded by )Morgan Stanley (Fortune 500), sending shares of the music streaming company to a new 52-week high. , Tesla ( shares hit a record high above $116 after analysts at Jefferies raised their price target for the stock to $130. )
European markets ended higher. The FTSE ( in London rose 1.5% as a new governor, Mark Carney, joins the Bank of England from Canada. Markets are generally expecting looser monetary policy from the central banker. )
"We won't have to wait long to gauge how Mr. Carney will use his new powers, as the first big event happens this Thursday when he chairs his first meeting of the Bank of England's Monetary Policy Committee," explained Lee McDarby, from Investec's Corporate Treasury unit.
European investors were also cheering Nokia's ( decision to pay $2.2 billion to buy the entire Nokia Siemens Networks unit, which is 50% owned by )Siemens (. )Shares of Nokia jumped on the news.
|Regulators pave way for Internet "fast lane" with net neutrality rules|
|Apple shares soar on increased buyback|
|What stumps Warren Buffett? Minimum wage|
|Facebook profit triples on mobile growth|
|HBO shows coming to Amazon ... not Netflix|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||4.28%||4.41%|
|15 yr fixed||3.30%||3.33%|
|30 yr refi||4.31%||4.39%|
|15 yr refi||3.35%||3.31%|
Today's featured rates: