The major equity indexes were in positive territory at the closing bell for a third straight session, buoyed by Amazon and Apple, while investors focused on inflation data on Wednesday that could upset the market’s fragile recovery – or clear the way for additional gains.

Amazon rose 2 percent while Apple added 1 percent, both helping the S&P 500 shake off a negative open to the session and climb 0.26 percent by the close.

Data on 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 jobs data was released on Feb. 2.

Among the largest movers was sportswear retailer Under Armour, up more than 17.36 percent on strong quarterly sales, and AmerisourceBergen, up 9.30 percent 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 sessions. 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 percent.

10-year Treasury yields fell to 2.842 percent, shy of a four-year peak of 2.9020 percent 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 percent for the year. The tech-heavy Nasdaq is up 1.6 percent in 2018.

On a day of heavy trading in healthcare companies, Henry Schein and Patterson Companies fell 6.64 percent and 5.19 percent, 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 percent of the S&P 500 companies that have reported earnings, nearly 78 percent of them topped profit expectations, according to Thomson Reuters data. That is above the 72 percent average beat-rate in the past four quarters.

Approximately 6.4 billion shares changed hands on the major domestic equity exchanges on Friday, a number that was below the 8.4 billion share daily average over the past 20 trading sessions.