It should go without saying that buying into the mania involving the heavily shorted stocks of failing companies is a bad idea. Video game retailer GameStop, movie theater chain AMC, and a smorgasbord of other low-quality stocks have been caught up in epic short squeezes. Some people will make a lot of money, but many more will get burned as everything inevitably unwinds.

While most of the stocks soaring in recent days don't belong in a serious investor's portfolio, a few are genuinely solid long-term investments. It may be wise to wait until the dust settles before taking any action, but iRobot (IRBT -2.84%) and Tanger Factory Outlet Centers (SKT -1.20%) are in a different league from the stocks making the most headlines.

A man looking through binoculars.

Image source: Getty Images.

High-end robot vacuums

iRobot, the maker of the iconic Roomba vacuum, has done surprisingly well during the pandemic. Third-quarter sales soared 43% year over year, driven mostly by higher-end products priced about $500. The U.S. was a particularly strong market, with sales soaring 75%.

The performance of iRobot's pricier products should ease investors' concerns a bit about a significant risk facing the company: low-cost competition. Cheap robot vacuums are widely available from other manufacturers, but it appears that consumers are willing to pay up for iRobot's more expensive products.

Shares of iRobot have been taken for quite a ride in recent days. The stock was trading for around $80 to start the year; it very briefly topped $197 last Wednesday as it rallied along with other heavily shorted stocks. The bulk of that gain has now vanished, but the stock is still up substantially over the past month.

It might be a good idea to wait until this short-squeeze mania is over before buying shares of iRobot, given that the stock is still up big and could tumble at any time on no news whatsoever. With analysts expecting earnings per share of $3.63 this year, a stock price of $80 put the price-to-earnings ratio at about 22. The stock price as of early Friday afternoon, around $125, puts the P/E ratio at a much steeper 35.

An important caveat: Analysts expect iRobot's earnings to decline next year due to higher tariffs and slower sales growth. The stock may be more expensive than it appears if those estimates are on the mark.

Unlike GameStop or AMC, iRobot is a solid company with a legitimate growth story. Low-cost competition poses a threat, and it's impossible to predict how demand will evolve once the pandemic is over. But iRobot looks like solid long-term bet if you can snag shares for a reasonable price.

Outdoor shopping

I highlighted Tanger earlier this month as a forgotten stock that could double in 2021. Well, it's not a forgotten stock anymore. Tanger was one of the stocks that got caught up in the short squeeze, although to a lesser degree than iRobot. Tanger started the year trading around $10 per share; the stock topped $20 per share last week before losing a chunk of that gain.

Tanger is a real estate investment trust that operates a few dozen open-air outlet shopping centers. The company suspended its dividend in early 2020 in response to the pandemic in order to save cash. A REIT that doesn't pay a dividend isn't very desirable. A REIT that owns shopping centers during a pandemic isn't desirable, either.

The good news is that business has been picking back up for Tanger. Foot traffic at its shopping centers during the fourth quarter was at 90% of 2019 levels, and the company had collected more than 90% of fourth-quarter rent from its tenants by early January. The situation has improved enough that Tanger has now reinstated its dividend.

Based on the current stock price, Tanger's new dividend works out to a dividend yield of about 4.5%. As Tanger further recovers, the dividend should trend upward. Of course, there's the chance that the recovery falters as the pandemic drags on. But Tanger has $680 million of total liquidity, including $80 million of cash, to see it through to the other side.

Tanger stock may be volatile in the short term, and it's certainly somewhat risky given the uncertain future of brick-and-mortar retail. But with the dividend reinstated and traffic to its shopping centers recovering, the stock is lot less risky than it was a few months ago.