GettyImages-83164715
Traders work on the floor of the New York Stock Exchange. Getty

This story was updated at 4:20 p.m. ET.

U.S. stocks closed lower for a second day Friday as investors assessed corporate earnings and data that show U.S. inflation barely rose in March as consumer spending remains tepid.

Friday's slide extended a steep sell-off Thursday afternoon after billionaire activist investor Carl Icahn said he had sold his entire stake in Apple, citing the risk of China's influence on the stock.

Early Friday, the Commerce Department said the personal consumption expenditures price index, excluding the volatile food and energy components, edged up 0.1 percent last month after an upwardly revised 0.2 percent increase in February.

"I think we are looking at a cautious trading day as the poor earnings season finally catches up, though oil could help smoothen some of the declines," said Peter Cardillo, chief market economist at First Standard Financial in New York.

Apple Inc. (AAPL) Stock Price | FindTheCompany

First-quarter earnings from S&P 500 components are expected to have fallen 6.1 percent from a year earlier, according to Thomson Reuters I/B/E/S. Of the 273 companies that have reported, 57 percent reported revenue above analyst expectations, compared with the long-term average of 60 percent.

At the close of trading, the Dow Jones Industrial Average was off 57 points, or 0.3 percent, at 17,774, having dropped 179 points at the low of the session. The broader S&P 500 closed down 11 points, or 0.5 percent, at 2,065. The tech-laden Nasdaq composite index was down 30 points, or 0.6 percent, at 4,775.

Apple's stock price fell 1 percent to $94.

Gilead Sciences fell 9 percent to $88 after reporting an 18 percent fall in first-quarter net profit.

Oil hit new highs earlier in the day and saw its biggest monthly gain in years as a weak dollar and falling U.S. production soothed concerns about an excess of physical oil.

Exxon Mobil Corporation (XOM) | FindTheCompany

Stock markets around the world were in the red — with the yen rallying to an 18-month high, signaling a broader risk aversion among investors — a day after the Bank of Japan's call to cap monetary stimulus rattled investors.

Oil major Chevron was down 0.2 percent at $102, while rival Exxon was up 0.5 percent at $88, after reporting results.

Shares of Amazon jumped 10 percent to $660 after the company's quarterly results blew past analysts' expectations.

LinkedIn was up 2 percent at $125 after the operator of the online network for professionals raised its 2016 revenue and profit forecast.

TiVo rose 6 percent to $10 after digital entertainment guide provider Rovi said it will buy the company in a deal valued at about $1.1 billion.

Data from Reuters were used to report this story.