NEW YORK (Reuters) - U.S. stocks closed higher on Friday as more investors piled in on the presidential election rally while the euro continued to weaken after the European Central Bank’s decision a day earlier to extend economic stimulus.

U.S. Treasury yields climbed with benchmark yields marking a fifth consecutive week of increases on stronger-than-forecast data on China inflation and U.S. consumer sentiment ahead of $56 billion of government debt auctions.

European shares had their best week since January, after the ECB decision to cut monthly bond purchases to 60 billion euros ($63.7 billion) from 80 billion and extend buying to December, three months longer than analyst forecasts.

The S&P 500 stock index had its best week in four and its biggest gainers on Friday were the consumer staples and healthcare sectors, which have been two of the weakest in the rally following Donald Trump’s election as U.S. President.

“Today we’re seeing money going into some of the lesser loved sectors since the election, which is telling me the rally is broadening which is a very positive sign,” Randy Frederick, vice president of trading and derivatives for Charles Schwab in Austin, Texas.

While some investment managers may be taking profits others who did not trust the post-election rally are now hoping to show year-end gains by picking up sectors that look less expensive.

“It means there’s still new money coming in. People are worried about getting left behind at this point,” he said.

The Dow Jones industrial average .DJI closed up 142.04 points, or 0.72 percent, to 19,756.85, the S&P 500 .SPX had gained 13.34 points, or 0.59 percent, to 2,259.53 and the Nasdaq Composite .IXIC had added 27.14 points, or 0.5 percent, to 5,444.50.

The euro fell for the second day after the ECB news gave the euro zone common currency its biggest daily loss against the dollar on Thursday since Britain’s June vote to leave the European Union.

“It’s still accommodative but it’s acknowledgement it has reached its limits,” said Michael Arone, chief investment strategist at State Street Global Advisors in Boston.

The euro traded around $1.0552, down 0.6 percent EUR= on the day and down 1.1 percent for the week. The dollar .DXY rose 0.5 percent on the day and 0.8 percent for the week against a basket of major currencies.

The benchmark U.S. 10-year Treasury note yield US10YT=RR was last at 2.467 percent, up 8 basis points from Thursday and not far from a near 1-1/2-year peak set on Dec. 1. It recorded its longest streak of weekly increases since May-June 2013.

Europe's STOXX 600 .STOXX finished up almost 1 percent even though European banks .SX7P pulled back 0.7 percent.

Oil rose on growing optimism that non-OPEC producers might follow the cartel’s lead by agreeing to cut output.

U.S. crude CLc1 rose 1.2 percent to $51.43 a barrel. Brent crude LCOc1 was up 0.7 percent at $54.29.

Spot gold XAU= was down 1 percent and was set for a weekly decline of 1.5 percent, pressured by the stronger U.S. dollar and expectations of a Fed rate hike.