The S&P 500 is officially in a bull market, a reality that many investors have been hoping for since the pandemic highs and the doldrums that followed. The length of the average bull and bear markets has varied through the years. While bear markets appear about every two years and, historically speaking, tend to last about a year, the average bull market has lasted 1,011 days, a trend that has held up for nearly a century now.

Of course, these are average figures. No one can say with exact certainty what the market will or won't do next. The global economy is still heavily in flux, a reality that may impact the market's performance in the coming months.

All that being said, it's always a great time to invest in wonderful businesses, and quality companies are making themselves known in this environment. Here are two names to consider when you go stock shopping in the coming weeks.

1. Alphabet

Alphabet (GOOGL 10.22%) (GOOG 9.96%) is a mainstay for many investors' portfolios, known for its flagship business, Google. Just because a stock is well known and at a mature stage in its growth story doesn't mean that investors can't secure enviable gains from that business, provided they buy and hold for the long term.

Alphabet is certainly one of those businesses you can buy, hold, and add to again and again through the years. The company still makes most of its money from search advertising. Alphabet boasts the No. 1 search engine in the world, with Google securing a global market share of around 92% at the time of this writing.

No other business has come close to snagging that sizable of a footprint. The global search engine market is on track to generate revenue of close to $500 billion annually by the year 2031. While advertising spending has been in flux in the last few years, given the ongoing macro concerns and businesses scaling back costs, positive momentum is slowly but surely returning.

In the full-year 2023 Alphabet reported profits of $74 billion on total revenue of $307 billion. Of the total revenue of $86 billion that the company reported in the final quarter of the year, $66 billion was derived from Google Ads. YouTube ads revenue shot up 16% from the year-ago quarter to just shy of $9 billion. The company ended the quarter and year with cash and investments on its balance sheet to the tune of $111 billion.

Taking a step back, Alphabet has seen both its annual revenue and profits soar by more than 70% over the trailing five-year period. With shares up 60% over the last year, investors seem to be feeling more optimistic about the direction of the business and its role in the emerging world of artificial intelligence (AI).

Like other big tech giants, Alphabet has been weaving AI tools like generative AI into a wide range of properties, from Google Search to its cloud segment. There's still a lot for investors to like about this business, and it may be a good time to build a position or add to an existing one, as there's no reason to think this stock won't rocket higher in the years ahead.

2. Costco Wholesale

Costco Wholesale (COST 1.01%) has built a highly resilient business around its chain of warehouse locations where members can go to shop for all kinds of essential and non-essential goods in bulk at below-average prices. The cost of annual membership starts at just $60 a year.

Costco's membership-based model allows it to offset the low margins that these discounted products produce. The fact that customers can access so many wallet-friendly items in larger quantities naturally drives higher sales volume, which also has allowed the company to maintain a steady uptick in profits and revenue through the years.

Costco is such a stickler for its members-only model (non-members can access the website but not its retail stores) that it recently started cracking down on individuals who were sharing their membership cards with others. This means that members, in many cases, are now being asked to present a photo ID along with their membership card, to ensure that non-members aren't being allowed in the store.

Costco's dedication to preserving its simple but effective business model is for good reason. Not only are membership renewal rates enviably high, but a high percentage of the company's profits are derived from membership fees alone.

As of the most recent quarter, membership renewal rates were 93% in the U.S. and Canada and 91% across its global collection of stores. The company generated $1.1 billion from membership fees in the most recent quarter alone, while profits for the three months totaled $1.6 billion.

Over the trailing decade, Costco's simple business model has driven annual revenue and profits up by respective amounts of 115% and 206%. The company pays a dividend, which, while yielding around 0.6% at the time of this writing, has grown by roughly 50% in the last three years alone. If it's a steadily growing business you're looking for that can provide some dividend income to boot, Costco looks like a no-brainer choice to add to your portfolio.