NEW YORK (CNNMoney) -- U.S. stocks closed out the week with gains, despite little movement Friday after disappointing economic data from China and heightened U.S. fears about a global slowdown.
"Most of what we've seen in the recent rally is the idea that things will not deteriorate as badly as many had feared," said Bruce McCain, chief investment strategist at Key Private Bank. "These numbers throw cold water on some of the enthusiasm."
All three major indexes ended the week with modest gains. The Dow rose 0.8% while the S&P 500 and Nasdaq were both up over 1%.
Chinese exports, which had been gaining strength for the past few months, rose just 1% from a year earlier in July, which was well below expectations and down from the 11.3% pace of increase in June. The 4.7% uptick in Chinese imports also fell short of forecasts.
Loan growth was disappointing as well, adding to recent concerns about the strength of China's economy.
"Any number that is disappointing runs the risk of raising worries again if you don't get actual intervention," McCain said. "Investors are at the point where they want to see some real action or they'll begin to lose some of the enthusiasm they felt."
On the domestic front, investors digested a report that showed falling U.S. import and export prices.
Meanwhile, the drought continues to push up prices for corn and soybeans. The U.S. Department of Agriculture reported Friday that 2012-2013 corn yields will hit the lowest level since 1995-1996.
The report sparks concern that corn prices, which have risen more than 60% over the last seven weeks, will continue to spike.
And in Europe, worries about the possible need for a Spanish bailout continue, given that the nation's borrowing costs remain high. Spain's 10-year bond yield is hovering just below 7%.
Economy: Export prices fell 0.3% in July, while import prices declined 0.4%, according to a report from the Bureau of Labor Statistics. Import prices have been declining since April, and export prices have been falling since May.
A Treasury Department budget showed a monthly deficit of $70 billion in July, higher than the $60 billion deficit in June.
Companies: Shares of J.C. Penney ( , Fortune 500) rallied Friday despite the department store chain posting a second-quarter loss of $147 million, or 67 cents per share. Analysts were expecting a loss of just 25 cents per share. J.C. Penney also withdrew its guidance for the year.
The review could lead to changes in the restructuring plan the company has already started to implement, as well as the previously announced plan to return to shareholder the cash it generated from a deal to sell its stake in the Chinese internet company Alibaba.
Oil for September delivery fell 49 cents to $92.87 a barrel.
Gold futures for December delivery rose $2.60 to $1,622.80 an ounce.
Bonds: The price on the benchmark 10-year U.S. Treasury rose, pushing the yield down to 1.65% from 1.69% 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.44%||3.44%|
|15 yr fixed||2.70%||2.69%|
|30 yr refi||3.46%||3.45%|
|15 yr refi||2.74%||2.72%|
Today's featured rates: