Now that the federal government has officially shut down, investors are likely wondering how much pain is in store for the markets. The stock market's reaction to the stunning incompetence of our leaders remains relatively mild -- but for how long remains to be seen. With a shutdown in the rearview mirror and the possibility of a default on the horizon, the market's armor is showing signs of cracking. At the same time, long-term investors understand the importance of seeking advantageous buying opportunities, which is precisely why a sell-off should be fully embraced.

Just what the economy doesn't need
The recovery in the United States economy has been frustratingly slow since the 2008 financial crisis. The labor market continues to sputter along, making it difficult for the economy to grow at a satisfactory rate. Lately, though, economic data has been encouraging: U.S. household spending rose in August as incomes grew at their fastest pace in six months. However, the last thing the economy needs right now is a government shutdown. Furthermore, a default of any nature would spell certain panic for the markets.

Meanwhile, the best U.S. companies continue to do what they always do: operate financially sound businesses that reward their shareholders year in and year out. In times like these, stocks that are resistant to economic downturns are even more attractive, as their stock prices will likely decline along with the broader market while their businesses largely remain intact.

Kimberly-Clark (KMB 0.01%) is a great example of a stock that has declined along with the market but will do just fine, even in the midst of a government shutdown. Its principal products, which include Kleenex tissues, Huggies diapers, and Cottonelle toilet paper, are bought regardless of the direction of the economy. And yet Kimberly-Clark has declined about 12% from its 52-week high.

Food and beverage giant PepsiCo (PEP 0.97%) fits the profile to perfection. Its massive portfolio of products, including its namesake soda, Gatorade, Frito-Lay, and Quaker Oats, can be found in households across America. In all, Pepsi holds 22 brands that bring in at least $1 billion each in annual sales. Nonetheless, the market has punished PepsiCo by sending its shares 9% lower from the highs reached earlier this year.

At the same time, fast-food giant McDonald's (MCD 2.63%) has declined about 9% from its 2013 highs, although its business actually thrives in times of economic uncertainty. As consumers pinch pennies, they often downgrade their dining options, and that helps McDonald's. You may recall that McDonald's was one of only two stocks in the Dow Jones Industrial Average to make gains in 2008.

Even better, when markets go down, investors receive an extra treat in the form of higher dividend yields. Because prices and yields are inversely related, you can secure higher income when share prices fall. As a result, the yields on these fine stocks are even more attractive than they were just a few weeks ago. And, as interest rates remain near historical lows, high dividend yields are especially valuable when you consider the alternatives.

Consider that these three stocks not only provide compelling yields, but also operate such strong businesses that they're able to increase their dividends each and every year. Kimberly-Clark yields 3.4%, has raised its dividend for 41 years in a row, and has paid dividends for 79 consecutive years. PepsiCo, meanwhile, has increased its dividend for 41 years in a row. McDonald's is no slouch either: It recently gave investors a 5% dividend increase and has raised its payout every year since its first payout in 1976.

Thank you, Congress
While near-term paper losses are difficult to swallow, long-term investors understand the value of buying low. America's best blue-chip companies operate highly profitable businesses, and that will continue, even as the government shutdown enters its second week. Going further, should the U.S. actually default, you can be sure that the markets will decline -- but declines offer opportunities.

There are many advantages to buying stocks as their prices decline. Securing lower prices means your future returns are amplified once the market finds solid footing. Because the long-term trajectory of the market has always been up, short-term pain is a small price to pay in exchange for buying great stocks -- like Kimberly-Clark, PepsiCo, and McDonald's -- on the cheap. As a result, while it's understandable that investors would be afraid to allocate capital as markets fall, that's exactly what you should do to maximize your long-term potential return.