Wall Street climbed on Tuesday for a third straight session, buoyed by Amazon.com (AMZN.O) and Apple (AAPL.O), while investors focused on inflation data on Wednesday that could upset the market's fragile recovery - or clear the way for more gains.

Based on the latest available data, the Dow Jones Industrial Average rose 39.18 points, or 0.16 per cent, to 24,640.45, the S&P 500 gained 6.97 points, or 0.26 per cent, to 2,662.97 and the Nasdaq Composite added 31.55 points, or 0.45 per cent, to 7,013.51. 

Canada's main stock index ended slightly lower on Tuesday, weighed by the industrial and energy sectors as oil prices fell and appetite for global stocks faltered.

The Toronto Stock Exchange's S&P/TSX composite index unofficially closed down 25.41 points, or 0.17 per cent, at 15,216.47.

U.S. MARKETS

Investors said data on U.S. consumer prices and retail sales due out on Wednesday will be key to where stocks move in the short term. Inflation and interest-rate fears sparked a stock market rout after U.S. jobs data was released on Feb. 2.

Rob Haworth, a senior investment strategist at U.S. Bank Wealth Management, said the market's recovery from a negative start earlier in the session was a good sign, but that it remained too soon to predict the market's return to stability.

"We think we're going to be volatile for a few more trading days at least, as the market sorts out what's really been going on," Haworth said.

Among the biggest movers was sportswear retailer Under Armour, up more than 17.36 per cent on strong quarterly sales, and AmerisourceBergen, up 9.30 per cent after the Wall Street Journal reported Walgreens was seeking to buy out the drug distributor.

Cleveland Fed President Loretta Mester, a voting member in the central bank's rate-setting committee this year, said the recent stock market sell-off and jump in volatility will not damage the economy's overall strong prospects.

Following a slump into correction territory last week, the S&P 500 has recovered 3.2 percent in the past three session. It remains down 7.3 percent from a record high on Jan 26 and is currently priced at levels first reached in early December.

Nine of the 11 major S&P indexes rose, led by real estate , up 0.54 per cent.

Benchmark U.S. 10-year Treasury yields dipped to 2.842 per cent, shy of a four-year peak of 2.9020 per cent hit on Monday.

The CBOE Volatility Index, a widely-followed measure of short-term stock volatility and seen as a contributing factor itself to the sell-off, was last at 25.3 points, half the 50-point mark it touched last week.

Following Wall Street's recent swings, the S&P 500 is down 0.4 per cent for the year. The tech-heavy Nasdaq is up 1.6 per cent in 2018.

On a day of heavy trading in healthcare companies, Henry Schein and Patterson Companies fell 6.64 per cent and 5.19 per cent, respectively, after news of a U.S. Federal Trade Commission complaint against the dental supply firms.

Investors in those and other healthcare distributors are weighing the possible ramifications of the AmerisourceBergen deal and a report of Amazon's push into the sector.

Of the 70 per cent of the S&P 500 companies that have reported earnings, nearly 78 per cent of them topped profit expectations, according to Thomson Reuters data. That is above the 72 per cent average beat-rate in the past four quarters.

Advancing issues outnumbered declining ones on the NYSE by a 1.31-to-1 ratio; on Nasdaq, a 1.48-to-1 ratio favored advancers.

About 6.4 billion shares changed hands in U.S. exchanges on Friday, below the 8.4 billion daily average over the last 20 sessions. 

CANADIAN MARKETS

On Monday, the index posted its biggest one-day gain since July 2016, with all 10 sectors in positive territory as global stocks, oil and metals rebounded following a brutal week.

Canadian National Railway (CNR.TO) was among the biggest drags on the index, losing 1.6 per cent to $95.28. The industrials sector fell 0.3 per cent.

The energy group, which accounts for about a third of the index, retreated 0.8 per cent as U.S. crude oil prices settled down 10 cents at US$59.19 a barrel on concerns of oversupply.

In Toronto, Encana Corp (ECA.TO) declined 2 per cent to $13.40, while Imperial Oil (IMO.TO) fell 2.7 per cent to $34.40.

NuVista Energy (NVA.TO) bucked the energy trend to rise 3 per cent to $7.83 after Eight Capital and Raymond James raised their target prices.

Mining company First Quantum Minerals (FM.TO) was the biggest percentage gainer, jumping 7.7 per cent to $20.22 after Eight Capital and Raymond James raised their target prices, although Berenberg cut its target.

The Toronto Stock Exchange posted four new 52-week highs and nine lows. Volume on the TSX index was 219.33 million shares.