Stocks rise. Investors are thankful.... for central bankers

turkey thanksgiving stocks

Thanksgiving arrived a week early on Wall Street.

Stocks climbed higher on Friday in response to a surprise rate cut by China's central bank and hints of more emergency action by the European Central Bank.

"Both the ECB and PBoC got out the bazookas overnight and fired them resolutely," Michael Block, chief strategist at Rhino Trading Partners, wrote in a note to clients.

An early burst of buying carried the Dow 175 points higher and above the 17,800 level for the first time ever. It lost some momentum, but still closed 91 points in the green and at another all-time closing high.

The S&P 500 advanced 0.5% and notched its 45th record close of 2014, while the Nasdaq Composite gained 0.2%.

The party started overnight in China, which unleashed its first rate cut in more than two years. The move is aimed at energizing the world's second-largest economy, which has slowed decidedly after years of rapid growth.

Recent indicators show that factory output has stalled and the real estate market continues to weaken. China's third-quarter GDP slowed to the weakest pace since the financial crisis.

Dow thanksgiving China

Related: 5 reasons to worry about the world economy

Super Mario's on the case: Not to be outdone, ECB President Mario Draghi sparked a rally in European stocks by suggesting more aggressive action is coming to fight off deflation.

Draghi spoke about an "increasingly challenging" inflation outlook for the eurozone and promised the ECB will do "what we must to raise inflation and inflation expectations as fast as possible."

The comments raised hopes among investors that the ECB will start to buy government bonds, an escalation of the central bank's emergency efforts. It's not clear how much that will help the economy though because European bonds are already trading at historically low levels.

Still, European markets zoomed higher on the news, with the Stoxx 50 Europe bouncing 2.2% and France's CAC 40 surging 2.7%.

Related: Not worried about a recession? Buy these stocks

Now what? Friday's market action highlights the bizarre twist that a struggling economy can sometimes be good for the stock market.

Central bankers in China and Europe are only acting in response to lackluster growth numbers, but the aid is welcome on Wall Street.

By contrast, the U.S. continues to chug along. That's why the Federal Reserve has halted its bond-buying exercise and is preparing to raise interest rates sometime next year for the first time since June 2006.

CNNMoney Sponsors