Only a few days ago, it looks like the beginning of a new bull market was on the way. The S&P 500 needed to climb only another 3% or so for the bulls to once again be in control. The situation looks more iffy now, however.

The momentum from earlier this year seems to have largely stalled. Are the chances of a new bull market fading? Maybe. But here are two great stocks to buy anyway.

Alphabet: Zig when others zag

Some investors seem to be assuming that the once-powerful growth story for Alphabet (GOOG 9.96%) (GOOGL 10.22%) is over. They see the popularity of OpenAI's ChatGPT. They view Microsoft's adept moves to integrate the chatbot with its Bing search engine as a huge threat to Google's dominance in the search market.

However, learning to zig when others zag can make investors a lot of money over the long run. It would be one thing if Alphabet weren't prepared to respond to the threat from ChatGPT. But the company already had its own large language model waiting in the wings. It plans to launch Bard in a matter of weeks to go alongside its Google Search.

There are admittedly some concerns that many investors have. Let's address the main ones head-on.

Is Bard ready for prime time? It's true that the Google chatbot made a mistake in answering a question during Alphabet's official launch of the new product. There will be other erroneous answers going forward. ChatGPT makes plenty of mistakes of its own, though. So will Microsoft's implementation of OpenAI's chatbot. But all of these products will improve over time. 

Some also believe that search advertising revenue will be cannibalized by the introduction of tools such as Bard. I disagree. My view is that Google will be able to effectively supplement its current search capabilities with results from its large language model. I don't think that monetization will be a big problem.

What about the threat from Microsoft? Bing is currently an also-ran in the search market. While integrating a version of ChatGPT could make it more attractive, I think many are underestimating the uphill climb that Microsoft has to dislodge Google as long as Bard provides a similar value as ChatGPT does (which I suspect will be the case.)

Perhaps the biggest issue for Alphabet is that launching Bard could increase its processing costs and make search less profitable. It remains to be seen, though, what the impact will truly be. Alphabet's initial release will use a "lightweight model version" of its large language platform called LaMDA. The company stated that this lightweight version "requires significantly less computing power." 

I predict that Google will remain the king of search and be one of the biggest and best players in artificial intelligence for years to come. I also think YouTube will continue to be a big moneymaker for the company. In addition, I expect that some of the company's other bets, notably self-driving car unit Waymo, will become significant growth drivers in the future. Alphabet stock looks like a no-brainer buy right now.

Vertex Pharmaceuticals: A winner in any market environment

Vertex Pharmaceuticals (VRTX -0.06%) is the other stock that I like if a new bull market doesn't materialize. Actually, I like Vertex if there is a new bull market as well -- this stock is a winner in any market environment.

One main reason why that's the case is that Vertex's financial fortunes don't depend on what happens with the economy. The company sells the only therapies approved to treat the underlying cause of rare genetic disease cystic fibrosis (CF). Its closest potential rival is at best years away from even having a chance of competing against Vertex.

CF will continue to be a growth market for Vertex as the company secures additional reimbursement deals and wins new regulatory approvals for its existing products. Vertex is also evaluating its most powerful CF therapy yet -- a three-drug combination featuring vanzacaftor -- in late-stage testing.

However, Vertex expects to grow beyond CF as well. The company could win regulatory approvals as early as late 2023 for exa-cel in treating sickle cell disease and transfusion-dependent beta-thalassemia. It has a nonopioid pain drug called VX-548 in late-stage testing. Both products could have megablockbuster sales potential.

Looking a little farther down the road, Vertex's pipeline includes inaxaplin, an experimental therapy targeting APOL1-mediated kidney disease, in a pivotal clinical study. CEO Reshma Kewalramani said in Vertex's fourth-quarter conference call that the drug could unlock "a multibillion-dollar market opportunity." In addition, Vertex is evaluating programs with the potential to cure type 1 diabetes in early-stage clinical testing.

Two unstoppable trends, two unstoppable leaders

I believe that AI and biotechnology are two unstoppable trends that will create fortunes over the coming years. And I believe that Alphabet and Vertex are two unstoppable leaders in these respective areas. Whether a new bull market is on the way in the near term, these two stocks should be wildly successful over the long term.