The bears are running rampant on Wall Street. But don't think for a second that the top analysts are pessimistic about the prospects for every stock. 

Actually, there's perhaps a surprising amount of optimism for certain stocks. Here are three stocks to buy in October that could soar from 47% to 84% over the next 12 months, according to Wall Street.

1. Alphabet

Of the 43 analysts surveyed by Refinitiv that cover Alphabet (GOOG -1.22%) (GOOGL -0.95%), 38 of them rate the tech stock as a buy or strong buy. None recommend selling. It's not surprising, therefore, that Wall Street's consensus 12-month price target reflects a 47% upside potential.

Alphabet's share price has fallen sharply so far this year. The stock would only have to return to its level from fourth-quarter 2021 to deliver the kind of gain that analysts project.

There's a good case to be made that Alphabet should be an even bigger winner over the longer term. The company's revenue continues to grow briskly, with Google Cloud especially enjoying strong momentum. Alphabet has multiple paths to continue growing as well, notably including its Waymo self-driving car unit.

The company could be derailed by antitrust scrutiny. However, I suspect that Alphabet will emerge relatively unscathed. Even if the company was broken up, though, my view is that the sum of the parts would be worth more than the whole.

It's also possible that Google Search revenue could be zapped if Apple decided to build its own search engine to use as a default in its iPhones and iPads. But I don't think this scenario is likely. Alphabet looks like a fantastic long-term pick right now, in my view.

2. MercadoLibre

Analysts are even more bullish about MercadoLibre (MELI 1.09%). The average 12-month price target for the Latin American e-commerce and fintech stock is 58% above its current share price.

MercadoLibre has lost roughly half of its market cap over the last year. It's not because the company's business is struggling, though. MercadoLibre's net revenue soared 56.5% year over year in the second quarter on a constant-currency basis.

The company is truly only scratching the surface of its opportunity in Latin America. Morgan Stanley (NYSE: MS) projects that the e-commerce penetration rate in the region will jump from 11% this year to 16% by 2025. MercadoLibre's potential market in fintech is also huge, with a large number of people in Latin America without access to traditional banking services.

An economic downturn could hamper MercadoLibre's growth over the near term. Over the long term, though, this is a top growth stock to buy that should deliver tremendous returns.

3. MongoDB

The "mongo" in MongoDB's (MDB -2.40%) name is short for "humongous." And that's a good word to describe Wall Street's view of the stock's prospects. The consensus analysts' 12-month price target for MongoDB represents an 84% increase from the current share price.

MongoDB has been hit even harder than Alphabet and MercadoLibre have over the past year. Its shares have plunged nearly 70% from the record high set in the fourth quarter of 2021.

However, MongoDB's business is booming. The company reported year-over-year revenue growth of 53% in Q2. CEO Dev Ittycheria told analysts in the quarterly conference call that MongoDB isn't seeing any slowdown in deal activity. 

The one fly in the ointment for MongoDB is that it remains unprofitable with its losses worsening. MongoDB's costs are high and climbing across the board. I'm not too concerned about this issue, though. My view is that MongoDB has a good path to profitability over time. This beaten-down stock should rebound in a humongous way -- just as Wall Street expects.