"The official report contained a piece of good news, which was that quarterly growth quickened to 1.8% quarter-over-quarter from 1.6% in Q1, which was stronger than median expectations," said Klaus Baader, senior economist at Societe Generale. "While not too much emphasis should be placed on this, it may be a sign that growth has already bottomed in Q1."

"Our forecast remains that the Q2 annual growth rate is likely to mark the low in the current cycle, and that thanks to both monetary and fiscal stimulus Q3 growth will strengthen to around 8%," he continued.

The FTSE in London rose 1% and the DAX in Germany was higher by 2.2% as the European markets rallied in response to the China data and good demand at an Italian bond auction outweighed a Moody's credit rating downgrade of Italy. Hong Kong's Hang Seng Stock index closed up 0.35% and the Nikkei finished flat.

In U.S. economic news, the Labor Department reported that the producer price index rose by 0.1% in June after falling 1% in May, which was better than the decline of 0.5% that economists surveyed by Thomson Reuters were expecting for last month. The core figure rose 0.2%, as expected, after increasing by the same amount previously.

"The combination of a benign inflation backdrop and large amount of slack in labor markets leaves the Fed free to maintain its highly stimulative policy stance with a move to further easing through additional asset purchases still possible should conditions deteriorate further," said Nathan Janzen, an economist at RBC Economics, who viewed the gains in the wholesale price index as mild.

The University of Michigan consumer sentiment index was a disappointment, coming in at 72 vs. an expectation for a reading of 73.4.

August crude oil futures rose $1.02 to settle at $87.10 a barrel. August gold futures popped $26.70 to settle at $1,592 an ounce.

The benchmark 10-year Treasury fell 5/32, lifting the yield to 1.491%, while the dollar was down 0.35%, according to the dollar index.

If you liked this article you might like

Forecast for S&P 500, Dow Industrials Remains Bullish, These Charts Show

Dow 20,000! It Should Mean Nothing to Investors, but Then Again...

Tradebird Investors Are Bullish on U.S. Stocks but Bearish on the Euro

Why Home Depot and Boeing Stock Fell Tuesday