Seasoned investors know that the best way to generate long-term wealth is to invest in the best companies around and hold them for years, if not decades. While the formula is simple, it isn't always easy -- and 2022 has been a great example of why. Over the past year, the Nasdaq Composite has been mauled by the bear market, down 30% from its high reached late last year. Many individual stocks have fallen even further.

That said, there's an upside to all this doom and gloom. During periods of economic uncertainty, remarkable growth stocks sell at discount prices, providing some of the most compelling opportunities of the decade. For investors with the financial resources and mental stamina to withstand stomach-churning volatility, these can be profitable times indeed.

In fact, Wall Street is surprisingly optimistic about the prospects of a number of former high-flying stocks. Here are two examples, set to soar 60% to 127% over the coming 12 months, according to Wall Street.

A number of people sitting on a bench and smiling while looking at smartphones.

Image source: Getty Images.

1. This one hits the spot

While it isn't a household name, HubSpot (HUBS 2.96%) has upended the world of traditional marketing. Rather than chasing potential customers with annoying and intrusive advertising, the company turned the process on its head, attracting them with a combination of blog posts, social media campaigns, virtual events, and search engine optimization (SEO) in a process called inbound marketing. This became the keystone of the company's portfolio of software-as-a-service (SaaS) offerings, expanding its cloud-based services to address every facet of customer relationship management (CRM).

Despite growing both revenue and adjusted net income by 35% for the first nine months of 2022, HubSpot stock is down 59% from its highs reached late last year. This belies the company's steadily climbing customer base, which grew 24% year over year in the third quarter. Furthermore, the average revenue per customer increased by 7% as users continued to expand their relationship with HubSpot.

Even more exciting is the company's fast-growing total addressable market (TAM), which management expects to top $72 billion by 2027. When considered in the context of its full-year 2021 revenue of $1.3 billion, the company has a long and potentially lucrative road ahead. 

Of the 28 analysts who cover HubSpot, 24 rate the stock a buy or strong buy -- and not a single one recommends selling. Most analysts are pretty bullish on the company, which boasts a consensus 12-month price target that's 26% higher than the stock's current price. 

One of Wall Street's finest believes his peers are underestimating HubSpot. Wells Fargo analyst Michael Turrin has a $475 price target and an overweight (buy) rating on the shares. He believes the negativity is clearly overdone and cites HubSpot's success in expanding its market share, sustained pricing power, and increasing ability to cross-sell its products as reasons to buy. If his calculations are correct, the stock could gain 60% over the next 12 months.

2. Down but not out

You'd have to search far and wide to find someone who isn't familiar with Meta Platforms (META 2.98%) or its quartet of social media platforms. Facebook is practically ubiquitous, with nearly 3 billion users logging into the platform every month. When you include Instagram, WhatsApp, and Messenger, its monthly visitors tally soars to 3.7 billion, placing the company in a class by itself. 

The stock has fallen 67% over the past year, but the story isn't as bad as the stock price would have you believe. Marketing budgets are among the first to be cut in times of economic uncertainty, which has hammered Meta's results over the past several quarters. For the first nine months of 2022, Meta's revenue has been flat compared to last year, though its net income has tumbled 36%. 

Yet a look beyond the headline numbers shows a company that's well positioned to ride out the economic storm. Meta has $30.5 billion in net cash on its balance sheet, giving it ample reserves to tap during tough times. Furthermore, even in the midst of uncertainty, Meta has generated more than $13.1 billion in free cash flow so far this year.

Of the 57 analysts who cover Meta, 40 rate the stock as a buy or strong buy -- and only one has a sell rating -- proving you can't please all the people all the time. Most Wall Street analysts are fairly bullish on the company, which has a consensus 12-month price target that's 34% higher than where the stock price is today. 

However, Tigress Financial analyst Ivan Feinseth is clearly more optimistic than his peers on Wall Street, with a $260 price target and a strong buy rating on the shares. He cites the recent stock price pullback as a "major buying opportunity" as Meta's daily and monthly active users continue to climb. If his research is on the money, the stock could surge 127% over the coming year, which would be a boon to shareholders.