The Dow Jones industrial average rose approximately 130 points, with IBM contributing the most gains. The S&P 500 gained about 0.65 percent, with information technology and consumer discretionary rising 1 percent to lead advancers. The Nasdaq composite outperformed, trading about 0.9 percent higher.
Quincy Krosby, market strategist at Prudential Financial, said the market received a boost from a number of economic data releases. "There's a premium on data at this time because the data recently has been slipping," she said. "The cumulative data we've gotten today indicate the economy is not slipping further."
The Consumer Confidence Index hit 104.1 in September, The Conference Board said on Tuesday. Economists expected the Consumer Confidence Index to hit 99.0 in September, down from August's revised reading of 101.8, according to Thomson Reuters consensus estimate. The read was also the highest since the recession.
Meanwhile, the S&P CoreLogic Case-Shiller 20-City Composite index rose 5.0 percent year over year, slightly below the expected 5.1 percent increase. The September Markit Flash U.S. Services PMI was also released, showing expansion. Meanwhile, the Richmond Federal Reserve Manufacturing index for September showed a read of -8.
"The rally we're seeing here is a bit of a head fake," said Christian Magoon, CEO of Amplify Investments. "I think there's a bit of relief that he was deadlocked and she had a solid performance."
"It looks like Hillary Clinton earned the market's vote today," said James Abate, chief investment officer at Centre Funds. He added "there is a basic assumption that Hillary Clinton is going to be good for the status quo."
Investors also kept an eye on oil prices, as U.S. crude futures fell 2.74 percent to settle at $44.67 per barrel as hopes for an output-limiting deal during an oil producer meeting in Algeria faded. On Monday, WTI rose more than 3 percent.
"As we've seen so often in the past, the possibility of a deal has been talked up a lot in the weeks leading up to tomorrow's meeting and now it seems the opposite is happening," said Craig Erlam, senior market analyst at Oanda, in a note.
U.S. futures rose sharply overnight, with Dow futures having risen more than 100 points shortly after the presidential debate concluded. But by Tuesday morning, however, futures had pared most gains and dipped into negative territory. The Mexican peso also rose sharply overnight against the dollar and was last trading 2.4 percent higher versus the greenback.
"The jury is still out on who won last night," said Adam Sarhan, CEO at Sarhan Capital. He said that, even though a number of experts said Clinton won, there were a number of polls showing Trump won. "I don't think last night hit the nail in the head for either candidate."
"The election in November is one of the biggest risk events facing the markets this year and the way markets responded to the first debate makes it clear which outcome is more favourable. Clinton appeared to edge the first debate which has provided a lift for investors, albeit only a slight one as the polls remain extremely close and the campaign has a long way to go," said Oanda's Erlam.
The second of three debates between Trump and Clinton will be held October 9.
"The Presidential Election will now recede into the background until the next debate on October 9. If one candidate definitively pushes his or her nose in front of the other in the polls, then the market may exhibit little reaction to the race for the White House prior to November 8," said Jeremy Klein, chief market strategist at FBN Securities.
Stocks closed sharply lower on Monday ahead of the debate, despite strong gains in oil prices.
"The market is desperately looking for two things: clarity and a bullish catalyst. Until we get one of those, I expect this sloppy trading to continue," said Sarhan.
Also on market watchers' radars was Deutsche Bank, which saw its shares hit a fresh all-time low on Tuesday, weighing on European equities. The pan-European Stoxx 600 index traded lower for most of the European session before closing 0.06 percent higher.
Deustche Bank shares in past 6 months
"I think that's a sign telling us there could be contagion in European markets," said Amplify's Magoon. " I just don't think you can have a major bank basically in a crash situation. but the market seems to be ignoring it for now."
Deutsche's U.S.-listed shares plunged more than 7 percent Monday after German Chancellor Angela Merkel said the German government would not help the bank with its U.S. legal troubles.
"As a former Lehman trader, I can tell you we've seen this show before," said Larry McDonald, managing director at ACG Analytics, in a note. "Sure there's not a US vs EU bank direct comparison, but it looks like $25B+ is in need for DB asap, and it looks like public markets don't have that kind of appetite for that right now, neither do German politicians heading into elections."
Meanwhile, Federal Reserve Vice Chairman Stanley Fischer spoke Tuesday, but did not address monetary policy.
U.S. Treasurys rose, with the two-year note yield trading at 0.75 percent and the 10-year yield at 1.56 percent. The Treasury Department sold $34 billion in five-year notes, in an auction that saw about-average demand. The dollar rose against a basket of currencies, with the euro near $1.122 and the yen at 100.35.
The gained 13.83 points, or 0.64 percent, to end at 2,159.93, with consumer discretionary leading eight sectors higher and utilities lagging.
The Nasdaq advanced 48.22 points, or 0.92 percent, to close at 5,305.71.
About four stocks advanced for every three decliners at the New York Stock Exchange, with an exchange volume of 832.17 million and a composite volume of 3.321 billion at the close.
The CBOE Volatility Index (VIX), widely considered the best gauge of fear in the market, traded near 13.1.
Gold futures for December delivery settled $13.70 lower at $1,330.40 per ounce.
On tap this week:
*Planner subject to change.
Earnings: Nike, Cintas
8:30 a.m. Durable goods
8:45 a.m. Minneapolis Fed's Kashkari
10 a.m. Fed Chair Janet Yellen testifies on supervision and regulation, House Financial Services Committee
10:15 a.m. St. Louis Fed President James Bullard
1 p.m. $28 billion 7-year note auction
1:30 p.m. Chicago Fed President Charles Evans
4:35 p.m. Cleveland Fed President Loretta Mester
7:15 p.m. Kansas City Fed President Esther George
5 a.m. Philadelphia Fed President Patrick Harker
8:30 a.m. Initial claims
8:30 a.m. GDP Q2 (third read)
8:30 a.m. International trade (Aug adv)
8:50 a.m. Atlanta Fed President Dennis Lockhart
10 a.m. Fed Gov. Jerome Powell
10 a.m. Pending home sales
2:30 p.m. Minneapolis Fed's Kashkari
4 p.m. Fed Chair Yellen speaks via videoconference with a forum for minority bankers, Kansas City Fed
Earnings: McCormick, The Container Store
8:30 a.m. Personal income/spending
9:45 a.m. Chicago PMI
10 a.m. Consumer sentiment