In a recession, deciding on which stocks to hold in your portfolio can be a challenging task. You need to look for companies that sell products and services that will continue to be in demand during a recession and that also have reasonably priced shares (to minimize the chance of a large correction taking place). There are solid pot stocks that fit the above criteria. Below are two companies that look to be great investments, even if the economy isn't doing well.

1. GW Pharmaceuticals

GW Pharmaceuticals (GWPH) is on this list for a number of reasons. The company is growing at a great rate, its stock isn't far from breakeven, and its top product is a cannabidiol (CBD)-based drug that's essential for its patients, which means demand isn't likely to waiver. 

Recession sign.

Image source: Getty Images.

The U.K.-based company released its first-quarter results on May 11. Its sales of $120.6 million were nearly triple the $39.2 million in revenue that GW reported in the prior-year period. And while it reported a loss of $8 million, that was still nowhere as bad as the $50.1 million loss the company incurred the same time last year.

That's great news, because even if GW suffers a decline in revenue, its results could still look strong given how well it's been growing. Moreover, the importance of its CBD-based drug Epidiolex makes it unlikely there will be a significant decline in sales even during a recession. The drug is too vital to the health and wellness of its patients, many of whom are children with one of the two rare forms of epilepsy for which the U.S. Food and Drug Administration (FDA) has approved the drug: Dravet syndrome and Lennox-Gastaut syndrome.

When it comes to a recession, it's important to focus on investing in companies that will have unwavering demand for their products. A drug like Epidiolex is a necessity, especially for children who need the medication to help treat their seizures.

Year to date, shares of GW are up by more than 23%, while the Horizons Marijuana Life Sciences ETF (HMLSF 3.48%) is down 21% over the same period.

2. Trulieve

Trulieve Cannabis (TCNNF -1.15%) makes the list for the same reason GW does: For many of its patients, Trulieve's products are essential. If people are out of work and no longer have health insurance coverage due to the recession, medical marijuana can be a relatively cheap alternative for pain relief, especially for seniors.

 Trulieve is the dominant brand in its home state of Florida, where 53 of its 55 dispensaries operate. The next closest competitor in the market, Surterra Wellness, operates 39 dispensing locations within the state. More than one-fifth of the state's population is at least 65 years old, meaning Trulieve's in an excellent position to meet the medical marijuana needs of seniors in Florida. 

The pot producer released its first-quarter results of 2020 on May 20. Its sales of $96.1 million were more than double the $44.5 million recorded in Q1 2019. Like GW, Trulieve's experiencing strong growth. And while its growth rate may not be as strong as GW's is right now, Trulieve's stronger bottom line makes up for it, with the company reporting profits in seven straight quarters.

Year to date, Trulieve's stock is up 28%.

Which stock is the better buy?

Before deciding which of these two stocks is better, let's look at their price-to-sales ratios compared with some of their peers:

GWPH PS Ratio Chart

GWPH PS Ratio data by YCharts

GW is a bit on the expensive side, but remember, this is a company that's still experiencing significant revenue growth, which could result in that ratio declining as the year goes on. What matters here is that neither stock is trading at an obscene multiple relative to its peers.

While Trulieve may be the more tempting buy from a valuation perspective, I'd wager that GW would perform slightly better during a recession than Trulieve. But that's only because as disposable incomes start to dry up, consumers will try to cut all but the essential expenses. And a drug that treats seizures, particularly in children, is as essential as it gets. 

That's why despite a more expensive valuation (for now), GW's stock gets the edge for investors looking for a cannabis investment that's safe to hold during a recession.