It was a stock market reversal. Stocks rose sharply Thursday, with large parts of the market erasing Wednesday's losses, as investors cheered a batch of strong earnings and data that showed the U.S. economy grew at a robust annual rate of 3.2 percent in the fourth quarter.
Investors also got a welcome respite from the recent turmoil in overseas markets, particularly in Turkey and Argentina.
The Standard & Poor's 500 index rose 19.99 points, or 1.1 percent, to 1,794.19, with all 10 sectors of the index closing higher. That more than made up the 18.29 points the index lost on Wednesday.
The Nasdaq composite jumped 71.69 points, or 1.8 percent, to 4,123.13 and the Dow Jones industrial average rose 109.82 points, or 0.7 percent, to 15,848.61.
Facebook jumped $7.55, or 14 percent, to $61.08. The social media company reported results late Wednesday that exceeded the expectations of financial analysts. Facebook's adjusted profit was 31 cents per share, four cents better than forecast.
It wasn't all good news out of the technology sector. Amazon.com sank in after-hours trading after releasing results that fell short of what investors were expecting. The stock of the online retailing pioneer dropped $35.47, or 9 percent, to $367.54.
In other earnings news, Visa rose $3.76, or 2 percent, to $220.88 after the company reported a 9 percent rise in first-quarter profits, beating expectations.
Alexion Pharmaceuticals was the biggest advancer in the S&P 500, rising $28.27, or 21 percent, to $162 after the company also beat analysts' expectations and gave a strong 2014 outlook. Alexion is a specialized drug maker focused on rare genetic diseases.
Alexion helped lift the stocks of other drugmakers. Dow members Merck and Pfizer each rose more than 2 percent. Specialized drugmakers Gilead Sciences and Biogen were up 2 percent and 4 percent, respectively.
Investors also cheered news that U.S. economy grew at a 3.2 percent annual rate in the final three months of 2013, a positive sign for the economy in 2014. Consumer spending, a major driver of the U.S. economy, picked up in the quarter.
''It was a good, balanced GDP report,'' said Sean Lynch, global investment strategist with Wells Fargo Private Bank, which manages $170 billion in assets.
Even with Thursday's gain, it's been a difficult month for investors. The Dow is down 4.4 percent in January, the worst start to a year since 2009.
Emerging markets worries drove most