Tech stocks have been on fire all year, but they recently took a beating in a recent tech sell-off.

On Friday, the NASDAQ, the largest index of publicly traded technology stocks in the U.S., shed about $100 billion. Until that point, the tech sector had been up about 17% for the year.

It’s a reminder, experts say, that tech stocks can be volatile, or subject to big swings in their share prices. That’s why it’s a good idea to diversify, and invest in a variety of industries, geographical regions, and categories of businesses. That way your portfolio won’t take as big a hit when a sector has losses.

What the tech sell-off means

Here’s a closer look at what happened last week:

Just five companies caused the big swing, according to Bloomberg. Those stocks are Apple, Microsoft, Alphabet, Amazon and Facebook.

They account for 30% of total weighting of the NASDAQ index. Over the last few days, they were responsible for 75% of the index swing, according to reports.

The biggest loser was Apple, whose stock had fallen by 6.2% percent by Monday, shedding $50 billion of value on concerns about iPhone sales. Google’s parent company Alphabet lost about 4% of its stock value, and $30 billion worth of market cap, and Microsoft lost 3%, or about $17 billion of market cap over the same time period.  

Since Monday, the NASDAQ has begun edging up again to regain some of its losses.

Nevertheless, the selloff is a sign that investors are shifting their cash around, moving into stocks that may be undervalued, such as financial and energy, some experts say.