It may seem counterintuitive, but now is a great time to buy stocks. True, equity markets are down, and economic problems persist. However, history affirms that bull markets always follow downturns, and the current economic challenges won't last forever. That's why it's worth buying stocks while they are still down. 

No list of great companies to invest in will satisfy everyone, but Abbott Laboratories (ABT 0.44%) and Microsoft (MSFT 0.11%) are stocks worth watching. They are both leaders in their industries, boast solid growth avenues and strong moats, and have underperformed the market this year. 

If you have $5,000 to spare that isn't earmarked for emergencies, these two stocks would be a great addition to your portfolio.

ABT Chart

ABT data by YCharts

1. Abbott Laboratories

Abbott Laboratories is one of the most notable medical device companies around. It has been racking up an impressive record of innovations for decades. Although past history is no guarantee of future success, Abbott Laboratories' business remains healthy, as revenue and profits continue growing despite the headwinds it encountered earlier this year

In the second quarter, the healthcare company's revenue jumped by 10.1% year over year to $11.3 billion. Its adjusted earnings per share increased by 22.2% year over year to $1.43.

Abbott Laboratories draws its competitive edge from multiple sources. First, its products benefit from patent protection. The company boasts thousands of active patents worldwide, which help protect its innovations and grant it some pricing power.

Second, there is the power of Abbott Laboratories' brands -- one of the strongest in the medical devices industry, according to some estimates. Customers tend to gravitate toward companies that are very well-known. Abbott's strong moat ensures it can profit from the healthcare sector and invaluable and expanding industry thanks to secular tailwinds such as the world's aging population and the rising incidence of chronic illnesses such as diabetes.

That's why some of Abbott Laboratories' products have a bright future. That includes the FreeStyle Libre, a continuous glucose monitoring system that helps diabetes patients keep track of their blood glucose levels. There's also Abbott's portfolio of devices that allow physicians to care for patients suffering from heart-related issues, which are more likely to affect the elderly.

Abbott's MitraClip for mitral valve repair and its TriClip, a treatment option for tricuspid regurgitation (both allow for minimally invasive procedures), are just two of the company's products in this area. Abbott may have underperformed the market this year, but a strong moat and solid growth paths will help the healthcare leader rebound and eventually return to its market-beating ways. 

2. Microsoft

Microsoft is synonymous with computer operating systems (OS), a market in which it held a roughly 76% market share as of June. Microsoft's brand -- which is one of the most valuable in the world -- forms an integral part of its competitive advantage.

But the company also benefits from high switching costs thanks to its suite of services, which includes productivity tools that have become essential to the functioning of millions of businesses worldwide. That's one more reason it will continue to keep the bulk of its customers. Despite its dominance in computer OS, Microsoft's most important growth path is in the cloud computing industry.

It seems like a natural extension of the company's business, since cloud solutions enable businesses to be more efficient and productive.

According to some projections, the cloud computing market will register a compound annual growth rate of 15.7% through 2030. Microsoft is second only to Amazon in this space. Microsoft Azure has become a major driver behind the company's top-line growth. Microsoft's fourth quarter for its fiscal year 2022 ended on June 30. It reported revenue of $51.9 billion during this quarter, 12% higher than the year-ago period.

Microsoft Azure revenue jumped by more than triple that -- 40% year over year. The tech company's cloud business also generates juicier margins, and it is having a positive impact on earnings growth. There is no end in sight for the expansion of Microsoft's cloud business, and the company will also remain a leading computer OS provider for a long time. That makes a strong case in favor of getting in on Microsoft's stock.