Stocks slumped Tuesday as the technology sector continued to lose ground, putting all three major stock market indexes in the red for the year. Shares of big tech companies like Apple and Facebook fell amid worries over slowing economic growth, trade tensions and federal regulation. Retailers also declined on weaker-than-expected financial results, while energy stocks slid along with the price of oil.

The Dow shed 551 points, or 2.2 percent, to close at 24,465. The S&P 500 lost 1.8 percent, and the tech-heavy Nasdaq fell 1.7 percent. The selloff was widespread—five stocks fell for every one that rose on the New York Stock Exchange, according to the Associated Press.

Tough times for tech

Driving the decline in tech stocks is investor concern over slowing sales growth and concern about government regulation.

Get Breaking News Delivered to Your Inbox

Apple reportedly cut production orders on its three newest iPhone models. The stock lost more than 8 percent of its value on Monday and Tuesday, bringing it into a bear market. Since Apple on August 2 became the first U.S. company worth $1 trillion, the tech giant's market value has fallen roughly $146 billion.

"As much as the companies could do no wrong when investors were positively inclined towards them, Amazon, Netflix, Facebook and Microsoft are now selling off much quicker than other stocks," said Fiona Cincotta, senior market analyst at CityIndex, in a research note.

She added, "Part of the problem is that investors no longer expect an average growth in profit. If the sales are not double digit and spectacular – as is the case in with the latest iPhone - the disappointment quickly translates into a selloff in shares."

The China problem



Investors are also focused on simmering trade tensions between Washington and Beijing after the two governments clashed at a weekend conference. The two countries have raised tariffs on billions of dollars of each other's goods in a fight over China's technology policy.

Presidents Donald Trump and Xi Jinping are due to meet this month at a gathering of the Group of 20 major economies. At the weekend meeting in Papua New Guinea, Mr. Trump's vice president, Mike Pence, criticized Beijing for intellectual property theft, forced technology transfers and unfair trading practices.

The tech sector is "amongst the most vulnerable to a further escalation of the U.S.-China trade war," Capital Economics analysts said in a note. "[W]e are sticking to our view that the equities of IT firms will be amongst the worst performers as stock markets around the world fall much further between now and the end of next year."

Because China is a supplier for many U.S. electronics companies, policy changes or general unpleasantness could ding those companies' profitability.

"Anything that's hardware related is very dependent on global supply chains, and if we see further ratcheting up of trade tensions that would be vulnerable," said David Lefkowitz, senior equity strategist at UBS.

Stocks vs. economy



The stock market slide comes amid a generally positive economy, with unemployment reaching a half-century low and inflation staying modest. That means investors should breathe easy, said UBS' Lefkowitz.

"We've actually been getting increasingly more bullish as stock prices have gone lower in this correction. Especially for long-term investors, these tend to be very good buying opportunities," he said.

-- The Associated Press and Aimee Picchi contributed to this report.