Updated from 9:41 a.m.

Stocks moved higher on Friday after the latest data showed fourth-quarter growth in the U.S. economy wasn't as bad as feared.

The S&P 500 was up 0.17%, the Dow Jones Industrial Average added 0.07%, and the Nasdaq rose 0.3%.

The second estimate of fourth-quarter GDP was revised up to an annual rate of 1% from 0.7%, suggesting that the U.S. economy was in better shape than expected to close out last year. Economists had expected GDP to be revised down to 0.4% growth. A stronger U.S. dollar and an inventory buildup continued to hurt manufacturing, though, with exports down 2.7% and imports falling 0.6%. Consumer spending rose 2%, though less than an originally estimated 2.2%.

For the Federal Reserve, "the upgrade in the Q4 GDP growth will likely offer some encouragement, though it is unlikely to change the current bias to remain on the sidelines at the March meeting as they assess the impact of the recent global headwinds on growth," said Millan Mulraine, deputy chief U.S. macro strategist at TD Securities. "We continue to see the next hike at the June FOMC meeting."

Traders had plenty of other data to digest on Friday in a jam-packed day on the economic calendar. The U.S. trade deficit in January widened to $62.23 billion, its largest level since June. U.S. exporters struggled to move goods as a stronger U.S. dollar and a weaker global economy deterred demand. 

The consumer economy benefited from colder winter weather in January and lower gas prices. Consumer spending rose 0.5% in January, higher than the 0.3% growth economists had expected. Personal income also rose 0.5%. 

Leaders from G20 nations gathered in Shanghai. Investors are hoping for clearer action from China, the world's second-largest economy, on how to boost growth and stabilize markets. Some hope that the two-day meeting could also result in a coordinated stimulus effort by member countries, a notion backed by the International Monetary Fund. However, some have already ruled out such joint efforts.

"Talking about further stimulus just distracts from the real tasks at hand," said Germany's Minister of Finance Wolfgang Schäuble on Friday. "We, therefore, do not agree on a G20 fiscal stimulus package as some argue, in case outlook risks materialize."

Crude oil continued higher on Friday on reports that Venezuela, Russia, Saudi Arabia and Qatar had agreed to meet in March to further negotiate a production freeze. West Texas Intermediate crude was up 1.1% to $33.44 a barrel.

J.C. Penney (JCP) jumped 10.9% after strong holiday sales and fewer promotions helped to boost quarterly profit. The retailer earned 39 cents a share over the quarter, nearly 10 times its profit a year earlier. Analysts had expected 23 cents a share in earnings. Sales rose 2.6% to $4 billion. 

Gap (GPS) fell 4.5% after narrowly beating analysts' profit estimates in its fourth quarter. Revenue fell 6.5% from a year earlier, in line with estimates, while same-store sales slid 7%. The retailer also announced that it had approved a $1 billion share buyback program.

Weight Watchers (WTW) slid 26% after reporting an unexpected loss in its fourth quarter. The weight-loss company reported a net loss of 3 cents a share, compared to estimates for a profit of 2 cents. Revenue fell 21% to $259.2 million.

Palo Alto Networks (PANW) added 4.7% as its quarterly loss widened to 72 cents a share from 53 cents a year earlier. On an adjusted basis, earnings totaled 40 cents a share, a penny above estimates. Revenue jumped 54%.

Sotheby's (BID) shares fell 2% after the auction house swung to a quarterly loss. The company reported a fourth-quarter loss of 17 cents a share compared to profit of $1.06 a share a year earlier. Adjusted earnings of $1.19 a share came in above estimates.

Foot Locker (FL) was down 3.2% despite a better-than-expected quarter. The retailer reported a 7.9% increase in comparable-store sales, building on top of the 8.7% growth seen in the fourth quarter. Foot Locker expects comparable-store sales to rise in the mid-single digits for the rest of the year.

Kraft Heinz (KHC) added 2.8% after swinging to a profit of 23 cents a share in its fourth quarter, compared to a loss of 4 cents a share a year earlier. The company said it is working on streamlining its organization after completing its merger in the middle of last year.

Kraft Heinz is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio.

Exclusive Look Inside:
You see Jim Cramer on TV. Now, see where he invests his money and why Kraft Heinz is a core holding of his multi-million dollar portfolio.

Want to be alerted before Jim Cramer buys or sells KHC? Learn more now.

If you liked this article you might like

This Week's Market Wisdom: Know Your Team and Have Their Backs

This Week's Market Wisdom: Know Your Team and Have Their Backs

18 Best Stock Picks for the Impending Consumer Spending Boom

18 Best Stock Picks for the Impending Consumer Spending Boom

The H&M Fast-Fashion Empire Is Crumbling

The H&M Fast-Fashion Empire Is Crumbling

Sears CEO Was a Successful Investor Before the Chain's Woes Consumed Him

Sears CEO Was a Successful Investor Before the Chain's Woes Consumed Him

Too Many Shopping Deals Are Hurting Consumers

Too Many Shopping Deals Are Hurting Consumers