Reefer Madness has gripped Wall Street.

Investors are craving marijuana stocks as Canada prepares to legalize pot next month, leading to giant gains for Canada-based companies listed on U.S. stock exchanges. Some experts are concerned that the ending will be a buzzkill.

Billions of dollars have poured into the stocks in the past few months, and investors smell green (money, not leaves) in the air as they consider the opportunities these companies might have as the marijuana market in Canada grows, along with the possibility that the U.S. and other countries could follow suit.

The value of one company, British Columbia-based Tilray, has jumped tenfold since its initial public offering just two months ago. The company had $20 million in sales in 2017, but it’s now worth considerably more than Macy’s or Hasbro. With those huge gains have come extreme swings.

Wednesday was a trip for Tilray stock: after closing at $154 the previous day, it opened at $233 a share, soared to $300, and then plunged to $151 before rallying to close at $214. Trading was halted several times because of the volatility.

For some people on Wall Street, it’s bringing back unpleasant memories.

“We just went through this eight months ago with cryptocurrencies,” says investor Ken Mahoney, CEO of New York based Mahoney Asset Management. He said the investors buying these stocks at their current prices are already betting on enormous successes, but even if legal marijuana takes off, some of the companies will fail.

It’s easy to see why investors are so optimistic. This week, Coca-Cola acknowledged it could one day offer cannabis-infused drinks. That came after reports Coke was in talks with Aurora Cannabis about drinks containing cannabidiol, or CBD, a marijuana component that isn’t psychoactive. Aurora stock, which is listed in Canada, surged.

That would be a sort of return to Coca-Cola’s roots, as the drink contained some cocaine when it was invented.

In August, Molson Coors said it will team up with Hydropothecary Corp. to sell marijuana-infused drinks, and Canopy Growth announced a $4 billion investment from Constellation Brands, the company that makes Corona beer.

The stocks jumped Tuesday when the Center for Medicinal Cannabis Research at the University of California San Diego said the government will allow it to import capsules containing cannabis compounds from Tilray so the center can study their effectiveness in treating tremors.

“The total global (cannabis) category could reach upwards of $200 billion, as suggested by Constellation Brands,” said Stifel analyst Christopher Growe.

Canopy Growth has more than doubled in value this year, and another rival trading in the U.S., Cronos Group has jumped 78 percent. KushCo Holdings has surged 36 percent and GW Pharmaceuticals, which recently received government approval for a cannabis-derived drug used to treat seizures, is up 29 percent.

Growe said the value of the 22 largest marijuana companies trading in Canada has more than doubled since Aug. 15, when the Canopy-Constellation deal was announced.

Recreational marijuana will become legal across Canada on Oct. 17, and consumable forms of the drug will be legal in 2019. Marijuana remains illegal in the U.S. at the federal level, but it’s legal for recreational use in nine states and Washington, D.C., and for medical use in 31 states, according to the National Conference of State Legislatures.

Growe noted that governments considering marijuana legalization or similar policies are likely to move very slowly. And Mahoney said if there is a bubble, larger investors will protect themselves and won’t overinvest in single companies, but smaller investors who see a chance to get rich quickly could suffer painful losses.

“The small investors always end up with the short end of the stick,” he said. “They don’t have the insight, they don’t have the experience.”

An investor who bought Tilray stock Wednesday might have agreed, as the shares fell 18 percent to finish at $176.

© The Associated Press. All rights reserved.