I don't buy and sell stocks very often, maybe a handful of times a year. My approach involves buying and holding, so, as Warren Buffett suggests, I can benefit from the growth of the businesses I own over time.

But there are two opportunities in the market right now (both of which I own) that I think are highly attractive in the consumer sector.

Here they are, with a look at why I'd buy them now.

A person kissing a piggy bank.

Image source: Getty Images.

1. Realty Income is a lovable tortoise

Realty Income (O -1.18%) is the largest net lease real estate investment trust (REIT), coming in with a market cap that is more than 3 times larger than its next closest peer. The company's large size gives it advantaged access to capital markets and, when paired with its investment-grade rated balance sheet, a generally low cost of capital.

That's highly important in the net lease niche because net leases are really financing transactions for the seller. Essentially, they sell the asset and then instantly sign a long-term lease that usually includes regular rent bumps. And they agree to pay most property-level operating costs. The outcome is that Realty Income gets a reliable tenant. The new tenant, meanwhile, gets to keep effective control of the property they occupy while also raising cash from the asset sale to use for things like growing its business.

The reliable rents Realty Income generates allow it to pay a lofty dividend, with the dividend yield currently at a well-above-market 5.5% or so. The dividend, meanwhile, has been increased annually for 30 consecutive years.

There are other positives, like a geographically diverse portfolio that is spread across the United States and Europe. Around 75% of rents come from retail assets, which is a highly liquid property segment. Another positive is the company's efforts to expand into new areas, like casinos, data centers, loans, and asset management. But there is one notable negative: Realty Income's size means it is a slow-growth business.

But slow and steady with a large yield means that Realty Income is a foundational passive income investment on which you can build a dividend portfolio. It allows you to layer in opportunistic investments with higher dividend growth rates but lower yields, like PepsiCo (PEP -0.90%)

2. PepsiCo is an out-of-favor Dividend King

PepsiCo is one of the largest consumer staples companies on the planet. It has material businesses in beverages (PepsiCo), salty snacks (Frito-Lay), and packaged foods (Quaker Oats). Add in the company's global distribution system and it's one of the most diversified companies in the consumer staples space. It is, and is highly likely to remain, an important partner to retailers.

The strength of PepsiCo's business is highlighted by one simple fact: It is a Dividend King. A company can't increase its dividend annually for five consecutive decades, or more, without having a strong business plan that gets executed well in good markets and bad ones. But even well-run companies go through hard times and right now PepsiCo isn't hitting on all cylinders. The stock is well off of its recent highs, pushing the dividend yield up to a historically high 3.8%.

This is an opportunity for long-term dividend investors. And it pairs nicely with Realty Income, noting that Realty Income's 10-year dividend growth rate was about 3.5%, annualized, while PepsiCo's was 7.5%. Essentially, if you buy both you are layering a faster-growing dividend atop of slow-growing, but higher-yielding, foundation.

When will PepsiCo turn things around? I don't know. But history suggests that it will. And management is already executing on its long-successful playbook, buying new brands to help PepsiCo keep pace with consumer tastes. I'm happy to wait while I collect a historically high yield from a reliable dividend payer.

Buy one or buy both: Realty Income and PepsiCo are attractive

Realty Income isn't the most exciting stock to own, but that's the point. PepsiCo is a far more interesting investment, but it comes with some near-term business risk right now. While I think either one would be a good choice on its own, together they make a great pair for income investors like me, who like reliable income streams, high yields, and contrarian opportunities.