U.S. stocks drifted between small gains and losses in afternoon trading Monday. Investors sifted through a mix of corporate deal news and Japan’s unexpected slide into recession in the third quarter. Energy stocks were among the biggest decliners as the slide in crude oil prices deepened.

KEEPING SCORE: The Standard & Poor’s 500 index was up about a half a point to 2,040 as of 1:08 p.m. Eastern time. The Dow Jones industrial average rose 20 points, or 0.1 percent, to 17,655. The Nasdaq composite shed 16 points, or 0.4 percent, to 4,671. U.S. markets are coming off their latest record high.

THE QUOTE: “Japan definitely started us on a bit of a negative tone with the economy back into recession,” said Chris Gaffney, senior market strategist at EverBank Wealth Management.

JAPAN WOES: Japan’s economy, the world’s third-largest, did worse than many expected the July-September period. Official figures showed the economy contracted at a 1.6 percent annual pace, confounding forecasts that it would rebound after a big 7.1 percent drop the quarter before. Many blame a new sales tax in the country for the return to recession.

GLOBAL UNCERTAINTY: With Japan in recession and much of Europe stagnating, there are growing concerns over the state of the global economy, which is increasingly being supported by the U.S. Over the weekend, leaders from the 20 top developed and developing countries, a group known as the G-20, acknowledged as much and pledged to boost growth. British Prime Minister David Cameron even warned that “red warning lights” are once again flashing over the global economy.

BIGGER PHARMA: Pharmaceutical giant Actavis agreed to buy Botox maker Allergan for $66 billion. Allergan shares surged 5.4 percent. The stock gained $10.81 to $209.46. Actavis added $4.16, or 1.7 percent, to $247.93.

ENERGY DEAL: Oilfield services company Baker Hughes jumped 10.6 percent on news it has agreed to be acquired by rival Halliburton in a deal worth $34.6 billion cash and stock. Baker Hughes rose $6.33 to $66.22. Halliburton fell $5.34, or 9.7 percent, to $49.75.

SLIP AND SLIDE: Several oil and natural gas exploration companies were among the biggest decliners in the S&P 500. Denbury Resources slumped $1.30, or 11.6 percent, to $9.90, after the company disclosed plans to cut its 2015 capital spending up 50 percent because of the recent tumble in oil prices. QEP Resources shed $1.26, or 5.1 percent, to $23.26. Newfield Exploration fell $1.71, or 5.1 percent, to $31.95.

TOY STORY: DreamWorks Animation slid 14.3 percent following a media report over the weekend that talks between the animation studio and toy maker Hasbro have faded, dimming the likelihood that Hasbro will buy the studio known for movies such as “Shrek” and “Kung Fu Panda.” DreamWorks fell $3.72 to $22.30. Shares in Hasbro rose $1.99, or 3.7 percent, to $56.01.

JUST HANG UP: ShoreTel shares sank 11.1 percent after Mitel Networks withdrew its buyout bid for the telecommunications services company, citing repeated refusals to talk. ShoreTel fell 93 cents to $7.28.

SECTOR WATCH: Six of the 10 sectors in the S&P 500 were down, with energy stocks falling most. The sector is down 4 percent this year. Utilities rose the most.

US ECONOMY: New government data gave investors a mixed snapshot of the U.S. economy. The Federal Reserve reported Monday that U.S. manufacturing output grew a modest 0.2 percent in October, as autoworkers churned out fewer cars and trucks. Separately, the Empire State Manufacturing index rose 10.2 percent last month, suggesting New York state’s manufacturing should continue to grow in coming months.

OVERSEAS MARKETS: Tokyo’s benchmark Nikkei index slid 3 percent. Japan’s woes weighed on most other markets in Asia. Hong Kong’s Hang Seng slid 1.2 percent, while Australia’s S&P/ASX 200 fell 0.8 percent. The Shanghai Composite Index 0.2 percent lower. European markets moved higher. The FTSE 100 index of leading British shares rose 0.3 percent, while Germany’s DAX gained 0.6 percent. The CAC-40 in France added 0.6 percent.

ENERGY: Concerns over the global economy were dominant in the oil markets. Benchmark U.S. crude fell 64 cents to $75.18 a barrel in New York.

BONDS: The yield on the 10-year U.S. Treasury note rose to 2.34 percent from 2.32 percent late Friday.