It isn't an easy market for investors right now. Prolonged periods of volatility along with dips near or even into bear market territory have become commonplace for investors in recent months as fears of a looming recession, geopolitical headwinds, and ongoing concerns about the global economy continue to remain front of mind. 

While it's true that share prices may remain depressed across sectors for the forseeable future, great businesses will come out on top in the end. For investors who have the capital to put to work right now, even a market like the one we're seeing presents its own share of opportunities to invest in these types of compelling companies at a bargain. 

If you have $10,000 to invest in the stock market right now, here are two fantastic companies to consider for at least a portion of that investment. 

1. AbbVie 

Healthcare stocks had quite the heyday in the early pandemic, when investors were rushing to put their cash into any and all companies in this space. Now, it seems that investor sentiment has largely returned to its previous position, viewing healthcare stocks as a somewhat boring place to put capital to work. Nothing could be further from the truth. 

AbbVie (ABBV 0.98%) is a prime example of a healthcare stock you can buy and hold for years. The company's extensive portfolio spans an impressive range of products that address health concerns from immunological disorders and blood cancers to neurological disorders and eye diseases. One of its most well-known products is the world's top-selling medication, Humira. 

As sales of Humira give way to generic competition both domestically and abroad as the drug loses U.S. patent exclusivity in 2023, AbbVie has plenty of other products to fall back on. Among them is Botox, which AbbVie welcomed into the fold when it acquired Allergan in 2020, and which brought in total net revenues of $1.4 billion in the second quarter of this year alone.

AbbVie's diverse business model has lent itself to both steady growth and profits. The company reported total net revenue of $14.6 billion in the three-month period, a 5% boost from the same quarter of the prior year, with net earnings of $928 million, a 21% year-over-year increase.  

Another significant reason for investors to consider this stock is its dividend, which currently yields just shy of 4%. Not only is AbbVie a Dividend King, but its consistent dividend and share price growth has resulted in the stock delivering a total return of 40% over the past year alone. Bear in mind, the S&P 500 has declined about 16% in that same period.  

2. Home Depot 

While Home Depot (HD 0.86%) has largely followed the trajectory of the market over the past year, you'd be remiss to overlook this solid value stock and dividend payer. The stock boasts a current yield of 2.9%, and has continued to steadily increase its dividend over the years, including in the current market environment.  In fact, Home Depot has boosted its dividend by about 40% over the past three years alone, and by more than 555% over the last decade.  

As if its juicy dividend weren't enough to get investors on board, the company's diverse business model and strong customer loyalty are also compelling reasons to consider the stock for a long-term investment.

While people may be spending less money on home improvements than they were earlier in the pandemic, particularly as many seek to tighten their belts with the current state of inflation and the economy, Home Depot remains a mainstay for a wide range of customer needs. 

In the most recent quarter, Home Depot reported its highest-ever earnings and sales to date. Sales rose 7% year over year to $43.8 billion, net earnings increased 8%, and diluted earnings per share jumped 12%.

From appliances and paint to electronics and tools, Home Depot is a go-to for everyone from individual shoppers to contractors to builders. This gives it tremendous staying power even as consumer spending habits may fluctuate in the months ahead.