(Reuters) - The benchmark S&P 500 stock index posted a slim gain to end with a record closing high on Thursday, as a dour forecast from tech stalwart Cisco Systems was offset by a strong report from big box retailer Walmart.

The Dow index ended barely negative, after posting a closing high on Wednesday, while the Nasdaq also ended fractionally lower.

Cisco CSCO.O shares tumbled 7.3% after the network gear maker forecast second-quarter revenue and profit below expectations as increasing global economic uncertainties kept clients away from spending more on its routers and switches.

Cisco's share decline weighed the most on the major indexes and helped drag the technology sector .SPLRCT down 0.1%.

In contrast, Walmart WMT.N raised its annual outlook, and the world's largest retailer posted better-than-expected earnings, comparable sales and e-commerce growth in its largest market during the third quarter.

Walmart shares fell 0.3% after hitting a record high earlier in the session, but the S&P 500 retail .SPXRT and consumer discretionary .SPLRCD indexes finished higher after the company's report.

“We have on display this front end of the economy, the U.S. consumer, that remains resilient and remains in a healthy place in front of a very key holiday spending time frame for the economy,” said Margaret Reid, senior portfolio manager at The Private Bank at Union Bank in San Francisco.

FILE PHOTO: Traders work on the floor at the New York Stock Exchange (NYSE) in New York, U.S., November 13, 2019. REUTERS/Brendan McDermid

That compares, Reid said, to “the back end of the economy that still seems to be plagued and weighed by U.S.-China trade and global economic and political volatility.”

The Dow Jones Industrial Average .DJI fell 1.63 points, or 0.01%, to 27,781.96, the S&P 500 .SPX gained 2.59 points, or 0.08%, to 3,096.63 and the Nasdaq Composite .IXIC dropped 3.08 points, or 0.04%, to 8,479.02.

Stocks have recently run to all-time highs, helped by the Federal Reserve’s interest rate cuts, third-quarter earnings topping low expectations, and signs the economy may be bottoming.

Third-quarter corporate reporting season is drawing to a close with about three-fourths of S&P 500 companies posting profits above expectations, but with earnings expected to have declined 0.4% overall from the year-earlier period, according to Refinitiv.

“The market is kind of in a holding pattern,” said Jake Dollarhide, chief executive officer of Longbow Asset Management in Tulsa, Oklahoma. “It seems like it has gotten everything it can get out of this earnings season.”

Fed Chair Jerome Powell on Thursday said the risk of the U.S. economy facing a dramatic bust is remote, and investors will next be looking to U.S. retail sales data on Friday to gauge the health of the economy.

On Thursday, real estate .SPLRCR was the top-performing S&P 500 sector, rising 0.8%, while energy .SPNY and consumer staples .SPLRCS lagged along with tech.

Dillard's Inc DDS.N shares jumped 14.2% after the department store chain's quarterly results.

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

The S&P 500 posted 26 new 52-week highs and three new lows; the Nasdaq Composite recorded 78 new highs and 121 new lows.

About 6.3 billion shares changed hands in U.S. exchanges, below the 6.9 billion-share daily average over the last 20 sessions.