Britain's decision to leave the EU, dubbed the Brexit, has shaken up markets across the world. But instead of panicking and selling everything, investors should look for buying opportunities in safer stocks with less exposure to the U.K. and Europe.

To me, those "safer" companies generate most of their business in the U.S., have wide competitive moats, and have a strong record of buybacks and dividends. The uncertainty in Europe will likely prevent the Fed from raising interest rates, clearing the way for companies to keep funding buybacks with debt. And dividends limit a stock's downside potential and provide income for riding out the volatility.

Let's take a look at two mainly domestic companies that meet those requirements -- Reynolds American (RAI) and Home Depot (HD 0.31%).

Image source: Getty Images.

Reynolds American

Reynolds American, the second-largest domestic tobacco maker after Altria (MO 0.64%), acquired Lorillard, the third-largest player, last year. Last quarter, the newly combined company controlled nearly 35% of the U.S. cigarette market with brands like Camel, Newport, Pall Mall, and Natural American Spirit.

None of Reynolds' brands matches Altria's Marlboro in popularity, but Reynolds dominates two niches -- Newport is the top menthol brand, and Vuse is the most popular e-cigarette brand. Reynolds' overseas operations are tiny, and the company has said that it has "immaterial exposure to foreign currency exchange risk."

Investing in cigarette makers might seem foolish, since U.S. smoking rates have been falling over the past five decades. However, Reynolds offsets those declines by raising prices, cutting costs, and buying back stock. Since a pack of cigarettes in the U.S. still costs much less than a pack in countries with similar smoking rates like the U.K., Reynolds still has plenty of room to raise prices.

Reynold pays a forward annual yield of 3.3% at recent stock prices, and has hiked its dividend annually for seven consecutive years. Over the past 12 months, Reynolds spent $1.7 billion on dividends and $4.5 billion on buybacks. That might seem unsustainable relative to its free cash flow of $58 million and long-term debt of $13.2 billion, but those numbers are being weighed down by its $27 billion acquisition of Lorillard. Once that overhang clears, its FCF and debt levels should return to more manageable levels.

Home Depot

Home Depot, the largest home improvement retailer in the U.S., has been posting robust sales growth thanks to rising home sales since 2011. The company also has a natural moat against online leader Amazon (AMZN -0.67%), since many home improvement items need to be tested in stores and are too heavy to ship over long distances. That's why its comparable-store sales rose 6.5% last quarter.

Image source: Home Depot.

But that doesn't mean Home Depot is ignoring online shoppers. Online sales rose 21.5% annually last quarter, and it's now one of the 10 biggest e-commerce companies in America. Most of Home Depot's stores are located in the United States, but it also owns stores in Canada and Mexico.

The weakness of the Canadian dollar slightly impacted its revenue growth last quarter, but Home Depot still raised its full-year guidance (6.3% sales growth, 4.9% comps growth, 14.8% EPS growth) solely based on "the outperformance in the United States." Moreover, sales in Mexico continue to soar, with the company hitting its 50th consecutive quarter of positive comps growth last quarter.

Home Depot currently pays a forward annual yield of 2.8%. It spent 39% of its FCF on dividends over the past 12 months, which gives it plenty of room to continue its four-year streak of annual dividend hikes. It also spent $6.8 billion on buybacks.

But mind the risks

Reynolds American and Home Depot are certainly safer plays than companies heavily exposed to the eurozone, but investors should also note their weaknesses.

Reynolds could struggle to extinguish its debt if sales suddenly fall more than expected. Rising gas prices could reduce discretionary spending on cigarettes, while new FDA regulations could cripple its fledgling e-cig business. Home Depot's growth, meanwhile, is heavily dependent on the health of the U.S. economy and the housing market. Therefore, investors should do their due diligence before assuming that either stock is an ideal way to weather the post-Brexit storm.