2017 has been a year of ups and downs for iRobot (IRBT -0.14%) stockholders -- big ups, and even bigger downs.

iRobot hit its high-water mark for the year on July 25. That was the day iRobot reported a big earnings beat for fiscal Q2 2017, featuring an "adjusted" profit instead of the loss than Wall Street had expected. Revenue for the quarter soared 23% year over year, sending iRobot's stock up 23% as well. Yet ever since that day, iRobot stock has been on an almost uninterrupted slide -- a slide sparked by investor concerns about growing competition in the market for robotic vacuums. A slide that only ended late in November -- with the stock down 40% from its peak.

Hardly the kind of story you'd expect to read in an article about a potential "millionaire maker stock," right? Yet things may be looking up for the robotic vacuum maker.

Robot running a vacuum cleaner

iRobot stock performed well in 2017. Will investors in this robotic vacuum cleaner company "clean up" again in 2018? Image source: Getty Images.

Rise of the robot rivals

But first, a word about the risks that spooked the investors.

iRobot didn't invent the concept  of a robotic vacuum cleaner, but it certainly popularized the concept when it released the first Roomba in 2002. Since then, iRobot has grown from a company with less than $15 million in annual sales into a $770 million-a-year business -- a 51-fold increase in 15 years.

But here's the thing: As robot vacuums became better known and more popular, more companies have begun building them, creating competition for iRobot. This year, Consumer Reports published a report on its favorite robotic vacuums. Four of CR's top-10 rated robot vacuums in these rankings are Roombas -- but none of the top three robot vacuums are Roombas. Instead, iRobot got edged out by two pricier models from Samsung, and one cheaper model from Chinese company Ecovacs.

Roomba, it seems, is no longer the only game in robot town. iRobot's (admittedly lower-ranking) competition now includes robot vacuums from privately held SharkNinja (arguably the coolest-named vacuum cleaner company on the planet), Dyson, Bissell, and Hong Kong's Techtronic Industries Company (which now owns Hoover) as well. An arguably even bigger threat comes from Stanley Black & Decker (SWK), a much bigger company than iRobot, with $26 billion in market cap and $12.2 billion in annual sales.

iRobot rebounds

As iRobot's competition has grown, iRobot's share price has shrunk. Yet since hitting its low in November, iRobot stock has rebounded 17.5%. By the time trading closed for trading for 2017, iRobot stock was back trading close to $77 a share again, and sitting atop a 35% gain for the year.

Why might this be the case? Turns out some of iRobot's competitors may not be quite as fierce as they seem. They may even be paper tigers. Earlier this month, Stanley Black & Decker was forced to settle a patent dispute with iRobot, and to agree not to sell competing robot vacuums for a "certain period of time." 

Could this may be a case of "one rival down, umpteen more to go?" Maybe. But iRobot has patent infringement cases pending against several other rivals attempting to horn in on its robo-vac game, including Hoover (Techtronic) and Bissell. More legal victories may lie ahead for iRobot, leaving it free to capitalize on a market for robotic vacuums estimated to be growing at 12% annually.

Valuing iRobot

Does this make iRobot stock a buy? At a market capitalization of nearly 37 times its trailing earnings, iRobot isn't the most obvious stock pick for value investors. But there's still a case to be made that iRobot stock is undervalued, and poised to grow in price.

Consider: Although iRobot's market capitalization is $2.2 billion, $287 million of its market cap is backed by cash in the bank. With no debt to offset that cash, iRobot's enterprise value is therefore more than 10% cheaper than its market capitalization -- $1.9 billion. And at the same time as iRobot's price is arguably overstated, its "earnings" may look less than they truly are. GAAP accounting puts iRobot's trailing-12-month net profits at only $60 million, but the company's cash flow statement shows that over the past year, iRobot actually generated $81 million in real free cash flow.

The result: iRobot sports an enterprise value-to-free cash flow ratio of only 23. Admittedly, to make you a "millionaire" all on its own, you'd probably have to buy a whole lot of iRobot shares. Still, for a company that analysts believe will grow profit at twice the growth rate for the robotic vacuum market as a whole -- 25% annually over the next five years -- 23 times free cash flow actually seems like a pretty fair price to pay.