(Reuters) - Wall Street ended slightly higher on Wednesday after a spate of upbeat earnings reports, but lingering concerns about trade tensions and the longest U.S. government shutdown ever limited the advance.

All three major U.S. stock indexes closed in positive territory, with the blue chip Dow Jones Industrial Average seeing the biggest gains on positive quarterly results from International Business Machines IBM.N, Procter & Gamble Co PG.N and United Technologies UTX.N.

Investor sentiment was dampened by reports that business leaders gathered at the World Economic Forum in Davos, Switzerland, were losing confidence in President Donald Trump’s policies that have resulted in the prolonged U.S.-China trade stand-off.

Uncertainty persisted in Washington, where no end to the longest-ever federal government shutdown appeared to be in sight.

The United States could see zero growth in the first quarter if the shutdown extends through March, according to White House economic adviser Kevin Hassett on Wednesday.

“The headlines coming out of Davos are rehashing some of the pessimism,” said Matthew Keator, partner in the Keator Group, a wealth management firm in Lenox, Massachusetts.

“We are in a more anxious market here, coming off the lows of the fourth quarter,” Keator added. “People’s wounds are still fresh.”

Still, a spate of positive earnings helped boost the Dow.

IBM provided the biggest boost to the Dow, rising 8.5 percent after cloud and software services helped its profit come in above analyst estimates and the company offered better-than-expected guidance for 2019.

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

Procter & Gamble advanced 4.9 percent after the company upped its full-year sales forecast and took advantage of price increases and strong demand to beat analyst earnings estimates.

United Technologies reported a better-than-expected fourth-quarter profit and forecast 2019 earnings above analyst estimates. The industrial conglomerate’s stock ended the session 5.4 percent higher.

The Dow Jones Industrial Average .DJI rose 171.14 points, or 0.7 percent, to 24,575.62, the S&P 500 .SPX gained 5.8 points, or 0.22 percent, to 2,638.7 and the Nasdaq Composite .IXIC added 5.41 points, or 0.08 percent, to 7,025.77.

Of the 11 major sectors of the S&P 500, only energy .SPNY and materials .SPLRCM closed in the red.

Fourth-quarter reporting season is in full swing, and of the 15 percent of S&P 500 companies that have reported, 77.6 percent have beaten analyst estimates, according to Refinitiv data.

Analysts now see S&P 500 earnings growth of 14.2 percent in the quarter.

Comcast Corp CMCSA.O rose 5.5 percent after the top U.S. cable service provider posted better-than-expected earnings and announced it would raise its dividend by 10 percent.

Shares of Tesla Inc TSLA.O dropped 3.8 percent after the electric automaker said it was reducing production hours for higher-priced Model S and Model X cars, days after announcing job cuts.

After the bell, Ford Motor Co F.N reported lower operating profit in the fourth quarter, weighed down by losses in every global region but North America.

Advancing issues outnumbered declining ones on the NYSE by a 1.05-to-1 ratio; on Nasdaq, a 1.02-to-1 ratio favored decliners.

The S&P 500 posted 4 new 52-week highs and 1 new low; the Nasdaq Composite recorded 16 new highs and 45 new lows.

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