With the market taking a turn into bearish territory, many stocks now look a lot cheaper than they did earlier this year, but narrowing in on quality companies has become even more important for investors. To that end, we put together a panel of three Motley Fool contributors and asked each to spotlight a top mid-cap stock that's worth buying in today's volatile market. Read on to see why they picked Horizon Pharma (NASDAQ:HZNP), Trex (NYSE:TREX), and Hanesbrands (NYSE:HBI).

A hand points to a holographic stock chart.

Image source: Getty Images.

A rare bright spot

George Budwell (Horizon Pharma): The fourth quarter has been an unmitigated disaster for biotech and biopharma stocks. The never-ending political turmoil surrounding the Trump administration and the Federal Reserve's decision to hike interest rates next year have flat-out quashed investors' collective appetite for risky equities like biotechs.

The orphan-drug maker Horizon Pharma, however, has managed to hold serve during this widespread downturn, and for good reason. In a nutshell, Horizon has built out a high-growth orphan-drug portfolio over the past three years, which has recently started to fire on all cylinders. In the third quarter, for instance, the company easily exceeded Wall Street's consensus revenue estimate, thanks to stronger-than-expected sales of its top orphan product, Krystexxa, which is indicated for chronic gout.

The best part of Horizon's story, though, is that this period of strong growth is only getting started. With Krystexxa and its primary-care business both on the upswing, Horizon's shares are only trading at about 2.5 times the company's projected 2019 sales. That's among the lowest price-to-sales ratios for a mid-cap company within the whole of the entire healthcare sector.

What's next for Horizon? The big-ticket item is the forthcoming late-stage readout for the company's thyroid eye disease treatment, teprotumumab. In brief, Horizon believes that teprotumumab has a good shot at eventually hauling in more than $750 million in annual sales. That kind of stately sales figure would easily transform Horizon into one of the fastest-growing names within all of biopharma.

Fortunately, investors won't have to wait much longer to learn teprotumumab's fate. The company is expected to release the drug's top-line data sometime in the second quarter of 2019. If positive, Horizon's shares should continue to perform well -- regardless of how the broader markets behave.

A home-improvement specialist for the long haul

Jeremy Bowman (Trex): Housing stocks are widely down this year. Homebuilders and even home-improvement retailers like Home Depot have slipped amid concerns about a slowing housing market, as rising interests are cooling off several years of expansion in the housing market. While that may be bad news for homebuilders who rely on new home construction for their business, there's one corner of the housing market that has thus far been unaffected by the slowdown.

Trex, the leading maker of composite decking and railing, has continued to put up solid growth in the face of a slowing housing market, and management sees that momentum continuing into next year. In its third-quarter earnings report, revenue increased 19%, and adjusted gross margin was up 400 basis points to 40.4%. Adjusted earnings per share jumped 68% to $0.57.

The stock is down more than a third from recent highs, but management continues to see strong growth ahead. CEO James Cline said, "Consumer confidence levels remain high and the repair and remodel sector continues to trend favorably."

Management also sees growth continuing into 2019, as it expects the transition from wood to composite decking to accelerate, and CFO Bryan Fairbanks noted a "high level of optimism" among its dealers heading into the new year.

As the leader in wood-alternative decking, Trex is also benefiting from the long-term trend away from wood decking and to longer-lasting, more environmentally sustainable composite materials. While a housing decline could present a setback to Trex, that possibility already seems baked into the stock, as it trades at a modest P/E of 25, only slightly higher than the market average. Given the company's continuing momentum and long-term potential, now looks like a good time to take advantage of the recent sell-off.

This clothing stock trades at clearance prices

Keith Noonan (Hanesbrands): Hanesbrands stock has seen its sticker price slashed more than 40% this year, owing to slowdown for the business's socks and underwear segment, moves by Target and other retail partners to focus more on their own in-house clothing brands, and a more bearish backdrop for the broader market. The clothing company has a market cap of roughly $4.2 billion after its challenging 2018 run, and shares are now valued at just 6.7 times this year's expected earnings. I thought the stock looked cheap after a few rounds of sell-offs earlier in the year, but with shares now sporting a 5.2% dividend yield and the company's long-term prospects far from being dramatically derailed, Hanesbrands is trading at clearance-level prices.

It's true that the company faces threats from private-label brands, with retailers like Target opting to produce their own clothing lines instead of renewing contracts with Hanesbrands. However, this development, some uninspiring earnings performance, and heightened bearish sentiment for the overall market seem to have investors overlooking many of the good things happening at the company -- most notably the performance of its Champion brand. Sales for Champion clothing climbed 40% year over year on a currency-adjusted basis last quarter, and strong demand for the athleisure name is helping the company make progress with its direct-to-consumer and international expansion efforts.

I bought Hanesbrands stock at roughly $15 per share in November, and from that perspective, the big sell-offs have certainly not been thrilling. That said, I think the stock looks even more appealing trading at less than $12 a share, and I plan to continue adding to my holdings in the company.