U.S. stocks ended up on Tuesday, with each of the three major indexes posting their best one-day percentage gains in over a week, as lawmakers' comments on tax reform and the debt ceiling boosted investor optimism.
U.S. House Speaker Paul Ryan told CNN at a town hall on Monday that tax reform would be easier to pass than the failed healthcare overhaul because Republicans have built a consensus.
Separately, Senate Majority Leader Mitch McConnell said on Monday that there was "zero chance" that the United States will fail to raise the debt ceiling in September, allaying concerns that the United States is poised to default on its debt, according to media reports.
"Definitely part of today's movement is rumblings of the potential for tax reform or tax repatriation," said Eric Freedman, chief investment officer at U.S. Bank Wealth Management in Minneapolis.
"If we have more of a messy debt ceiling debate and sides become firmly entrenched, that could spell out more difficulty, both within the party and between parties."
Investors are also looking for positive hints on U.S. monetary policy from Federal Reserve Chair Janet Yellen on Friday at the annual central bankers meeting in Jackson Hole, Wyoming, though observers do not expect her to give new guidance.
Absent major news from the White House and a standstill in tensions between the United States and North Korea – two major factors that roiled the market in the past two weeks – investors flocked back to high-flying tech shares.
Gains were broad, with nearly all of the 11 major S&P sectors posting gains. Technology shares led the advance, up 1.5 percent, notching the first gain in four sessions.
The S&P 500 materials index also jumped more than 1 percent, enjoying its best day since mid-June, led by rising commodity and metals prices.
Metals prices, including copper, zinc and nickel, ended higher against a backdrop of strong results for mining firms and talk of shortages in some metals.
The Dow Jones Industrial Average rose 196.14 points, or 0.9 percent, to 21,899.89, the S&P 500 gained 24.14 points, or 0.99 percent, to 2,452.51 and the Nasdaq Composite added 84.35 points, or 1.36 percent, to 6,297.48.
At the close, 335 stocks hit new 52-week highs while 300 hit fresh 52-week lows across all U.S. exchanges, marking the first time in 10 sessions that more stocks have hit highs than lows.
Among stocks, Freeport-McMoRan Inc gained 2.31 percent on news that Indonesia expects to strike an agreement this month to allow the miner to keep operating its copper mine in Papua.
Macy's Inc rose 4.56 percent, scoring its best day in nearly seven months, after announcing restructuring and job cuts.
DSW Inc shares surged 17.46 percent after the footwear retailer reported a surprise rise in comparable sales.
Advancing issues outnumbered declining ones on the NYSE by a 2.66-to-1 ratio; on Nasdaq, a 2.40-to-1 ratio favored advancers.
About 5.24 billion shares changed hands in U.S. exchanges, below the 6.28 billion daily average over the last 20 sessions.
Canada's main stock index rose on Tuesday as higher oil prices lent support to its energy sector, while investors trimmed exposure to some of the country's big banks ahead of their earnings season next week.
Gold miners also weighed as the precious metal eased on a strengthening U.S. dollar.
The energy group climbed 0.5 percent as oil prices pushed higher, with pipeline operator Enbridge Inc adding 1.6 percent to C$50.18 and rival TransCanada up 1.1 percent to C$62.61. Major producer Suncor Energy Inc rose 0.4 percent to C$39.04.
The energy sector, which accounts for one-fifth of the index, has weighed heavily on it so far this year, having fallen almost 25 percent.
"We're seeing some negative rotation outgoing from banks, surprisingly finding some homes in the energy complex," said Sid Mokhtari, market technician and director of institutional equity research at CIBC World Markets. "Going into its earnings season investors are nervous about banks."
Toronto-Dominion Bank slipped 0.2 percent to C$64.28 and Bank of Montreal came off 0.2 percent to C$91.63. TD said its investment banking would expand in Dublin in response to uncertainty triggered by Brexit.
Mokhtari said he expects banks to dip further with uninspiring earnings, due next week, and would look to buy into the sector at that point.
The Toronto Stock Exchange's S&P/TSX composite index ended up 33.08 points, or 0.22 percent, at 14,984.96.
Eight of the index's 10 main groups were in positive territory.
Consumer discretionary stocks gained 0.8 percent overall, as Statistics Canada reported that retail sales hit a record C$48.99 billion in June and were up in six of the 11 sectors. They grew by 1.1 percent when weak auto sales and lower gasoline prices were excluded.
Fast food company Restaurant Brands International rose 2.4 percent to C$78.06 and auto parts maker Magna International Inc added 1.7 percent to C$59.36.
The materials group, which includes base and precious metal miners as well as fertilizer companies, lost 0.5 percent overall as gold prices fell.
Wheaton Precious Metals Corp was down 1.6 percent at C$23.75, and Kinross Gold Corp lost 2.4 percent to C$5.24, while fertilizer company Agrium Inc shed 1.2 percent to C$121.31 and Potash Corp of Saskatchewan fell 1 percent to C$21.59.