What happened

Shares of iRobot (IRBT 0.58%) gained 58.6% in 2020, according to data provided by S&P Global Market Intelligence. But all the gains were essentially realized during just a three-month span: April through June. Over the past six months, the stock has traded sideways. Here's why it was a winner during that short period, and why it's been losing to the market the rest of the time.

So what

iRobot makes autonomous floor-cleaning robots like the Roomba and Braava, and sales went crazy in the second quarter of 2020. Revenue came in at $280 million, which was only up 8% year over year. But the company had expected sales of less than $193 million. This substantial surprise provided fuel to send the stock higher.

A person studies upward and downward movements on various charts.

Image source: Getty Images.

Some might point out that iRobot stock was rising prior to its second-quarter business update on June 15. But stimulus checks in the U.S. were sent out in April, and many consumer-discretionary companies like iRobot had already noticed a meaningful uptick in business. It was reasonable to assume iRobot would similarly benefit from this sudden influx of consumer cash. Furthermore, it was trading in value-stock territory after the market crash, at less than 20 times trailing earnings, giving investors more incentive to pick up some shares.

However, the three-month surge hasn't been the norm. Investors appear to remain skeptical about the company's long-term ability to grow sales with increasing competition. Additionally, the company benefited by having its products excluded from trade-war tariffs in 2020, but that expense could resume now in 2021. These factors seem to be keeping the stock down for now, despite strong ongoing sales growth.

IRBT Chart

IRBT data by YCharts.

Now what

While these concerns are valid, I think many investors are missing the big picture with iRobot. The company is focused on growing its direct-to-consumer business, and it made good progress in 2020. These sales can be more profitable. That said, its profit is already pretty good: over $133 million through the first three quarters of 2020, which isn't bad for a small-cap company.

Furthermore, the company recently launched iRobot Genius Home Intelligence. This new software will distinguish its products from its competitors' due to its greater personalization; robots can be programmed better to clean when and where you want them. Moreover, this software will improve its direct relationship with customers, which could have positive long-term effects.