NEW YORK (Reuters) - Stocks rallied on Thursday after three days of losses as stronger-than-expected economic data helped reassure investors concerned about the expected winding down of the Federal Reserve's economic stimulus.
Despite the rally, the S&P 500 failed to hold significantly above resistance at its 14-day moving average of 1,636.26. Support kicked in earlier in the day after the index traded below its 50-day average and again near 1,600.
Before the market opened, government data showed retail sales rose more than expected in May and first-time applications for jobless benefits fell last week, suggesting resilience in the U.S. economy.
The market, which fell sharply on Wednesday, rose on the data, according to Ken Polcari, director of the NYSE floor division at O'Neil Securities in New York. But he said stocks' climb was also due to the overdone selling of previous sessions.
"I expect the S&P to test support again" near 1,600, Polcari said.
Stocks had fallen every day this week up until Thursday on concern central banks could soon begin to wind down their stimulus measures. Trader angst increased after the Bank of Japan decided not to take any new measures on Tuesday, triggering a sell-off in Japanese equities and a rally in the yen.
"We have been looking for something like this to add to our equity positions," said Ian Kerrigan, senior investment specialist at JPMorgan Private Bank in Seattle, referring to the pullback.
The Dow Jones industrial average .DJI rose 180.85 points or 1.21 percent, to 15,176.08, the S&P 500 .SPX gained 23.84 points or 1.48 percent, to 1,636.36 and the Nasdaq Composite .IXIC added 44.94 points or 1.32 percent, to 3,445.36.
Despite a rally in both U.S. stocks and the yen, both have strengthened of late their inverse correlation as bets against the Japanese currency were being used to finance long positions in Wall Street equities. The 200-day correlation between the S&P and the Japanese currency stands at -0.92, near its strongest inverse correlation in more than four years.
The yen hit its strongest in the session at 93.78 per U.S. dollar but lost momentum to trade above 95 after the closing bell on Wall Street.
Besides the strong economic data, merger and acquisition activity helped the bullish sentiment. Shares of No. 1 U.S. newspaper chain Gannett Co (GCI.N) soared 34 percent to $26.60 after it announced plans to buy television company Belo Corp BLC.N for $1.5 billion. Belo jumped 28.3 percent to $13.77.
Safeway SWY.N shares rose 7.4 percent to $24.82 a day after Empire Co (EMPa.TO), the operator of Canadian grocery chain Sobeys, said it would buy Safeway's assets in Canada for $5.7 billion.
Shares of William Cos (WMB.N), parent of Williams Olefins, briefly hit their lowest this year at $32.55 after a deadly explosion and fire hit the company's chemical plant in Louisiana. Shares closed down slightly less than 1 percent at $33.70.
Shares of perfume and beauty products seller Coty Inc (COTY.N) fell in their market debut, taking the gloss off the third-largest U.S. IPO this year. Coty shares lost 0.8 percent to $17.36.
A recent report showed total estimated outflows from long-term mutual funds were $11.53 billion for the week ended June 5, of which $10.9 billion came from bond funds. The figures from the Investment Company Institute showed outflows from stocks, though trending lower, have continued in the past weeks, indicating the recent selloff in bonds has not translated into support to equities.
About 6.3 billion shares exchanged hands on the New York Stock Exchange, the Nasdaq and NYSE MKT, slightly below the daily average so far this year of nearly 6.38 billion.
Advancing issues outpaced decliners by a ratio of about 11 to 2 on the NYSE. On the Nasdaq, 16 issues rose for every 5 that fell.
(Reporting by Rodrigo Campos; Editing by Kenneth Barry)