Many investors are taking a close look at marijuana stocks for the first time, given their big gains in recent months. Even though the cannabis industry has been gaining momentum gradually over the past several years, key events like the imminent legalization of recreational marijuana products in Canada have drawn attention to new facets of the market that most investors largely ignored previously.

Whenever a promising new investing trend takes shape, there's always a temptation to use it to try to get rich quick. Some people have done that by putting a massive chunk of their investment capital into marijuana stocks. It's true that many aggressive investors have already seen their stakes in cannabis companies soar in value, seemingly validating that approach. Yet the risks involved in the marijuana industry warrant a more prudent approach for long-term investors. Here are a few things to think about to help you determine how much you should invest in marijuana stocks.

Cannabis in the bottle and scoop on a wood table.

Image source: Getty Images.

What can you afford to lose?

Whenever you're dealing with a speculative investment, the first thing to ask is how much you can afford to lose. As investors learned firsthand with internet-related stocks in the early 2000s, new industries are extremely competitive, and over time, the massive number of start-up companies that seek their fortunes get thinned out to just a handful of successful survivors. For every internet giant like that made it through the tech bust and thrived, hundreds of now-unknown internet companies flared out and resulted in total losses for their shareholders.

The same will inevitably be true for the cannabis industry, where thousands of small companies are vying for position to land lucrative supply contracts, implement innovative growing techniques, and find better ways to market their products to prospective customers. Plenty of tiny marijuana companies will get completely wiped out along the way, and it's even possible that some of the more prominent players in the cannabis space will suffer big losses if things don't work out as planned. If you invest more than you're comfortable losing, then you'll be vulnerable to a big financial disruption in your investing strategy from which it'll be difficult to recover.

Direct vs. indirect marijuana investing

Not everyone is taking the same approach toward investing in the marijuana industry. Some have focused squarely on relatively young companies that are directly involved in growing cannabis and production of cannabis-related products, and those stocks have been extremely volatile. Tilray (NASDAQ:TLRY) is the obvious example, with its limited float of shares having seen swings from $20 per share to $300 over just the past three months since its initial public offering. Tilray's massive moves have little to do with fundamental business performance and more to do about the shortage of attractive investment options for those seeking direct exposure to marijuana production and distribution.

Because of the supply and demand dynamics for stocks of companies that are directly involved in marijuana currently, most prudent investors should devote just a small portion of their overall investment portfolios to them. Many investors keep a core long-term portfolio of stable investments that make up 90% to 95% of their investable assets, and then take the remaining 5% to 10% and use it for more speculative investments. Obviously, that reduces the potential return, but it also ensures that even a complete loss won't devastate your financial future.

However, if you have a more holistic view of the cannabis industry, then making additional investments in companies that are only indirectly involved in marijuana can still be prudent. For instance, some have taken the approach of investing in Constellation Brands (NYSE:STZ) because of its massive investment in cannabis producer Canopy Growth (NASDAQ:CGC). Constellation stands to gain if Canopy takes off, but it also has its highly profitable beer and spirits business to offset any losses if marijuana doesn't end up being as lucrative as expected. Similarly, many have speculated about other such tie-ups and collaborations between cannabis companies and mature consumer goods giants.

Investing indirectly in marijuana through the broader set of consumer stocks that stand to benefit if the cannabis market takes off makes it possible to go well beyond the 5% to 10% allocation discussed above without necessarily being imprudent with your portfolio. Exactly how much you invest depends on your views of each company's core consumer business, but the fact that cannabis will be only a partial contributor to their performance makes them less vulnerable to the risks that small marijuana companies have to bear in full.

Be smart with marijuana stocks

It's impossible to know whether marijuana stocks have already hit their peak or have much further to run. The best way to hedge your bets while still participating in any future growth in the cannabis industry is to avoid overextending with oversized allocations to its most volatile players. That way, you'll still be able to make money if marijuana does well without worrying that you'll put yourself in real financial trouble if you make what turns out to be a poor decision.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.