Global trading was expected to be light, with some markets in Europe and Latin America closed for the May Day holiday, while Japan was open overnight during a shortened trading week.
Data showed U.S. manufacturing activity slowed in April while consumer spending was unchanged in March and a key inflation measure recorded its first monthly drop since 2001. Despite the soft data, traders continued to see a 7-in-10 chance that the Federal Reserve will hike interest rates in June.
On Wall Street, Apple and other large technology companies led the way, sending the Nasdaq Composite to a record high. Apple is due to report its earnings on Tuesday, while Facebook will report on Wednesday.
Stocks were supported also as U.S. Congress negotiators agreed on a federal funding deal late on Sunday, removing a hurdle for investor confidence.
"We have some renewed optimism that the market strength will continue helped by strong earnings and as a government shutdown was averted," said Andre Bakhos, managing director at Janlyn Capital LLC in Bernardsville, New Jersey.
The Dow Jones Industrial Average rose 20.07 points, or 0.1 percent, to 20,960.58, the S&P 500 gained 5.84 points, or 0.24 percent, to 2,390.04 and the Nasdaq Composite added 30.82 points, or 0.51 percent, to 6,078.43.
MSCI's gauge of stocks across the globe gained 0.25 percent.
Emerging market stocks rose 0.19 percent. MSCI's broadest index of Asia-Pacific shares outside Japan <.MIAPJ0000PUS> closed 0.33 percent higher, while Japan's Nikkei <.N225> rose 0.59 percent.
U.S. drillers added nine oil rigs in the week to April 28, bringing the count to the most since April 2015, energy services company Baker Hughes said on Friday. Crude output in the United States has hit its highest since August 2015, government data shows.
"The U.S. rig count indicates that there is plenty more to come," analysts at JBC Energy said in a report, referring to the outlook for U.S. production.
Crude prices were also pressured by data showing that growth in Chinese manufacturing slowed faster than expected in April.
The weak U.S. data initially weighed on the dollar, but moves among major currencies were relatively small. The dollar index <.DXY> fell 0.1 percent, with the euro
The Japanese yen weakened 0.04 percent versus the greenback to 111.61 per dollar, while sterling
Benchmark 10-year notes