U.S. stocks flitted between gains and losses Thursday as Macy’s and Kohl’s posted strong earnings and unemployment data showed the labor market is continuing to recover.

The S&P 500 ticked up 0.3% reversing Wednesday’s 0.3% losses. The Nasdaq Composite Index edged 0.2% higher, as technology stocks added to early gains. The Dow Jones Industrial Average slipped 0.1%.

Stocks...

U.S. stocks flitted between gains and losses Thursday as Macy’s and Kohl’s posted strong earnings and unemployment data showed the labor market is continuing to recover.

The S&P 500 ticked up 0.3% reversing Wednesday’s 0.3% losses. The Nasdaq Composite Index edged 0.2% higher, as technology stocks added to early gains. The Dow Jones Industrial Average slipped 0.1%.

Stocks have wavered this week as earnings rolled in and concerns about rising consumer prices continued. Results have overall been strong, but some major companies such as Target have been hit by supply-chain snarls and rising costs. Despite this, major indexes are still hovering close to their record highs.

“Markets are trying to figure inflation out, and maybe part of that is just how temporary the situation will be,” said Jim Polk, head of equity investments at Homestead Funds. “Concerns about congestion and how much that’s impacting inflation—those are really the big things.”

Shares of Macy’s surged 21% and Kohl’s jumped 7.8%, as both retailers released earnings that beat analysts’ estimates and raised their full-year guidance.

“Consumers are taking whatever is on the shelves at whatever prices they are listed at, so that’s really good for retailers and margins,” said George Cipolloni, a portfolio manager at Penn Mutual Asset Management, who is recommending holding small-cap stocks.

U.S.-listed Alibaba shares declined 11% after the Chinese e-commerce giant reported a drop in quarterly profit due to losses from its investments in equities.

Technology firm Nvidia rose 8.1% after posting record quarterly revenue. Cisco Systems slid 7.3% after the company gave earnings guidance that was below Wall Street’s estimates and said it was affected by the semiconductor shortage.

Electric-vehicle makers Rivian Automotive and Lucid Group extended losses into a second day. The stocks were both down around 15%. 

The latest data showed 268,000 people filed for jobless claims in the week ended Nov. 13, a decline from the previous week. The number of claims is beginning to approach pre-pandemic levels, as employers hang on to their workers in a tight labor market. 

Some investors are closely watching for a Federal Reserve chair nomination after President Joe Biden hinted to reporters Tuesday he could reveal his choice around the end of the week. President Biden will be making his pick between current chair Jerome Powell or Fed governor Lael Brainard.

Corporate earnings have mostly been strong this reporting season.

Photo: Spencer Platt/Getty Images

Bitcoin traded at around $57,797, extending its fall into a fourth day. It is down 3.8% from its level on Wednesday at 5 p.m. ET, according to data from CoinDesk. 

The yield on the benchmark U.S. 10-year Treasury note ticked down to 1.589% from 1.604% Wednesday. Prices go down when yields move up.

Brent crude, the global oil benchmark, traded near the flatline in early hours but started holding steady in the afternoon, most recently gaining 1.3% to $81.33.

Overseas, the Turkish lira has depreciated for eight consecutive days, reaching a record low of 11.1 lira to $1. The country’s central bank cut its key policy rate to 15% Thursday after President Recep Tayyip Erdogan renewed his calls for reduction, despite surging inflation.

Meanwhile, the pan-continental Stoxx Europe 600 index ticked down 0.5%. Shares of Thyssenkrupp climbed 6.4% after the industrial conglomerate said its earnings were boosted by the rise in steel prices. German car-parts manufacturer Continental declined 3.1% after its board fired its chief financial officer. 

In Asia, most major benchmarks declined. The Shanghai Composite Index retreated 0.5% and Japan’s Nikkei 225 edged down 0.3%. Hong Kong’s Hang Seng Index fell 1.3%, dragged down by a series of Chinese technology companies missing earnings expectations, according to Deutsche Bank.

China Evergrande Group said it planned to sell its stake in a Hong Kong-listed film production company, its latest move to generate cash to pay off its debts. It will incur a loss equivalent to around $1.1 billion from the transaction. Evergrande’s shares declined close to 6%.

WSJ explains why Evergrande's crisis is raising questions about the state of the world’s second-largest economy.

Write to Anna Hirtenstein at anna.hirtenstein@wsj.com