If you are looking to generate income from your stock portfolio, then the midstream energy sector should be on your watch list. It's filled with high yields and financially strong companies. You can maximize the benefit of your investment, however, by being strategic with where you put the stocks you choose to buy using a Roth IRA and a taxable account. Two good examples are ONEOK, Inc. (NYSE:OKE) and Magellan Midstream Partners, LP (NYSE:MMP). Here's what you need to know.

Just passing through

A lot of midstream companies are structured as master limited partnerships. These are pass-through entities in which profits and losses simply fall through to you, the investor, on a pro-rata basis. You have to report this information on your taxes based on a special form called a Schedule K-1 that you get each tax season. It can be complicated and you should strongly consider using a tax professional if you own partnerships.

A man looking down from a platform over an energy processing facility.

Image source: Getty Images.

That's the downside. The upside is that, as the taxpayer of the business, you get the benefit of things like depreciation, which reduces the income taxes you pay on the partnership's distributions. In fact, a lot of the payment will usually be classified as a return of capital, which isn't taxed in the year you receive it. Return of capital reduces your cost basis, increasing the capital gains you'll pay when units are sold -- the tax rates on which, for many investors, will be lower and, just as important, years in the future.   Thus, a high-yielding partnership like Magellan can increase the income you generate in a taxable account by helping you avoid current taxes.

Magellan, which yields around 5.5%, is one of the most conservative midstream partnerships. It owns pipelines, storage facilities, and terminals across the United States, most of which are fee-based assets. That means that it is, essentially, a toll taker -- volatile energy prices don't have a material impact on its ability to support its distribution.   

The distribution, meanwhile, has been increased every quarter since it came public in 2001 (18 years and counting). Over the past decade, it has increased its distribution by an annualized 10%. Although it distributes a huge amount of cash to unitholders, it has generally avoided issuing dilutive units to fund its growth and is cautious when it comes to debt. To put some numbers on that, over the past five years, the unit count has basically been unchanged. Debt-to-EBITDA, meanwhile, is a modest 3.5, toward the low end of the industry.   

MMP Financial Debt to EBITDA (TTM) Chart

MMP Financial Debt to EBITDA (TTM) data by YCharts.

Magellan's current growth plans call for spending $2.5 billion between 2018 and 2020 on growth projects that have customers lined up or where demand has clearly proven a need for expansion. It's projecting distribution growth as high as 8% a year through 2020. And it's looking to maintain a distribution coverage ratio of 1.2, which provides ample security for the payout and continued growth.   

In the Roth IRA

That said, you may have cash sitting in a Roth IRA. If that's the case, you don't want to own a limited partnership. The pass-through structure doesn't play well with tax-advantaged retirement accounts. That's where a pipeline company structured as a regular corporation, like ONEOK, comes in.

ONEOK owns domestic pipelines, storage, and processing facilities. Like Magellan, most of its assets are fee-based, shielding you from energy price volatility while allowing you to benefit from the increasing demand for energy infrastructure. The current yield is around 4.8% and is backed by a dividend that has been increased annually for 16 consecutive years. Dividend growth has averaged around 16% over the past decade.   

MMP Shares Outstanding Chart

MMP Shares Outstanding data by YCharts.

A few years ago, the company bought out all shares outstanding of its subsidiary partnership, simplifying its business. It issued shares and took on debt to get that deal done, but since then has focused on reducing its leverage. Debt-to-EBITDA fell from over 6 after the acquisition to a current level of just over 4, toward the low end of the midstream industry. Its target distribution coverage ratio is 1.2.   

ONEOK currently has plans to invest more than $4.5 billion through 2020 on growth and expansion projects. That spending is projected to back distribution growth of as much as 11% a year through 2021. And, if you put ONEOK into a Roth IRA, you can avoid taxes on that growing dividend stream since any money taken out of a Roth in retirement is tax-free (the benefit of using after-tax money to fund the account).   

Time for a deep dive

Magellan and ONEOK are both well-run midstream companies that throw off generous income streams. Either one would be a good addition to an income portfolio. However, you should be careful where you own them. Magellan, which is structured as a partnership, is better suited for a taxable account. ONEOK, a regular corporation, will best serve your income needs in a Roth IRA.

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.