The bull market has given many individuals a renewed interest in investing. The current bull run started in October 2022. Since then, the major indexes -- the S&P 500, the Nasdaq Composite, and the Dow Jones Industrial Average -- have delivered total returns of 57%, 72%, and 40%, respectively.

Historically, bull markets have lasted anywhere from months to many years, with the average bull market lasting around three years. While no one can predict how long this bull market will last, if you're investing in high-quality businesses with durable competitive advantages, you can stay invested in those stocks through multiple market cycles.

If you're hunting for top stocks to buy, here are two fantastic contenders to consider now.

1. Vertex Pharmaceuticals

Vertex Pharmaceuticals (VRTX 0.54%) has been on a winning streak lately, both as a business and as a stock. From a share price perspective, investors have enjoyed a run up of about 36% over the trailing 12 months. The healthcare company specializes in developing drugs that target various rare diseases.

It's cut its teeth in the cystic fibrosis (CF) drug market, a space in which it's now amassed the dominant industry footprint because Vertex is the only company with approved drugs that target the root genetic factors behind the disorder. These drugs are called cystic fibrosis transmembrane conductance regulator (CFTR) modulators.

In 2023, Vertex reported total revenue just under $10 billion, an 11% increase from the full year 2022. It also generated net income that was 9% higher than in the prior year, totaling $3.6 billion for the 12-month period.

There's still a lot of room for the company to run within the CF space. Last year, management updated its estimate of the number of patients living with CF in core patient markets like Europe, North America, and Australia to 92,000 lives (the prior estimate was 88,000). A notable factor behind the expansion of this addressable market opportunity is the fact that patients are living longer, and CFTR modulators are a key driver of this reality.

Vertex already has four successful CFTR modulators in its portfolio, with the most successful being its flagship therapy, Trikafta. Now, it's seeking approval for a new triple-combination CF therapy. In addition to widening the company's penetration in the existing CF market, management estimates that there could be up to 6,000 patients who had to previously stop taking its CFTR modulators who might be able to take this new treatment.

The new triple-combination therapy also addresses 31 rare CF mutations that its previous therapies have not. Another CF-focused therapy is in development with Moderna.

Beyond CF drugs, the company is busy launching the gene-editing therapy it developed with CRISPR Therapeutics, which has been approved in the U.S., the U.K., the European Union, Bahrain, and Saudi Arabia. The therapy is called Casgevy, and is the first and only gene-editing therapy based on CRISPR that has ever been approved by regulatory authorities. The therapy is designed to be a one-time functional cure for two rare blood disorders: sickle cell disease and transfusion-dependent beta thalassemia.

Beyond its new triple-combination therapy that's awaiting approval, and the ongoing launch of Casgevy, another likely candidate to join the portfolio soon is suzetrigine, a non-opioid drug for acute pain ailments. The company has been submitting regulatory filings for suzetrigine in moderate to severe acute pain, while management is also planning to start a phase 3 trial to study the drug for pain associated with diabetic peripheral neuropathy.

Vertex also boasts a pipeline of a wide range of other drugs and therapies in development, many of which are targeting rare, underserved diseases that have few desirable treatment options and/or nothing that currently addresses the underlying cause of the ailments. Over the next five to 10 years, this is a business that looks set to grow from its current place of financial strength and extend its footprint in the massive rare disease drug market. That's a value proposition long-term investors might want to jump on.

2. Okta

Okta (OKTA -0.99%) is a cloud-based identity management service that partners with thousands of client companies around the world to ensure their employees can securely access the technologies and services they need to do their jobs each day. For example, Okta enables workforces to adhere to specific identity verification requirements in order to access cloud and mobile applications, servers, mobile devices, and more.

In a digital age where remote work is increasingly becoming the norm across almost every sector of the labor market, ensuring that employees keep their workflow secure while maintaining smooth operations is more important than ever. Okta's software helps organizations of all sizes do just that, safeguarding access to mission-critical information on the necessary platforms. Developers also use Okta's products to integrate identity management into software, ensuring only authorized individuals and entities can access certain data.

Okta operates its business on a subscription model, so most of its top line is from recurring revenue. Its multi-year subscriptions and fees can vary from client to client, depending on the products used and how many users the client organization has. In the company's fiscal 2024, a whopping 97% of all revenue was recurring revenue. This lends a certain level of predictability to the business and its financial condition.

Like many software-as-a-service (SaaS) stocks, the company has some work to do on its balance sheet. However, there are some high points investors should be aware of now. In the first quarter of the company's fiscal 2025, overall revenue rose 19% year over year to $617 million. Subscription revenue totaled $603 million of that amount, up 20% from one year ago, and subscription backlog jumped 14% to $3.4 billion.

Management expects to recognize just shy of $2 billion in subscription backlog over the next 12 months. These are all metrics that bode well for future revenue growth, particularly in a tough macro environment where companies are scaling back on spending. However, most organizations can't sacrifice identity workforce solutions; these are essential parts of spending for Okta's diverse base of clients.

While the company is not profitable under generally accepted accounting principles (GAAP), it did report non-GAAP (adjusted) net income of $117 million in the quarter. Cash flow is another core profitability metric, and Okta is doing well on that front. It brought in operating cash flow of $219 million and free cash flow $214 million in the three-month period. It had about $2.3 billion in cash and investments on hand at the end of the quarter.

Shares of Okta are trading more than 30% higher than one year ago. Investors who see opportunity in this stock might want to scoop up a few shares to benefit from its growth trajectory over the long run.