Vertex Pharmaceuticals (VRTX -1.35%) and Invitae (NVTA -33.33%) have gone in different directions this year when it comes to share price, with Vertex's stock up more than 43% so far and Invitae's shares plunging over 84%.

Looking at these two biotech stocks from a long-term perspective, is Invitae now the better buy? Or is Vertex's strong run this year likely to extend into 2023?

The case for Vertex Pharmaceuticals

Vertex Pharmaceuticals has had a record year in revenue, thanks to its cystic fibrosis (CF) treatments. The biotech company specializes in small molecule therapies to treat CF, plus a host of other diseases. 

Vertex's stock is up more than 43% this year. That's largely due to improved financials and a pipeline with huge potential, including VX-880, a diabetes therapy in early trials that could allow patients to produce their own insulin. The company also has a huge potential blockbuster in exa-cel, which has shown promise in late-stage trials to cure two rare transfusion-dependent blood disorders, sickle cell disease (SCD) and transfusion-dependent beta-thalassemia (TDT). The company is in the process of submitting approvals for exa-cel in Europe and the United States and could get a green light for the therapy as early as next year.

In the third quarter, Vertex reported revenue of $2.33 billion, up 18% year over year, and it boosted estimates for yearly revenue to between $8.8 billion and $8.9 billion, which at the midpoint would represent a 15% increase over 2021. The company has grown annual revenue by 525% over the past 10 years. The biotech also reported net income of $930.5 million and earnings per share (EPS) of $3.59, up 9.2% and 9.4%, respectively, over the same period in 2021. Most of the revenue is coming from the company's CF franchise drugs, Trikafta and Symdeko, so the potential to add to those two is what is exciting investors.

NVTA PS Ratio Chart

NVTA PS Ratio data by YCharts

The case for Invitae Corporation

Invitae is a medical genetics company that specializes in testing and diagnosis for hereditary diseases in cancer, cardiology, neurology, rare diseases, and pediatric care. Its shares are down 84% this year and the company has a long way to go to be profitable.

In the third quarter, Invitae reported revenue of $133.5 million, up 16.7% year over year, along with a net loss of $301.2 million, or a per-share loss of $1.27. The company has also consistently grown revenue, increasing annual revenue by 574.9% over just the past five years. The concern is it only has $596 million in cash and cash equivalents, so it can't afford to keep losing money for long.

Invitae said it plans to trim $326 million in spending by cutting its workforce, exiting less profitable business ventures, and focusing on fewer than a dozen countries, compared to the more than 100 it had before.

The positive news is the company's products have a huge addressable market that is underserved, according to Invitae. One report, by Data Bridge Market Research, puts the compound annual growth rate of genetic medical testing at 15.3% between 2022 and 2029, with the market reaching $44.89 billion by that time.

Based on Invitae's low price-to-sales ratio and forward price-to-sales ratios -- 1.113 and 1.159, respectively -- the business is underpriced. The question is whether the company actually reduces costs to make the stock less of a gamble.

Making a solid long-term choice

To me, while Invitae may be a better bargain at this point, there's too much risk in the stock compared to Vertex's strong growth profile. The latter company already has increased annual EPS by 766.3% over the past five years, and while some of the potential for exa-cel is priced into the stock, the rest of the company's burgeoning pipeline is not.

Invitae, on the other hand, has a plan to cut costs. Yet even if that is successful, the company doesn't have as much of a moat as other rivals like Exact Sciences and Fulgent Genetics, which are also in the medical genetic testing space and have larger market caps.