The S&P 500 index has risen steadily this year with little volatility. But the broader market has now fallen two weeks in a row for the first time since May as economic uncertainties threaten to rock the boat. Two key risks Wall Street is focused on are Congress' vote to raise the federal government's debt ceiling and the looming collapse of China's second-largest property developer.

American law places a limit on how much debt the government can take on, and to increase that amount, lawmakers must vote every few years. The current limit will likely be reached in October, and if lawmakers fail to raise the debt ceiling, the government could default on its debt. Though history suggests this is an unlikely outcome, there is uncertainty weighing on the market.

Overseas, an unfolding situation with China Evergrande Group threatens to bring instability to China's market. The company can no longer afford to repay its debts of over $300 billion and investors are concerned that domino effects might cause Evergrande's debt holders to collapse, too. So far, the crisis appears contained within China, insulating U.S. stocks from the potential fallout. 

But over the long term, no crisis has ever permanently derailed the U.S. stock market. So it's worth keeping an eye out for quality stocks you can pick up at a discount if the market does enter a correction period. In the event of a sell-off, here are two stocks I'd recommend buying hand over fist.

Three friends taking a smiling selfie with a smart phone

Image source: Getty Images

The case for Facebook

Facebook (NASDAQ:FB) needs little introduction: Nearly half the planet uses its platforms each month. But the company's $1 trillion market valuation highlights just how powerful its business is.

Facebook is already the most valuable social media company in the world -- nine times larger than Snap and 20 times larger than Twitter. But now turning its ambitions toward developing a brand new medium it calls the metaverse, a virtual and augmented reality experience that could dwarf everything it has done so far.

According to CEO Mark Zuckerberg, the metaverse could become a digital society where humans can do in virtual spaces even more of the activities we do in everyday life. It could even sustain its own economy, and driving that economy could be an enormous opportunity for Facebook.

Facebook Metric

2018

2021 (Forecast)

CAGR

Revenue

$55.8 billion

$119.4 billion

28.8%

Earnings Per Share

$7.65

$14.14

22.7%

Data source: Company filings. 2021 estimates provided by Yahoo! Finance. CAGR = Compound Annual Growth Rate.

But Facebook is already growing quickly without a metaverse business, and it's a profit-generating machine. The stock trades at a reasonable price-to-earnings ratio of 25.7, while the tech-focused Nasdaq 100 index (of which Facebook is a component) carries a loftier P/E of 36.

If a stock market slide discounts Facebook further, it would definitely be worth picking up shares. Three to five years down the road, even the stock's current price could look cheap in retrospect. And beyond that, the potential for Facebook to drive the next phase of social technology could lift its business significantly higher. 

A person sitting at their home office desk using a laptop computer

Image source: Getty Images

The case for Microsoft

With a valuation of $2.25 trillion, Microsoft (NASDAQ:MSFT) is the world's second-largest public company by market cap, and that shouldn't be much of a surprise since its Windows operating system and Office 365 software are used by billions of people.

But its business-to-business segment is even more powerful -- Microsoft's Azure intelligent cloud computing platform is used by 95% of the Fortune 500 companies. Cloud computing is now the company's largest segment, generating $60 billion of revenue in its 2021 fiscal year, which ended June 30.

Its operational diversity doesn't stop there, since its Surface tablets and notebook computers and Xbox gaming platform are multibillion-dollar brands on their own. 

Microsoft Metric

Fiscal 2018

Fiscal 2021

CAGR

Revenue

$110.4 billion

$168.1 billion

15%

Earnings Per Share

$2.13

$8.05

55%

Data source: Company filings. Microsoft's fiscal year 2021 ended June 30. 

Microsoft's stock trades at a P/E multiple of 37 times, so it's more expensive than Facebook, but it's also a more diversified business. Not a single Wall Street analyst has a sell rating on it, so the smart money doesn't see any scenario that would disrupt Microsoft soon.

Moreover, analysts predict the company will generate $10.07 in earnings per share during its fiscal 2022 which would be a 25% year-over-year increase, so the stock looks like a better value measured against future earnings.

But most importantly, Microsoft is a household name that is entrenched in the lives of billions. If broad market weakness drags its share price lower, investors may want to consider buying to hold for a long time.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.