U.S. stocks opened higher on Friday, extending a post-election rally, with gains in healthcare and technology sectors lifting the Nasdaq and the S&P 500 to fresh all-time highs.

The "Trump rally" has been running since the Nov. 8 vote as investors bet President-elect Donald Trump's policies will boost economic growth and inflation.

The three main U.S. indexes closed at record levels for the second day in a row on Thursday, while the small cap Russell 2000 and the Dow Transport .DJT hit all-time highs.

Adding to the upbeat mood has been a spate of recent robust economic data, including monthly hiring numbers, GDP growth and inflation, which have underscored the economy's strength.

With the rally about to enter its second month, valuations may come under focus.

The S&P 500 is currently trading at about 17.5 times forward twelve-month earnings, above the 10-year median of nearly 15 times, according to Thomson Reuters StarMine.

"We are leaning in the direction of going up, and at some point it will get too much, but apparently the market is telling us that today is not too much," said Kim Forrest, senior equity research analyst, Fort Pitt Capital Group in Pittsburgh.

Oil prices rose 0.7 percent, up for the second day in a row, on optimism that a non-OPEC producers meeting would result in an agreement to bolster the group's output cut deal. [O/R]

The resilience of the stock market will be put to test after the Federal Reserve's policy meeting next week, where traders expect a 94 percent chance of an interest rate increase.

At 9:53 a.m. EDT the Dow Jones industrial average was up 39.16 points, or 0.2 percent, at 19,653.97, the S&P 500 was up 7.44 points, or 0.33 percent, at 2,253.63 and the Nasdaq Composite .IXIC was up 30.06 points, or 0.55 percent, at 5,447.42.

Eight of the 11 major S&P 500 sectors were higher, led by a 0.86 percent rise in health stocks and 0.40 percent in technology.

Financials .SPSY, which have been the best performers in the rally, were off 0.6 percent.

Restoration Hardware plunged 17.80 percent to $32.05 after the furniture retailer lowered its fourth-quarter profit forecast, citing slow sales in the holiday period.

Wynn Resorts rose 7.5 percent to $95 after Macau, the world's biggest gambling hub, clarified it had not tightened daily cash withdrawal limits for Chinese gamblers.

Broadcom rose 5.7 percent to $180.50 after the chipmaker reported upbeat fourth-quarter results and forecast, and doubled its dividend.

Biogen  rose 4.3 percent to $302.10 following a study that showed higher doses of its Alzheimer's drug appeared to reduce the risk of brain swelling.

Advancing issues outnumbered decliners on the NYSE by 1,667 to 998, for a 1.67-to-1 ratio on the upside. On the Nasdaq, 1,611 issues rose and 823 fell for a 1.96-to-1 ratio favoring advancers.

The S&P 500 index showed 34 new 52-week highs and no new lows, while the Nasdaq recorded 185 new highs and four new lows.

Reuters (Reporting by Yashaswini Swamynathan in Bengaluru; Editing by Savio D'Souza and Saumyadeb Chakrabarty)