NEW YORK (Reuters) - The S&P 500 and the Dow industrials registered record closing highs on Tuesday with a boost from bank stocks as investors eyed a potential cut in U.S. corporate taxes and continued economic growth after strong inflation data.

U.S. producer prices rose in November as gasoline prices surged and the cost of other goods increased, leading to the largest annual gain in nearly six years.

The data, which came a day ahead of U.S. Federal Reserve’s widely-expected hike in interest rates could assuage concerns among some Fed officials over persistently low inflation.

Investors were also hoping U.S. Republicans would be able to complete final legislation for a tax overhaul that is expected to slash corporate tax rates.

“It’s mostly optimism on taxes being close to the finish line and stronger global economic data,” said RJ Grant, head of trading at Keefe, Bruyette & Woods in New York.

The Dow Jones Industrial Average .DJI rose 118.77 points, or 0.49 percent, to 24,504.8, the S&P 500 .SPX gained 4.12 points, or 0.15 percent, to 2,664.11 and the Nasdaq Composite .IXIC dropped 12.76 points, or 0.19 percent, to 6,862.32.

The financial sector .SPSY was the biggest driver with a 1-percent gain, followed by the healthcare sector .SPXHC, up 0.4 percent. The telecom index .SPLRCL was the biggest percentage gainer with a 2.8-percent jump.

Traders work on the floor of the New York Stock Exchange shortly after the opening bell in New York, U.S., December 5, 2017. REUTERS/Lucas Jackson

“As investors become more comfortable (that) the economic recovery appears to be expanding, they’re starting to dip their toes into the value sectors like industrials, financials and energy that need earnings growth to expand,” said Jack Ablin, chief investment officer at BMO Private Bank in Chicago.

“People are starting to think about 2018 and they’re getting reports into their inbox. Generally they’re pretty upbeat.”

Goldman Sachs GS.N was the biggest boost for the Dow with a 3-percent gain, followed by Boeing BA.N, which rose 2.4 percent after it announced a 20-percent dividend hike and an $18-billion share buyback authorization.

Declines in technology heavyweights, including Apple AAPL.O and Facebook FB.O, dragged on the Nasdaq.

The Fed is widely expected to raise its benchmark interest rate for third time this year on Wednesday. Traders see an 87.6-percent chance of a 25-basis-point rate hike, according to the CME Group’s Fedwatch tool.

Investors will watch for the central bank’s forecast on future rate hikes and its view on the health of the economy.

“The market is anticipating 1-2 rate hikes and the Fed is looking at 3-4 (in 2018). There is going to be some reconciliation of those opinions, and so far in the last few years, the market has been more right than the Fed has,” said Paul Nolte, portfolio manager at Kingsview Asset Management in Chicago.

Declining issues outnumbered advancing ones on the NYSE by a 1.19-to-1 ratio; on Nasdaq, a 1.26-to-1 ratio favored decliners.

The S&P 500 posted 41 new 52-week highs and 1 new low; the Nasdaq Composite recorded 51 new highs and 42 new lows.

About 6.50 billion shares changed hands in U.S. exchanges, in line with the 6.52 billion daily average over the last 20 sessions