Shares of Invitae (NVTA -91.58%) recently shot up like a rocket in response to a second-quarter earnings call that was a lot more positive than expected. The medical genetics company is still losing money, but it's starting to look like it can achieve a sustainable level of profitability.

Bringing comprehensive genetic information into mainstream medicine could make Invitae a top performer in the years ahead. Let's look a little closer at the company's performance this year to see if it's a smart stock to buy now and hold for the long run.

Why Invitae stock popped

Invitae is trying to aggregate all the world's genetic tests into a single service, an enormous endeavor that many pessimistic short sellers don't believe is possible. In their defense, the company is still a long way from profitability.

On Aug. 9, the company reported an adjusted loss of $0.68 per share during Q2 which was 10.5% better than consensus expectations.

Invitae cash balance at the end of June was up around $737 million. Thanks to some heavy cost-cutting measures, this could be enough to keep operations humming along through 2023 without any need to raise additional capital. Improved margins weren't what short sellers had expected going into the company's Q2 earnings call, but that's what the company delivered. The company reported an adjusted gross margin of 40.1% in Q2, and management expects this figure to land in a range between 42% and 43% for the full year.

According to the Q2 earnings announcement, more than one-fifth of Invitae shares available for trading were held in short positions. Traders who scrambled to cover their ill-advised short positions drove the stock more than 250% higher before markets closed on Wednesday, Aug. 10, 2022.

Investor wondering about a stock purchase.

Image source: Getty Images.

Reasons to buy now

Shares of Invitae have retreated from their post-earnings spike, and at the moment, you can buy the stock for just 2.2 times trailing sales. That's very low when you consider the company's growth expectations. The company's new CEO, Ken Knight, has promised to be more selective about chasing growth opportunities, but he still expects top-line revenue to grow by a low double-digit percentage over the next year and a half. After 2023, management expects revenue to grow at an annual rate between 15% and 25% despite winding down sales of non-core products and services.

We can reasonably expect Invitae to meet its long-term revenue expectations because support for universal genetic testing of cancer patients is stronger than ever. Earlier this month, the National Comprehensive Cancer Network (NCCN) issued new guidelines that call for extensive genetic testing of all colon cancer patients with far fewer limits based on age and family history. There's also an evidence-supported push to run comprehensive genetic testing for all cancer patients regardless of their cancer type, age, or family history.

A smart buy now?

The vast majority of new cancer drugs are designed to target specific mutations, but finding every patient likely to benefit is still an uphill challenge. Mounting clinical evidence shows governments and insurers that a small investment into genetic-testing services from Invitae can lower overall treatment expenses over the long run. The global market for genetic testing was around $15 billion in 2021, and it's expected to reach a whopping $36 billion in 2030.

Invitae has already served millions of patients, and nearly 2 million have made their data available for sharing. The fact that the company is still losing any money despite having a large share of its available market should be enough to make any investors nervous. I believe the renewed focus on profitability can bring the company to a state of positive and sustainable cash flows, but there are no guarantees here. This is a smart stock to buy right now, but only as a relatively small part of a well-diversified portfolio.