Cable stocks have faced negative headwinds for a number of years. Cord-cutting has slowly started to build, with the industry losing more subscribers each year.

That's a phenomenon that's not likely to slow down anytime soon, and it's hard to know whether a bottom exists for the industry. Despite those problems, cable stocks are still a buy -- albeit not always because of the pay-television business.

Comcast (CMCSA 1.25%), Charter Communications (CHTR -1.74%), and Frontier Communications (FTR) all make sense in your portfolio, albeit for different reasons. It's not that any of these companies have found a magic way to stop people from dropping cable in favor of streaming services, but they have found ways to do well despite losing video subscribers.

The cable industry faces issues, but some stocks are still a buy. Image source: Getty Images.

Why should you buy Charter Communications?

When Charter completed its deal to acquire Bright House Networks and Time Warner Cable, it became one of the pay television and internet industries' big three, along with Comcast and AT&T. Unlike those two companies, Charter doesn't have significant interests outside its subscription cable, internet, and voice business.

That situation in some ways creates more risk for the company, as it lacks Comcast's ability to make money owning content and it doesn't have AT&T's wireless business to package alongside its other products. Still, the company has been able to offset its losses in video subscribers (an industrywide problem) with gains in internet and voice. So far, through three quarters of 2016, in its residential business the company has lost 175,000 video customers, while gaining 1.1 million internet subscribers and 1.26 million voice users.

In addition -- when adding in business relationships -- the company has added about 500,000 customers since the start of 2016. It's also important that while Charter has lost video subscribers, it has managed to inch up its average revenue per user (ARPU) on the residential side from $109.53 in Q1 2015 to $111.25 in Q3 2016. One the business end, the trend has been moving in the other direction, from $179.74 at the beginning of 2015 to $167.64 in the most recent quarter.

Since residential makes up most of the company's business, these numbers are encouraging. Charter will continue to lose video subscribers, as will the whole industry, and it's reasonable to think its voice additions will slow down at some point, but it should continue to add internet customers at a furious pace.

Charter's residential ARPU numbers show that it can manage the video declines while still growing its business. That makes it an attractive buy even if you believe the pay-television business has a lot more decline ahead of it.

Why is Comcast a good buy?

It's not even really fair to call Comcast a cable stock. The company closed Q3 with the second most pay-television subscribers of any company, behind the combination of AT&T's U-Verse and DirecTV, but unlike Charter or Frontier, it owns well more than just a subscription business. Comcast has 22.4 million cable customers (it added 32,000 in Q3, making it unique among cable providers for gaining), and it gained 329,000 broadband customers in the quarter. The company, however, also owns NBC, a host of cable networks (MSNBC, USA, Bravo, E!, a number of regional sports networks, Golf Channel, Oxygen, and more), Universal Studios, and the Universal Studios theme parks.

Comcast is a good buy for the same reasons as Charter -- it's done better when it comes to video, being slightly up for the year, and it has similar gains in broadband. On top of that, Comcast has leverage when it comes to cord-cutting. Even if people leave its cable service and for some reason drop its internet offering, the company still has channels and content people want.

That makes it very hard for consumers to escape the company's reach. Even if you decide to sever your business relationship with the company as a subscriber, it's likely that many customers will still want to watch programming the company owns. Whether that be animated movies from Universal (such as Minions or The Secret Life of Pets), cable fare from Comcast's various networks, sports from NBC, or Universal movie franchises (including Jurassic Park and Fast and the Furious), it's simply hard to avoid being a Comcast customer.

This is a company consumers can't easily leave even if they want to. That makes it very resistant to cord-cutting, or any other changes in the cable market. Comcast may see its revenue sources shift, but it should still be able to find ways to make money, given the diversity of its assets.

Why is Frontier a good buy?

Unlike the other two players on this list, Frontier hasn't been growing. In fact, since it spent $10.54 billion buying Verizon's wireline business in California, Texas, and Florida (CTF), it hasn't even shown that it can hold on to the customers it paid for. In the two full quarters since the company completed the CTF deal, it has slowly lost subscribers, not just in pay-television like most of the industry, but also in broadband.

That's bad news, but CEO Dan McCarthy has done an excellent job balancing those losses by controlling expenses. Frontier now expects to have an annual cost savings of $1.4 billion, up from the $1.25 billion target outlined in the second-quarter earnings report. That shows strong management, and it makes the company very attractive as an acquisition target.

In fact, since Altice purchased Cablevision, Frontier may be the most attractive independent company available. So it's reasonable to think it could sell for more than the 22% premium Cabelvision shareholders got.

Frontier hasn't said it's pursuing an acquisition strategy, but on its own it remains a little fish in a big pond. It's very likely the company will continue to carefully manage expenses while trying to preserve (or even grow) its user base until the right offer comes along, which should happen -- maybe not soon, but eventually.