The market may be down 23% this year, but that hasn't stopped a trio of drug companies from powering onward. Vertex Pharmaceuticals, (VRTX -0.06%) Catalyst Pharmaceuticals, (CPRX 1.43%) and Corcept Therapeutics (CORT 2.66%) are all rising sharply in contrast to the market and other biopharma businesses.

So how are they doing it, and are they likely to continue outperforming? In a nutshell, all three players develop medicines to treat rare diseases like cystic fibrosis (CF), Lambert-Eaton Myasthenic Syndrome (LEMS), and Cushing's syndrome -- and all three are profitable and growing.

Let's examine why their tightly focused business models are probably sufficient to keep the good times rolling for investors, even if the bear market drags on.

^SPX Chart.

^SPX data by YCharts.

Targeting rare diseases makes for a steadier path

The biggest reason why these three businesses have been doing great recently is that their vulnerability to the prevailing economic conditions is quite limited. Take Vertex as an example. 

Out of an estimated 83,000 people with cystic fibrosis in the Western world, its medicines treat all but 30,000. Vertex's medications are the only ones approved within their class of drugs, which are called cystic fibrosis transmembrane conductor regulator (CFTR) modulators after their ability to temporarily correct the function of the CFTR protein, which is impaired in people with CF.

If patients experience symptoms that other types of treatment can't reduce -- and most do -- Vertex's drugs like Trikafta, Kalydeco, and Symdeko might be the only things that could do the trick. As a group, the company's CF therapies were worth more than $8.3 billion in trailing-12-month revenue. And once patients start taking those therapies, they're unlikely to stop -- even in a challenging economy.

The situation is much the same for Catalyst Pharmaceuticals and Corcept Therapeutics. Catalyst's drug Firdapse is the only approved medicine for Lambert-Eaton Myasthenic Syndrome in the U.S., and most of its patients stay on Firdapse once they start. Likewise, Corcept's small target market of 20,000 patients in the U.S. hasn't stopped it from growing its quarterly revenue by 94% in the last five years.

In other words, when a company is competing in niche markets that competitors might find too small to be worth approaching and where patients have few or no other options, retaining and growing market share is significantly easier than it might be elsewhere. And that's consistently good for the bottom line and share prices, too.

Why now is an attractive time to buy

In the long run, it's likely that these three businesses will continue to be good investments as a result of the lack of competition in their target markets. Beyond that, they're also each researching new indications for their already-approved medicines so that they can access an even larger group of patients and keep growth going even if they don't diversify. For instance, Catalyst is testing its Firdapse in younger patients, who presently can't get treated. Of course, they also have plenty of opportunities for diversifying into new disease areas using either wholly new or modified existing programs. 

And some of the efforts toward those ends could pay off quite soon. Corcept is working on a therapy for chemotherapy-resistant prostate cancer that's in phase 3 clinical trials. For its part, Vertex is diversifying into other rare diseases outside of CF, including via a trio of phase 3 programs aiming to treat sickle cell disease (SCD), APOL1-mediated kidney disease, and beta-thalassemia. Buying shares of these businesses now means getting exposure to the upside from those programs potentially getting approved for sale over the next few years, driving more revenue growth.

Still, it's important to recognize that while they might be a bit less risky than biotechs that don't have any medicines on the market yet, these three companies aren't a risk-free lunch. Clinical trials can go awry, and it's possible to reach the bottom of therapy markets, especially when those markets are niche. That shouldn't dissuade you from investing in them during the bear market, though. Just make sure your portfolio is adequately diversified before taking the plunge.