NEW YORK - The Nasdaq and S&P 500 posted modest gains on Tuesday, a day ahead of major inflation data, weighed down by financial stocks as investors braced for major U.S. banks to kick off earnings reporting season on Friday.

The tech-heavy Nasdaq Composite Index, boosted by chips, enjoyed a more substantial advance, with the S&P 500 nominally higher.

The blue-chip Dow Jones Industrial Average closed essentially unchanged.

Wednesday's hotly anticipated Consumer Price Index (CPI) is at the top of most investors' minds as they tweak expectations on the timing and extent of the Federal Reserve's rate-cutting phase, following robust economic data such as last Friday's blockbuster employment report.

"The markets are nervous about tomorrow's CPI report and buying protection (amid) a growing perception that it could be an uncomfortably high inflation reading," said Michael Green, chief strategist at Simplify Asset Management in Philadelphia. "The market is moving to hedge itself."

JPMorgan Chase & Co, Wells Fargo & Co and Citigroup Inc, due to report results on Friday, were the three constituents in the S&P Banking index to end lower.

"The financials kick off first-quarter reporting season and often set the tone," said Bill Northey, senior investment director at U.S. Bank Wealth Management, Billings, Montana. "We are looking to the cyclical areas as an indicator of the health of corporate America."

While analysts expect inflation to continue meandering down toward the U.S. central bank's 2% goal, the National Federation of Independent Business reported on Tuesday that small business optimism touched an 11-year low in March, with inflation as the most pressing concern.

"The continued deterioration of the small business sentiment index is actually really important," Green added. "It's the same thing that we've seen in the past couple of cycles where the larger companies are well protected while small businesses are under extraordinary pressure."

The Dow Jones Industrial Average fell 9.13 points, or 0.02%, to 38,883.67. The S&P 500 gained 7.52 points, or 0.14%, at 5,209.91 and the Nasdaq Composite added 52.68 points, or 0.32%, at 16,306.64.

Nine the 11 major sectors in the S&P 500 closed higher, with real estate enjoying the largest percentage gains. Financials were the biggest laggards.

Analysts are expecting aggregate S&P 500 first-quarter earnings growth of 5.0% year-on-year, down from 7.2% at the start of the quarter, according to LSEG.

Cryptocurrency and blockchain-related stocks declined, tracking falling bitcoin prices. Exchange operator Coinbase Global and software company MicroStrategy dipped 5.5% and 4.8%, respectively.

Moderna was a bright spot, jumping 6.2% after the drugmaker's individualized cancer vaccine developed with Merck showed promise in an early-stage trial.

Alphabet Inc's shares gained 1.1%, pushing the company closer toward the $2 trillion market cap threshold.

Advancing issues outnumbered decliners on the NYSE by a 1.44-to-1 ratio; on Nasdaq, a 1.33-to-1 ratio favored advancers.

The S&P 500 posted 13 new 52-week highs and one new low; the Nasdaq Composite recorded 62 new highs and 77 new lows.

Volume on U.S. exchanges was 10.31 billion shares, compared with the 10.31 billion average for the full session over the last 20 trading days.

(Reporting by Stephen Culp; Additional reporting by Shashwat Chauhan and Shristi Achar A in Bengaluru; Editing by Richard Chang)