Generic drug companies are anything but generic.

Some definitely stand out from the rest. If you're looking to invest in generic drug stocks in 2017, you'll want to find the companies best positioned to succeed in a crowded market. Here's why Lannett (LCI), Mallinckrodt (MNK) and Mylan (MYL) are three of the top generic drug company stocks to buy this year.

Prescription drugs on top of glass table.

Image source: Getty Images.

Lannett: A comeback candidate

Lannett has had a rough go of it the last couple of years, with the company losing 70% of its market cap. After this huge drop, however, this generic drugmaker appears to be valued quite attractively. Lannett's shares currently trade at less than seven times expected earnings.

The 2015 acquisition of Kremers Urban Pharmaceuticals Inc. (KUPI) boosted Lannett's revenue considerably. But the deal also caused Lannett's debt load to increase. As a result, the company's earnings have suffered because of higher interest costs. However, Lannett recently paid down $75 million of the debt, a move that should lower interest expenses by around $4 million annually. 

Lannett received 12 product approvals in 2016 and expects to win seven more by the middle of 2017. These new products should help fuel growth. Lannett also hopes to have a generic insulin on the market in the next two years, which should also boost revenue considerably. 

Nearly half of Lannett's float is currently sold short, indicating a lot of pessimism about the stock. However, I think that the long-term potential for Lannett remains solid.

Mallinckrodt: Less generic, but more growth

The story for Mallinckrodt is somewhat similar to Lannett's. Mallinckrodt stock is down more than 60% over the past two years. Shares now trade at only five times forward earnings. That's dirt cheap.

Although Mallinckrodt now makes over two-thirds of its total revenue from specialty branded drugs, generic drugs are still an important part of its business. However, it is the company's specialty brands that should drive future growth.

While Mallinckrodt should continue to see growth for its enormously successful Acthar, other drugs are increasing in importance. Pain medication Ofirmev and nitric oxide vasodilator Inomax are contributing significant revenue. 

Mallinckrodt has several promising pipeline candidates that should be key to its future as well. Terlipressin is being evaluated in a late-stage study for treating type 1 hepatorenal syndrome (HRS), a life-threatening kidney failure that can occur in patients with severe liver diseases. Regenerative skin tissue Stratagraft is another important late-stage candidate. 

Mylan: Forget EpiPen, think long term

Mylan didn't experience quite as large of a decline as Lannett and Mallinckrodt, but the drugmaker's share price did fall more than 30% over the past couple of years. That drop was enough to make Mylan's valuation look quite attractive. The stock trades at just over seven times forward earnings.

Many Americans don't have a great opinion of Mylan after a controversy arose over the company's pricing of its EpiPen auto-injector. Mylan recently launched a generic version of EpiPen that should help take some of the heat off. 

Like Mallinckrodt, Mylan is shifting away from dependence on generic drugs and more to specialty branded drugs. However, the company still expects roughly 63% of 2017 revenue to stem from its generics business. Mylan continues to supply approximately 10% of generic drugs in the U.S. with its lineup of more than 635 products. The company should generate significant additional revenue over the next decade with many brand drugs losing patent protection.

Mylan is also positioned well for growth in the biosimilar market. The company has 16 biosimilars and insulin analogs in its portfolio and currently sells its biosimilar to blockbuster cancer drug Herceptin in 13 countries.

Best pick

Of these three top generic drug companies, I like Mylan the most right now. The company has a more diversified product lineup and a stronger global presence than Lannett or Mallinckrodt. I think all three of these stocks should be winners over the long run. If you could only choose one, though, my recommendation is Mylan.