(Reuters) - The Dow and Nasdaq Composite rose to record highs on Tuesday in a rally fueled by optimism about U.S. President-elect Donald Trump’s policies.

The Dow Jones industrial average ended just 25 points shy of 20,000, a level it has never breached, helped by a 1.68 percent gain in Goldman Sachs GS.N.

U.S. stocks have been on a tear since the Nov. 8 presidential election, with the Dow up 9 percent and the S&P 500 gaining 6 percent on bets that Trump’s plans for deregulation and infrastructure spending will boost the economy.

“The market is focused on the Trump agenda, which is tax cuts, infrastructure spending and deregulation,” said Jeff Zipper, managing director for investments at Private Client Reserve at U.S. Bank in Palm Beach, Florida.

Some investors believe stocks have become expensive. The S&P 500 is trading at about 17 times expected earnings, well above its 10-year average of 14, according to Thomson Reuters Datastream.

The Dow’s 20,000 mark represents a major milestone on Wall Street and some investors believe that piercing that level would signal the recent rally may continue. The Dow first hit 10,000 in 1999.

“To have enough energy to push through that barrier would mean there’s a lot of buying power in the system,” said Brad McMillan, Chief Investment Officer for Commonwealth Financial Network. “Once we do crack through, that ceiling will tend to become a floor.”

Specialist trader Mario Picone wears a "DOW Almost 20,000" cap as he works at his post on the floor of the New York Stock Exchange (NYSE) in New York City, U.S., December 15, 2016. REUTERS/Brendan McDermid - RTX2V80C

The Dow Jones industrial average .DJI rose 91.56 points, or 0.46 percent, to end at 19,974.62 points, a record high close.

The S&P 500 .SPX gained 8.23 points, or 0.36 percent, to finish at 2,270.76 and the Nasdaq Composite .IXIC had added 26.50 points, or 0.49 percent, to 5,483.94, also a record high close.

Eight of the 11 major S&P sectors rose, with the financial index's .SPSY 1.12 percent rise leading the advancers. That brought the financial sector's gain since the election to 19 percent as investors bet Trump will cut regulations including Dodd-Frank, which was passed in response to the 2008 financial crisis but which some investors say is too restrictive.

Wells Fargo WFC.N rose 1.59 percent and Citigroup C.N added 1.91 percent.

The consumer discretionary index .SPLRCD rose 0.78 percent.

General Mills GIS.N fell 2.55 percent after the Cheerios cereal-maker's quarterly results missed expectations.

After the bell, Nike NKE.N rose 3 percent on a strong quarterly report from the sports apparel seller, which is a component of the Dow.

Advancing issues outnumbered declining ones on the NYSE by a 1.84-to-1 ratio; on Nasdaq, a 1.88-to-1 ratio favored advancers.

The S&P 500 posted 37 new 52-week highs and no new lows; the Nasdaq Composite recorded 235 new highs and 36 new lows.

With some investors already away for the end-of-year holidays, about 6.1 billion shares changed hands in U.S. exchanges, well below the 7.5 billion daily average over the last 20 sessions.