U.S. stocks closed near session highs Tuesday, the first trading day of December, shaking off intraday pressure from weak manufacturing data. (Tweet This)
"We're in December rally mode right now. The calendar's certainly on our side and that's getting a lot of play," said Art Hogan, chief market strategist at Wunderlich Securities.
Over the last 10 years, the S&P 500 was up 70 percent of the time in December with an average return of 1.27 percent, according to analysis using Kensho.
Stocks rallied into the close to end up nearly 1 percent or higher. The S&P 500 topped the psychologically key level of 2,100 with health care leading all 10 sectors higher.
The Dow Jones industrial average closed up about 168 points, in positive territory for the year for the first time since Nov. 20, when it ended a touch above the flatline year-to-date. The last close solidly in positive territory for the year was on Nov. 6.
Traders noted some support for stock gains from investors positioning for the last month of the year.
First day of the month "inflows, a little weakening in the dollar and stronger oil. Those are the three factors I'm looking at today," said Peter Coleman, head trader at Convergex.
The U.S. dollar index held below 100, while the euro traded above $1.06.
Crude oil settled up 20 cents, or 48 percent, at $41.85 a barrel. WTI is on pace for its second negative year in a row for the first time since 1998.
In mid-morning trade, the major averages came off session highs after the , in contraction territory and below the expected 50.5 read. The print was the worst since June 2009 and the first time the index fell below 50 in three years.
The data hit the market "big time," said Peter Boockvar, chief market analyst at The Lindsey Group. "We're in manufacturing recession. The Fed is raising rates in a scenario we've never seen before, that scenario being a manufacturing recession. The only reason why we were up earlier was the calendar change."
"We have to start shifting the conversation to, the data's good enough to get a rate hike but not enough for a second one," he said.
Treasury yields turned lower after the ISM report and continued to hold lower, with the 10-year yield at 2.15 percent and the at 0.90 percent.
John Lonski, chief economist at Moody's, said the Fed is watching market volatility more than it lets on.
"Jobs will be important but what may be of greater importance is how financial markets react to (Friday's) employment report," he said. The drop in the 10-year yield after the ISM report indicates "the Fed will be compelled to hike with caution and inflation will be well contained."
Lonski expects Fed to hike at least in December and March but rates shouldn't top 1 percent at the end of next year.
In other economic news, construction spending rose 1.0 percent for October, topping estimates of 0.6 percent.
The U.S. Markit PMI for November was 52.8, above the flash read of 52.6 but below the final October print of 54.1.
came in at 18.19 million on an annualized basis. The pace topped 18 million for the third-straight month for the first time ever.
"If you provide the bargains, people will react to it. That's an incipient sign of consumer strength," said Ben Pace, chief investment officer at HPM Partners.
Earlier, U.S. stock index futures pointed to a slightly higher open.
"It's probably just some modest spillover effects from strength overseas overnight," said Ryan Larson, head of equity trading, U.S., at RBC Global Asset Management (U.S.).
China's official manufacturing purchasing managers index showed a slight decline in November to 49.6, while the private Caixin/Markit China manufacturing PMI contracted for the ninth straight month in November at 48.6 but more slowly than in October.
The official services sector PMI rose to 53.6, indicating China is on track with a transition to a consumption-oriented economy.
However, "only the manufacturing matters as the downside risk in the market's view remains an industrial bust," said Ilya Feygin, managing director and senior strategist at WallachBeth Capital. He said the non-manufacturing report has been range-bound and is "always ignored" as it has "signaled nothing."
The final read on euro zone manufacturing PMI for November was 52.8, up slightly from October's 52.3 print.
"I think if anything you could be seeing some modest optimism out of the ECB meeting Thursday. Expectation for stimulus almost always seems to grow ahead of a meeting," Larson said.
On Thursday, the European Central Bank (ECB) will announce its monetary policy decision.
Fed Chair Janet Yellen is scheduled to speak twice ahead of Friday's jobs report.
Chicago Fed President Charles Evans said Tuesday the Fed must forcefully communicate that U.S. interest rates will rise at a gradual pace after its initial hike. The dovish policymaker has recently pivoted to emphasizing the pace of monetary policy tightening rather than the date of the initial hike.
Fed Gov. Lael Brainard is due to speak later Tuesday on rates and monetary policy.
Investors also eyed late-morning news that five people were injured when a bomb exploded near an Istanbul metro station Tuesday, according to the district mayor.
"It certainly feels like that's adding a layer of concern to something we're worried about anyway," Hogan said.
U.S. stocks closed lower Monday, but the major U.S. averages still posted their second-straight month of gains, the first such win streak since May.
"Stocks are higher around the world today, but the consolidation phase still has a hold on most equity indices," BTIG Chief Technical Strategist Katie Stockton said in note. "The S&P futures remain range-bound on an intraday basis, but the return of oversold conditions on the 30-minute chart yesterday supports a rebound today. Once intraday resistance near 2094 is cleared (2097 for the SPX), we would expect the rally to accelerate."
Amazon.com closed up more than 2 percent after the firm said it had a record sales weekend for Amazon-made devices such as its Fire tablets, Fire TVs, and its Amazon Echo digital assistant.
The iShares MSCI Emerging Markets ETF (EEM) ended up 0.76 percent. U.S.-listed Chinese companies such as Alibaba and Baidu became part of MSCI's benchmark emerging market index as of Monday's close. Shares of Alibaba ended mildly lower, while Baidu closed down 1.77 percent.
The Dow transports closed up more than 1 percent with airlines leading all constituents except Norfolk Southern higher.
The closed up 22.22 points, or 1.07 percent, at 2,102.63, with health care leading all 10 sectors higher.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, held near 15.
About seven stocks advanced for every three decliners on the New York Stock Exchange, with an exchange volume of 867 million and a composite volume of nearly 3.7 billion in the close.
Gold futures for February delivery settled down $1.80 at $1,063.50 an ounce.
Disclosure: CNBC's parent NBCUniversal has a minority stake in Kensho.
—Reuters and CNBC's Peter Schacknow contributed to this report.
On tap this week:
6:00 p.m.: Fed Gov. Lael Brainard on rates and monetary policy
7:00 a.m.: Mortgage Applications
8:10 a.m.: Atlanta Fed President Dennis Lockhart
8:15 a.m.: ADP employment
8:30 a.m.: Productivity and costs
10:30 a.m.: Oil Inventories
12:25 p.m.: Fed Chair Janet Yellen at Economic Club of Washington
2:00 p.m.: Beige book
3:40 pm: San Francisco Fed President John Williams on outlook
7:30 a.m.: Challenger Job-Cut Report
7:45 a.m.: ECB rate decision
8:30 a.m.: ECB President Mario Draghi news briefing
8:30 a.m.: Cleveland Fed President Loretta Mester
8:30 a.m.: Initial claims
9:45 a.m.: Services PMI
10:00 a.m.: Fed Chair Yellen at Joint Economic Committee on economic outlook
10:00 a.m.: ISM nonmanufacturing
10:00 a.m.: Factory orders
1:10 p.m.: Fed Vice Chair Stanley Fischer on financial stability and shadow banks
OPEC meets in Vienna
8:30 a.m.: Employment report
8:30 a.m.: International trade
10:15 a.m.: Philadelphia Fed President Patrick Harker welcoming remarks at policy forum
11:45 a.m.: ECB President Draghi at Economic Club of NY
3:45 p.m.: St. Louis Fed President James Bullard on policy challenges
4:10 p.m.: Minneapolis Fed President Narayana Kocherlakota on policy renormalization
*Planner subject to change.
More From CNBC.com: