NEW YORK (MarketWatch) — After flipping between small gains and losses in a choppy trading day, U.S. stocks ended fractionally higher. A small gain on the S&P 500, however, was enough to push the index to a record close, its 42nd this year.

Stocks were under pressure in the morning trade following news that Japan fell into recession and less-than-stellar manufacturing data in the U.S.

Comments from European Central Bank president Mario Draghi, who said that the ECB would be open to buying government bonds, if needed, buoyed U.S. stocks in afternoon trade before pulling back somewhat.

Overall, U.S. stocks seemed hesitant to make a break-out move in either direction.

The S&P 500 SPX, -2.04% added 1.5 points to 2,041.43, new record close. The Dow Jones Industrial Average DJIA, -2.77% hovered near record levels, but closed just below it after adding 13 points, or 0.1%, to 17,647.75. The Nasdaq Composite COMP, -1.26% finished the day down 17.5 points, or 0.4%, at 4,671.00

Economic data: The Empire State manufacturing index, the first of the many regional manufacturing gauges to be released, rebounded slightly in November, but is still well below September levels, indicating a downshift in activity.

Separately, industrial production fell unexpectedly in October, the second drop in the last three months, the Federal Reserve said Monday. In a sign that falling oil prices are beginning to effect the energy industry, oil and gas well drilling fell for the first time since February.

Meanwhile, Japan’s real gross domestic product shrank 1.6% in the third quarter, contributing to the decline was companies cutting inventories and subdued capital investment. Economists surveyed by The Wall Street Journal had, on average, been looking for the economy to expand by 2.25%.

Stocks to watch:Baker Hughes Inc. US:BHI shares surged 8.9% after Halliburton Co. HAL, -9.72% agreed to purchase its rival oil-services provider in a cash-and-stock deal valued at $34.6 billion. The deal is expected to close in the second half of 2015. Halliburton shares fell 11%.

Tyson Foods Inc. TSN, -2.49% shares climbed 5.8% as the meat producer said quarterly sales rose 14%.

Botox maker Allergan Inc. US:AGN neared a deal to be acquired by Actavis PLC ACT, -2.70% , according to The Wall Street Journal. Allergan prices jumped 5.3%, and Actavis shares rose 1.7%.

Hasbro Inc. HAS, -4.19% shares rose 4.4% as merger talks between the Transformers toy maker and DreamWorks Animation SKG Inc. US:DWA fell through, according to reports.

Read more about the day’s notable stocks in Movers & Shakers column.

Other markets: Japanese stocks sank after the GDP report, leaving the Nikkei Stock Average NIK, +0.17% down 3%. The Japanese yen, meanwhile, slid to a seven-year low against the U.S. dollar USDJPY, +0.14% , but recovered somewhat allowing the dollar to buy more than ¥116. The country’s Prime Minister Shinzo Abe said he will decide on whether to move forward with a planned sales-tax increase following analysis of the situation, according to media reports Monday. Abe may also call for a snap election to be held next month.

“The stock market and currency could remain volatile until Mr. Abe confirms his intentions. There is, of course, the prospect of further economic stimulus as well,” said Richard Troue, head of investment analysis, at Hargreaves Lansdown, in a Monday note.