NEW YORK (Reuters) - The S&P 500 ended little changed on Tuesday, with a rally in energy and industrial shares countering a drop in the technology and real estate sectors as investors favored value over growth.

Industrials pulled the blue-chip Dow slightly higher and led the bellwether S&P 500’s nominal advance, while the tech-heavy Nasdaq posted its third straight decline.

“The shift towards value-oriented names has been going on,” said Robert Pavlik, chief investment strategist, senior portfolio manager at SlateStone Wealth LLC in New York. “People are looking for areas of the market that may make sense and looking to get less risk in their portfolio.”

(For a graphic on 'Growth vs. value' click tmsnrt.rs/2A871qZ)

China producer prices fell last month at their sharpest pace in three years, hit by Beijing’s trade war with Washington.

China is expected to buy more agricultural products to position itself for a better trade deal, according to a report from the South China Morning Post.

The underwhelming data from China weighed on tariff-sensitive technology stocks .SPLRCT, which fell 0.5%

Investors expect the U.S. Federal Reserve and the European Central Bank to cut rates to bolster the global economy. Germany’s finance minister suggested the nation was prepared to fight a possible recession with a stimulus package.

“A lot of people are looking to the Fed and other central banks to lower interest rates,” said Pavlik. “But think about it, if they’re cutting rates it means their economies aren’t very good. It’s a misguided logic.”

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

The news from Germany, along with easing U.S.-China tensions sent U.S. Treasury yields to four-week highs, tracking German bonds.

The Dow Jones Industrial Average .DJI rose 73.92 points, or 0.28%, to 26,909.43, the S&P 500 .SPX gained 0.96 points, or 0.03%, to 2,979.39 and the Nasdaq Composite .IXIC dropped 3.28 points, or 0.04%, to 8,084.16.

Of the 11 major sectors in the S&P 500, six ended the session higher, with energy .SPNY and industrials seeing the biggest percentage gains.

Interest rate-sensitive real estate stocks .SPLRCR were the biggest percentage losers, dropping 1.4% .

Apple Inc AAPL.O edged up 1.2% after announcing the Nov. 1 launch date for its streaming service Apple TV+, and unveiled its latest iPhone and Watch updates.

Wendy's Co WEN.O dropped 10.2 after the fast food chain projected a drop in full-year 2019 adjusted earnings.

Wendy's rival McDonald's Inc MCD.N announced it would buy Silicon Valley start-up Apprente. Its stock dipped 3.5% and was the biggest drag on the Dow.

Ford Motor Co's F.N shares fell 1.3% after Moody's downgraded the automaker's bond rating to junk.

Mallinckrodt Plc MNK.N, beset by opioid litigation uncertainties, announced it would sell BioVectra Inc to private equity firm H.I.G. Capital for up to $250 million, sending the drugmaker's shares surging 84.8%.

Francesca's Holdings Corp FRAN.O shot up 101.6% after the specialty retailer posted better-than-expected second quarter results.

Advancing issues outnumbered decliners on the NYSE by a 1.36-to-1 ratio; on Nasdaq, a 1.78-to-1 ratio favored advancers.

The S&P 500 posted 15 new 52-week highs and two new lows; the Nasdaq Composite recorded 42 new highs and 38 new lows.

Volume on U.S. exchanges was 8.05 billion shares, compared with the 6.86 billion average over the last 20 trading days.