NEW YORK (CNNMoney) -- The fireworks came early on Wall Street. Stocks started the second half of the year firing on all cylinders Friday, posting the strongest week in two years, as fresh data boosted investor optimism about the state of the economy.
After starting the day barely changed, the Dow Jones industrial average (Fortune 500), JPMorgan Chase ( , Fortune 500) and Caterpillar ( , Fortune 500) and were the biggest gainers on the blue chip index.) rallied 168 points, or 1.4%. Alcoa ( ,
The S&P 500 () added 19 points, or 1.4%, and the Nasdaq composite ( ) gained 43 points, or 1.5%.
The gains put the Dow and S&P 500 up more than 5% for the week, while the Nasdaq soared more than 6%. It was the best weekly performance since July 2009 for all three indexes.
In fact, the gains over the last five sessions have helped stocks nearly erase all of June's losses.
Stocks initially got a lift Friday after a stronger-than-expected report on the nation's manufacturing sector. The Institute of Supply Management's manufacturing index jumped to 55.3 in June -- well above the 51.1 that economists had expected.
"Investors thought the economy would continue to be fairly weak through the summer, but the Chicago PMI number yesterday and the national manufacturing data this morning caused a huge swing in investor sentiment," said Michael Sheldon, chief market strategist at RDM Financial Group.
A strong manufacturing sector will help drive economic growth and corporate profits, he added.
Stocks ended the first half of the year solidly higher Thursday, following a turbulent six months. The second quarter had been especially rough as soft economic data sparked concerns of a U.S. economic slowdown.
Volume was light Friday as many market participants head out for the holiday weekend. U.S. markets are closed Monday in observance of Independence Day.
Economy: The University of Michigan consumer sentiment survey for June fell to a reading of 71.5, slightly below the initial reading of 71.8.
Construction spending fell 0.6% in May, after rising 0.4% the prior month. Economist were expecting spending to hold steady in May.
Companies: University of Phoenix operator Apollo Group Inc. ( , Fortune 500) was the best performing stock on the S&P 500 and Nasdaq. Shares of the education company jumped nearly 7%, after it reported better-than-expected third-quarter earnings late Thursday.
Major auto makers including General Motors (Fortune 500), Ford ( , Fortune 500) and Chrysler reported their June sales figures. Sales rose 10% during the month at GM and Ford, and spiked 30% for Chrysler. Shares of Ford rose 1.7%, while GM's stock edged up 0.7%.,
Meanwhile, shares of Eastman Kodak (Fortune 500) slid 14%, a day after the company received a mixed ruling on the company's patent infringement suit against Apple ( , Fortune 500) and Research in Motion ( ).,
Cablevision (Fortune 500) spun off AMC Networks ( ), known for popular hits like "Mad Men." AMC started trading on the Nasdaq Friday under the ticker "AMCX," and shares fell 8%. Cablevision shareholders are getting one share of AMC Networks for every four shares of Cablevision.,
World markets: European stocks ended modestly higher. Britain's FTSE 100 rose 0.7%, the DAX in Germany and France's CAC 40 added 0.6%.
Asian markets ended the session mixed. The Shanghai Composite ticked down 0.1%, while the Hang Seng in Hong Kong soared 1.5% and Japan's Nikkei added 0.5%.
Oil for August delivery slipped 48 cents to settle at $94.94 a barrel.
Gas prices snapped a 27-day streak of declines Friday. The price of regular unleaded gasoline increased nine tenths of a cent to $3.550 a gallon, according to motorist group AAA.
Gold futures for August delivery fell $20.20 to settle at $1,482.60 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury edged lower, pushing the yield up to 3.20% from 3.16% late Thursday.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|
|Overnight Avg Rate||Latest||Change||Last Week|
|30 yr fixed||3.79%||3.76%|
|15 yr fixed||2.93%||2.96%|
|30 yr refi||3.85%||3.83%|
|15 yr refi||3.00%||3.04%|
Today's featured rates: