U.S. stocks edged higher on Friday, helped by an improving outlook for business activity in the U.S. Midwest in July.

Trading was volatile as investors assessed a mixed report on the U.S. gross domestic product for the first half of 2009.

The Institute for Supply Management-Chicago business barometer rose to 43.4 from 39.9 in June, its best showing since September. Economists polled by Reuters had expected a reading of 43.0. A reading above 50 indicates expansion.

The report came shortly after government data indicated the U.S. economy contracted less than expected in the second quarter of the year, spurring optimism the recession may be moderating. But the U.S. Commerce Department also said GDP tumbled 6.4 percent in the January-March quarter, the biggest decline since a matching fall in the first quarter of 1982.

The Dow Jones industrial average <.DJI> was up 1.13 points, or 0.01 percent, at 9,155.59. The Standard & Poor's 500 Index <.SPX> was down 1.60 points, or 0.16 percent, at 985.15. The Nasdaq Composite Index <.IXIC> was down 1.13 points, or 0.06 percent, at 1,983.17.

(Reporting by Edward Krudy; Editing by Padraic Cassidy)