NEW YORK (Reuters) - The S&P 500 edged higher but the Dow closed nominally lower on Thursday as lingering anxieties about slowing global growth and unresolved trade disputes undercut a spate of strong earnings, while chipmakers rallied to give the Nasdaq a solid gain.

Fourth-quarter earnings continued to be generally positive, but U.S. Commerce Secretary Wilbur Ross’ comments that the United States and China were “miles and miles” from reaching a trade agreement curbed investor enthusiasm.

Chipmakers led the Nasdaq’s rise, as Xilinx Inc and Lam Research Corp reported quarterly results that beat analyst expectations. Texas Instruments Inc, while posting better-than-expected profit, disappointed on revenue.

The Philadelphia SE Semiconductor Index, under pressure in recent months after Apple Inc warned of waning smartphone demand, was saw its biggest one-day percentage gain since Dec. 26, advancing 5.7 percent.

Still, even in the face of upbeat corporate results, fears surrounding tariffs and the longest federal government shutdown in history weighed on investors.

“What we’re seeing is the positive of strong earnings being offset by the very rapidly rising political risks,” said Oliver Pursche, vice chairman and chief market strategist at Bruderman Asset Management in New York. “There continues to be hope, but then the commerce secretary saying that we’re miles apart on a China trade deal certainly negates that positive.”

“Right now markets are going to stay in a relatively tight trading range until they get some news they can really digest and trade on,” Pursche added. “There’s no reason to sell but there’s also no reason to buy.”

Commercial air carriers American Airlines Group Inc, Southwest Airlines Co and JetBlue Airways Corp all reported quarterly earnings that surpassed consensus estimates amid growing pressures related to the government shutdown.

The S&P 500 Airlines index gained 3.3 percent.

Traders work on the floor of the New York Stock Exchange (NYSE) in New York, U.S., January 22, 2019. REUTERS/Brendan McDermid

Union Pacific Corp also reported earnings that surprised to the upside. The railroad operator, along with airlines and other companies, is a constituent of the closely watched Dow Jones Transportation index, ended the session up 1.1 percent.

The Dow Jones Industrial Average fell 22.38 points, or 0.09 percent, to 24,553.24, the S&P 500 gained 3.63 points, or 0.14 percent, to 2,642.33 and the Nasdaq Composite added 47.70 points, or 0.68 percent, to 7,073.46.

Of the 11 major sectors of the S&P 500, all but consumer staples, healthcare and materials advanced.

Fourth-quarter reporting season is in full-swing. With nearly one-fifth of S&P 500 companies having reported, 75.3 percent have surpassed Street estimates. Analysts now see S&P profit growth of 14.2 percent for the quarter.

Shares of Textron Inc jumped 5.6 percent after beating analyst profit estimates and forecast better-than-expected 2019 profit.

PG&E Corp soared by 74.6 percent after the California utility was cleared of the 2017 Tubbs fire.

Mining company Freeport-McMoRan Inc slid 13.1 percent after missing fourth-quarter profit expectations due to falling copper prices.

Intel Corp fell in after-hours trading after reporting lower-than-expected fourth-quarter revenue due to weakening demand.

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

The S&P 500 posted 9 new 52-week highs and 1 new lows; the Nasdaq Composite recorded 27 new highs and 36 new lows.

Volume on U.S. exchanges was 6.94 billion shares, compared to the 7.88 billion average over the last 20 trading days.