NEW YORK - The S&P 500 closed nominally higher on Thursday, retracing early gains just before the closing bell on the penultimate trading day of 2023.

The benchmark index concluded the light volume session just 0.3% shy of its record closing high, reached on Jan. 3, 2022.

The blue-chip Dow ended modestly green, notching its second record-high closing level in a row, while the Nasdaq finished a hair lower. All three indexes remained on track for monthly, quarterly, and annual gains.

"This is one of the best end-of-year rallies we've ever seen and a lot of this rally happened before the Fed pivot in the middle of December," said Ryan Detrick, chief market strategist at Carson Group in Omaha.

"It’s a nice reminder of how far we've come from the depths of the bear market last year and reminder to investors that dark clouds happen, but the sun always comes out again," Detrick added.

Had the S&P 500 settled above its previous all-time closing high, it would have confirmed that the benchmark index entered a bull market when it reached the bear market closing trough in October 2022.

"Reaching new highs after two years could be a subtle sign that economic strength could be in the cards for 2024," Detrick said.

Data released early in the day, including jobless claims, pending home sales and preliminary trade/inventories all painted a picture of a softening but resilient economy.

This scenario has helped cement bets the U.S. Federal Reserve might cut its policy rate sooner than expected and could pull off a soft landing by avoiding recession.

At last glance, financial markets have priced in a 74.1% probability policymakers will cut the Fed funds target rate by 25 basis points in March, according to CME's FedWatch tool.

The Dow Jones Industrial Average rose 53.58 points, or 0.14%, to 37,710.1, the S&P 500 gained 1.77 points, or 0.04%, to 4,783.35 and the Nasdaq Composite dropped 4.04 points, or 0.03%, to 15,095.14.

Among the 11 major sectors of the S&P 500, utilities had the largest percentage gain. Energy shares were down the most, weighed by sagging crude prices.

U.S.-listed shares of Chinese companies, including Alibaba Holdings, PDD Holdings and JD.Com Inc advanced between 0.6% and 2.7% as China's blue-chip stocks staged their biggest jump in five months.

CytoSorbents slid 33.4% after the company's device aimed at reducing bleeding during surgery failed meet the main goal of a study.

Boeing dipped 0.7% after the planemaker urged airlines to inspect newer 737 MAX airplanes for a possible loose bolt in the rudder control system.

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

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

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

(Reporting by Stephen Culp; Additional reporting by Shubham Batra and Amruta Khandekar in Bengaluru; Editing by David Gregorio)