CannTrust Holdings Inc. shares soared Tuesday after the Canadian cannabis company posted a surprise quarterly profit and said it’s on track with a production goal of 50,000 kilograms of annual capacity by the third quarter.

The company’s U.S.-listed shares US:CTST CA:TRST rose 12% to bring their year-to-date gain to 33%.

Vaughan, Ontario–based CannTrust said it had net income of C$12.8 million ($9.5 million), or 12 cents a share, up from earnings of C$11.4 million, or 12 cents a share, in the same period a year ago. The FactSet consensus, based on six analyst estimates, was for a loss of 5 cents a share.

Total revenue rose 115% to C$16.9 million ($12.5 million), which was shy of the FactSet consensus of C$17.2 million.

Chief Executive Peter Aceto said the small revenue miss was partly due to the need to stockpile inventory to ensure the company can serve its rapidly growing medical-cannabis patient base, which grew 70% to 68,000 in the quarter from 58,000 at year-end. Medical cannabis accounted for C$11.4 million of total revenue, while recreational cannabis accounted for the remaining C$5.5 million.

“There were also some timing issues related to how cannabis gets harvested and moves through the supply chain,” he told MarketWatch in an interview. It takes an average of 60 days from the time of harvest for the product to be sold into the market, which means the company is well set up for second-quarter production, he said.

See:Aurora Cannabis’ stock surges ahead of third-quarter results due after the close

How to approach cannabis as an investor, not an amateur enthusiast

The company produced over 9,400 kilograms of cannabis in the quarter, up 96% from the fourth quarter. It sold more than 3,000 kilos of dried cannabis equivalent at an average net price of $5.47 a gram. The cost of sales per gram sold fell to C$3.03 from C$3.08, while the cash cost per gram sold fell to C$2.77 from C$2.94.

For more earnings news: Cannabis companies failed their first big test, now they have a second chance

The company raised $200 million via a share offering in the quarter that disappointed some investors when it was priced at a steep discount. Proceeds of the capital raise are to be used to invest in extraction equipment and technology and to automate labeling, among other uses, a bugbear for companies ever since Canada legalized cannabis last October. CannTrust’s stock started trading on the New York Stock Exchange and was included in the TSX Composite Index.

The company expanded its management team in the quarter with the addition of a new chief financial officer in Greg Guyatt, a former finance head at natural-foods company GreenSpace Brands. It also added global pharmaceuticals and biotech executive Dr. Len Walt as chief medical officer. It completed an agreement with Quebec that gives it supply agreements in all 10 Canadian provinces.

Aceto said the licensing issues in the city of Pelham, which had put a moratorium on cannabis licenses for a one-year period, have been resolved. That allowed the company to get the licensing for the final 20% of its Phase 2 expansion, and the entire 450,000 square feet of the facility has been planted.

Don’t miss:Cannabis stocks tumble; Cronos surprises with small profit

Related:How living near a marijuana dispensary affects your home’s price

The company is expecting the first harvests from the final rooms in the facility to be ready in the third quarter, which will bring it to its goal of producing 50,000 kilos of cannabis a year. The company also has all the necessary approvals for its Phase 3 expansion, which is expected to bring it to 100,000 kilos on an annualized basis in the second half of 2020.

For all of MarketWatch’s coverage of cannabis news, click here.

“We’ve chosen vendors, put down deposits and expect to begin construction shortly,” said Aceto.

CannTrust is also pursuing an outdoor strategy and purchased 81 acres of land in British Columbia for that purpose during the quarter. That facility is expected to produce about 75,000 kilograms in 2019, if the necessary regulatory approvals are secured.

The outdoor grow is expected to be lower cost — the company expects to produce cannabis for 10 cents to 15 cents a gram, well below the 70 cents to 75 cents a gram coming from its indoor facilities. That crop will be used to extract cannabinoids for oils and capsules, which are important delivery systems for medical patients.

See:Canadian retailer Alcanna says cannabis supply shortages worsened in first quarter

Aceto said the company’s top operational priorities are to scale up production capacity and increase extraction capability and advance the science and innovation and international expansion that leverage its medical relationships. The company has a partnership in Canada with generics company Apotex and a partnership in Denmark with licensed producer Stenocare. “That’s really our beachhead in the European Union,” Aceto said. “They have introduced us to a variety of partners in the EU in growing and distribution and product development.”

In Australia, which is currently building its legal medical-cannabis program, the company has partnered with Cannatrek, which has introduced it to partners in markets in Asia. It is also in talks with multiple parties in Latin America, in southeast Asia and China.

“Partnership in general is fundamental to success,” said Aceto. “We know what we’re good at, and it's not making chocolate or drinks or pet products, so we’re in active talks with multiple partners in different verticals.”

The company is talking with a leading gummy manufacturer as Canada gears up for the legalization of edibles and cannabis-infused beverages in October.

Aceto said the company’s recent equity raise, despite the disappointment over its deep-discount pricing, had the advantage of introducing the company to a set of sophisticated investors, many of which were making their investment in the cannabis space. The deal was underwritten by Bank of America Merrill Lynch, Citigroup, Credit Suisse and RBC.

“What’s most important to these investors is that the Canadian cannabis market will be worth about $8 billion by 2025, but the global market will be about $150 billion,” he said. “We have almost C$300 million on our balance sheet to execute on our strategy, which has been de-risked by the capital raise. I’m excited, and I think our shareholders should be, too.”

CannTrust shares have fallen 19% in the last 12 months. The Horizons Marijuana Life Sciences HMMJ, -1.70% has gained 14% in the same period, while the ETFMG Alternative Harvest MJ, has gained 9%.