It’s not just pot smokers and medical users buzzing about the benefits of marijuana.

The upstart legal cannabis industry is also gaining a following among stock investors, many of whom are excited about getting in early on the budding but speculative business.

On a recent trading day, five of the six stocks with the most trading volume at TD Ameritrade were cannabis related, according to the discount brokerage based in Omaha, Nebraska.

A confluence of factors has shifted investing in marijuana from the fringe to the mainstream, attracting the attention – and dollars – of ordinary people.

Investors are looking to profit from a new market that generated $8.5 billion in spending on legal marijuana in the U.S. last year and which is estimated to grow to $23.4 billion in 2022, according to Arcview Market Research and BDS Analytics. Illegal sales of pot accounted for 87 percent of sales in North America totaling an estimated $46.4 billion in 2016, the firm said.

"You're seeing a lot of money come in on the hype," says Richard Acosta, CEO of Inception REIT, a Beverly Hills, California, firm that provides real estate-related funding for greenhouses, warehouses and medical labs used by marijuana and cannabis companies.

Talking Tech:Does 'yes' mean 'yes?' Can you give consent to have sex to an app?

Talking Tech::Fortnite Season 6: Epic investigating issues with Xbox, in-game purchases

Talking Tech:Rejected by 'Shark Tank,' Ring doorbell founder returns as guest shark

Generating much of the recent hype is next month's nationwide legalization of adult recreational weed in Canada, a country that is home to most pot stocks U.S. investors are able to trade. Among them are medical marijuana providers Canopy Growth and Aurora Cannabis, and medical cannabis distributor Tilray.

In America, meanwhile, 31 U.S. states and the District of Columbia have legalized marijuana for medical purposes, and nine – plus D.C. – have approved it for recreational use, according to ProCon.org data.

Bigger pot?

Investors who are bullish on pot hope that other countries around the globe, including the U.S., will follow Canada's lead and further open up the market.

Tilray's initial offering of shares to the public in July – the first official pot IPO in the U.S., according to Renaissance Capital – "also gave investors a way in," says Mitchell Goldberg, president of ClientFirst Strategy, an investment advisory firm in Melville, New York. Last week, Tilray's stock went on a wild ride when the company won approval from the U.S. to import medical cannabis to America for a clinical trial.

Adding to the industry's credibility are major investments and growing interest from some of the world's biggest beverage makers. These big companies are looking to add cannabis-infused drinks to their lineups.

Corona brewer Constellation Brands said last month it was investing an additional $4 billion in Canopy Growth, increasing its stake to nearly 40 percent. And last week, Coca-Cola got Wall Street's attention when it said it was eyeing the cannabis drinks market.

"Companies like Constellation are investing real money in marijuana companies," Acosta says. "It validates that demand is there and represents a broad awakening that this is a real industry" and a potentially huge market.

But while the industry is gaining more acceptance in 2018, it still faces legal, regulatory and other hurdles, even though more than 6 of 10 Americans (64 percent) say that marijuana should be made legal, according to Gallup.

Fear of a bust

One of the factors threatening to kill the industry's buzz is the speculative nature of pot stocks.

Tilray, for example, went public at $17 a share on July 19 and climbed as high as $300 on Sept. 19 before closing at $107.88 Tuesday. Analysts compare the roller-coaster ride of Tilray and other weed stocks to the rise and fall this year of cryptocurrency bitcoin and the 1990s dot-com stock boom that ended badly.

Many investors may be jumping in because marijuana stocks are going up a lot and people fear missing out on big gains, not because they have done their homework and concluded the companies' business prospects are strong enough, analysts say.

"Short-term bubbles in any type of investment are created when people don't want to be left out," says Ryan McQueeney,associate stock strategist at Zacks Investment Research.

Despite the potential growth that lies ahead if, say, the U.S. federal government or more states legalize marijuana, plowing money into pot stocks is still viewed as a riskier bet than buying blue-chip stocks in the Dow Jones industrial average.

“This is truly a speculative, boom or bust trade but not yet an investment,” says JJ Kinahan, chief market strategist at TD Ameritrade.

Investors who remain bullish on pot see an upstart business that will benefit from mass adoption and broad legalization around the world for recreational and medicinal purposes.

Skeptics counter that marijuana is still illegal in the eyes of the U.S. and other governments and that regulatory obstacles lay ahead. It's also tough to predict, they say, which of the early movers in the pot business will be around in a few years.

Just as many of the early internet stocks, such as Pets.com, flamed out in the late 1990s, it's quite possible that today's pot companies won't survive, either.

Investment options

For now, there are plenty of options for Americans to invest in cannabis-related shares.

TD Ameritrade, for example, currently trades more than 80 exchange-listed pot stocks – most of which are Canadian-listed stocks trading in the U.S. There are also more than 200 OTC (over the counter) stocks that trade outside official exchanges. (Major U.S. stock exchanges will not list companies in businesses deemed illegal; small U.S. companies, such as iAnthus Capital Holdings, which finance cannabis cultivators and processors, and Green Thumb Industries, a provider of legal medical marijuana, are OTC stocks.)

Investors who aren't comfortable trying to pick winning marijuana stocks and prefer a more diversified investment option can put their cash in an exchange-traded fund, such as the ETFMG Alternative Harvest ETF, which provides exposure to a basket of pot-related stocks.

But if you do invest in the weed sector, brace yourself for volatility and both good and bad days, analysts say.

“The general thesis is this will be a huge market, everyone will be on pot, it will be legal everywhere and everyone will just love it. But that’s way too optimistic,” Goldberg says. "I'd hate to see someone gamble their retirement savings on the current crop of pot stocks."

And beware scammers and fraudsters making false promises of big returns in cannabis-related businesses, the Securities and Exchange Commission warned in a recent investment alert.