In approximately three and a half weeks, Canada will rewrite history. Following roughly nine decades of prohibition, recreational marijuana will officially go on sale in licensed dispensaries, as of Oct. 17. As Canada becomes the first industrialized country in the world to legalize adult-use pot, its cannabis companies are expected to soon be rolling in the dough. And it's this rapid increase in sales and profitability that has investors piling into pot stocks.

A number of intermediate- and long-term red flags are budding

But make no mistake about it: Investing in the marijuana industry is far from a sure thing. In fact, the number of concerns that could derail this epic rally has been growing by the day.

A person holding a cannabis leaf in the middle of a grow farm.

Image source: Getty Images.

For example, there are obvious worries about what sort of role the black market could continue to play in Canada. The federal government is attempting to drive out the illicit marijuana market by placing a low excise tax of roughly 10% on recreational weed. By comparison, alcohol taxes range from 50% to 80% in Canada, and aggregate excise, state, and local taxes on pot in California can be as high as 45%. The presumption is that an approximate 10% excise tax should allow recreational marijuana to be price-competitive with the black market.

But there are other factors here, including the fact that illicit growers don't have licensing or permitting costs, or income taxes to pay, which allow them to consistently undercut legal-channel pricing. In other words, the black market remains a major thorn in the side of legal weed.

There are also supply side concerns. Even if the black market cedes quite a bit of market share, there's a pretty good chance that cannabis growers are going to flood the market with marijuana, regardless of how demand shapes up. In Colorado, Washington, Oregon, and even California through the first couple of months since recreational sales began, we've seen a precipitous decline in the per-gram price of cannabis due to oversupply. Although economies of scale will help offset some of these declining prices for dried cannabis, growers are still set to take a hit to their margins.

Regulation could also crop up as an issue. When the green flag waves on recreational pot on Oct. 17, only dried cannabis and cannabis oils will be acceptable forms of consumption. Other alternatives, such as vaping, concentrates, edibles, and cannabis-infused beverages, are expected to be discussed next year and approved. However, there's no guarantee any agreement will be reached on this approval or when it might happen.

Meanwhile, growers like Aphria and The Green Organic Dutchman are devoting approximately 25,000 and 40,000 kilograms of production, respectively, to concentrates (for Aphria) and beverages/edibles (for Green Organic Dutchman). If the federal timeline to legalize these new forms of consumption stalls out, these pot stocks could feel the pinch.

A green chart plunging deep into the red, with stock share prices and percentages affixed in the background.

Image source: Getty Images.

Is a "Pot-com" crash coming?

There's simply no shortage of concerns. But the biggest worry of all could be the growing potential for a marijuana flash crash.

The term "flash crash" describes a stock market event whereby prices fall very fast, and often violently, in a short period of time. In recent years, the stock market has borne witness to a handful of these events, which often are the result (in some way or another) of high-frequency trading (HFT) programs being run by institutional investors or hedge funds.

Generally speaking, HFT programs work efficiently more than 99% of the time. This programmed trading is estimated by JPMorgan to account for around 90% of the volume we typically see during a normal trading day. Thus, these programs provide ample bid-and-ask liquidity for institutional and retail investors, while often making a small fortune for institutional investors and hedge funds by diving in and out of popularly traded stocks dozens, hundreds, or thousands of times per day.

However, HFT programs are designed to work within well-defined parameters. By this, I mean they'll continue to buy and sell stock as long as the trading action is "normal." The definition of normal can obviously vary by the programmer and the risk a hedge fund or institution is willing to undertake, but the rapid rise in marijuana stocks in recent weeks may very well fall outside that range.

For example, Canadian pot grower Tilray (TLRY) has redefined the word "volatility" of late. Valued in the mid-$20s in mid-August, Tilray shot up to an intraday high of $300 on Wednesday, Sept. 19, before settling the day much lower. Exceptionally high borrowing costs, along with pricey put options, make betting against Tilray virtually impossible, despite it being fundamentally overvalued.

A robot using a laptop to make stock trades, with a rising chart depicted on the laptop screen.

Image source: Getty Images.

Other marijuana stocks have seen strong gains as well, with Canopy Growth Corp., Cronos Group more than doubling in value since Aug. 14, the day before Constellation Brands announced a $3.8 billion equity stake in Canopy Growth and caused investors to once again flock into pot stocks. Marijuana stock gains and volatility are well outside the norm that most HFT programs would probably support, which is a worry.

You see, the reason flash crashes have come about in the past (for the market as a whole) is because HFT programs halted trading or shut down as a result of excess downside volatility. Since these HFT programs are responsible for providing ample liquidity, if they suddenly shut down, a downside move in pot stocks could accelerate with no buy-side support. In other words, the ingredients appear to be there for a marijuana flash crash -- or as CNBC called it, the "Pot-com crash."

Can I say with any certainty that such an event will happen to marijuana stocks? Absolutely not. In fact, trying to predict short-term events is usually foolish (with a small "f"). Nevertheless, a substantial uptick in volume in marijuana of stocks of late would suggest increased HFT activity -- and when coupled with the volatility of the pot industry, a flash crash is a growing possibility at some point in the future.