"The reason that Europe and China are doing this is not positive," said JJ Kinahan, chief strategist at TD Ameritrade, although he noted that weakness abroad has likely made high-yielding U.S. equities and bonds more attractive. "The close today will be interesting if people want to get out of their positions (to limit risk next week)."
The Dow Jones Industrial Average closed at a record for the 28th time this year but failed to regain the intraday record it set in the morning of a more than 170-point gain, with most blue chips trading higher. Caterpillar led gains with a rise of more than 4 percent after Stifel initiated coverage with a "buy" rating and a price target of $122.
The S&P also lost some of its early gains in its 45th record close for the year, with the materials sector continuing to lead sector advancers, up more than 1 percent.
"Materials are globally exposed companies and trade with a direct correlation to global activity," said Mark Luschini, chief investment strategist at Janney Montgomery Scott.
The Nasdaq lost most of its morning gains but recovered slightly in the close.
"I can't point to anything newsworthy," Peter Boockvar, chief market analyst at The Lindsey Group, said of the slight afternoon selloff. "I think the market going into today was overbought."
In an surprise move after the close of the Shanghai exchange for the week, the People's Bank of China cut its benchmark interest rates on Friday for the first time in more than two years to lower borrowing costs and lift a cooling economy back on track. The one-year benchmark lending rate has been trimmed by 40 basis points to 5.6 percent.
One-year benchmark deposit rates would be lowered by 25 basis points, the PBOC announced, adding that the reductions would be effective on November 22.
Read MoreCheap credit in Europe, China: Too little, too late?
Major European national stock indices closed sharply higher after European Central Bank President Mario Draghi reiterated dovish statements in a speech at a European banking conference in Frankfurt on Friday. Later in the day, the ECB also announced that it has begun buying asset-backed securities.
"I don't think it's really important to rationalize which is more important," Art Hogan, chief market strategist at Wunderlich Securities, said in reference to the two central banks' moves. "One impacts the market now, one later."
The Euro fell more than 1 percent against the U.S. dollar to below $1.24.
"If this is a lesson to be learned, when inflation isn't a problem and the economy is a problem, central banks will stimulate," said Nick Raich, CEO of The Earnings Scout. "The one thing market bears have underestimated is central banks' willingness and readiness to accommodate."
He noted that worsening economic conditions were behind the central banks' action, although he said China's slowdown has abated.
Stimulus by central banks overseas would not necessarily translate into Fed action in the United States, analysts said.
"We're going towards diverging monetary policy, we're tightening," Hogan said, although he noted the Fed showed some concern that global slowdown would affect the U.S. economy.
On Thursday, the Euro zone November flash composite purchasing manager's index (PMI) from Markit came in at 51.4, below estimates and October's final reading of 52.1. China's flash PMI from HSBC fell to 50.0, the breakeven level that separates expansion from contraction.
In the United States preliminary PMI data from Markit also posted a slowdown, with a fall to 54.7 from October's final reading of 55.9. Analysts had expected a rise.
Meanwhile, speculation is growing that the Organization of Petroleum Exporting Countries may cut oil production when it meets next Thursday. That talk has helped drive oil futures up from record lows and is likely to keep the market volatile on Friday and next week.
"One of the untold stories here is the OPEC move," Hogan said, noting that stimulus abroad would likely boost demand for energy and commodities.
Read MoreDivided views on OPEC creates volatility
Crude oil futures for January delivery gained settled up 66 cents at $76.51 a barrel on the New York Mercantile Exchange, with gold futures for December settling up $6.80 at $1,197.70.