The Dow Jones industrial average added 42.76 points, 0.32 percent, to 13,207.95 in late afternoon trading.
The Nasdaq Composite gained 2.22 points, 0.07 percent and closed at 3,020.86.
The Standard and Poor's 500 picked up 3.07 points, 0.22 percent, and finished at 1,405.87.
U.S. stock indexes had been down most of the day, reacting to weak economic news from China. The General Administration of Customs in China said the country's exports rose 1 percent for the year to $176.9 billion in July, plunging from 11.3 percent in June. Imports rose 4.7 percent to $151.8 billion for the year in July after a growth of 6.3 percent in June.
Domestically, import prices for July dipped 0.6 percent from June, the U.S. Labor Department said.
The 10-year U.S. treasury note yielded 1.659 in late afternoon trading.
On the New York Stock Exchange, the listed volume was 2.6 billion shares.
Against the euro, the dollar was $1.2290 from $1.2305 Thursday. Against the yen, the dollar was 78.28 from 78.58 Thursday.
In Tokyo, the Nikkei closed at 8,891.44, off 87.16 points, or 0.97 percent.
In London, the FTSE 100 closed at 5,842.11, down 4.40 points, or 0.08 percent.
Celebrity Families of 2014 [PHOTOS]