If you look back in the archives of this here tire fire blog, you’ll see at least one oil company I invested in. No, I’m not linking to it. You’ll have to at least do a little searching to throw this fact back in my face.

This investment did not work out, to say the least. I lost well over 50% of my money before pulling the plug. The company needed to sell assets to pare down debt, yet the price of oil kept on sliding. It didn’t look like there would be much of a market for these assets in a world where oil was $40 a barrel. So I sold and put my capital to work somewhere else.

You might mock me for selling at the bottom (in fact, at least one person did), but in hindsight it didn’t turn out to be such a bad decision. The stock hasn’t done much of anything in the three years since I sold it. I don’t remember where I invested the money, but at least it had potential to go up.

Even after punting that terrible oil stock from my portfolio, it still took me the better part of a couple of years before I swore off the sector completely. There are a couple of reasons why I will no longer invest in a straight oil producer.

Related: Why I no longer invest in retail stocks

First, it’s a commodity business. The best operators in the business can’t control the price of crude. They can only keep their costs down, which is always a tricky thing to do. And secondly, as we’ve seen lately, even an improving oil market still doesn’t mean these stocks head higher.

Baytex Energy (TSX:BTE) trades at $2.66 as I write this. Oil is just under $70 a barrel. Shares were above $5 each for most of June-December 2016, when oil languished at below $50 a barrel.

Why does this happen? It’s like Bitcoin. Nobody really understands.

The way I invest in oil

Aw come on. You just contradicted like the first four paragraphs of this thing. You sicken me. 

Geez, Italics Man, you need to relax. You of all people should know there’d be a twist.

If I was a real person I’d travel to Africa and get Ebola just to give it to you.

Wow. That’s some solid commitment there.

The good news is you don’t have to avoid oil forever. You can invest in the part of the oil sector with obvious moats, pricing power, and a (relative) lack of exposure to the price of the commodity.

Ready?

Just put your cash to work in Canada’s pipelines. Hot damn are they great businesses.

I own some of Enbridge (both common and preferred shares), TransCanada (in my wife’s account), and Inter Pipeline. All three of these companies just collect a fee on crude that sloshes through their pipelines. This fee is likely to go up, too, since it’s pretty much impossible to build new pipelines anywhere that isn’t Alberta and Saskatchewan. That oil has to get to market somehow.

The pipeline stocks are loosely connected to the price of crude oil, but not really. Investors are far more concerned about long-term interest rates, since these companies borrow a lot of money to fund expansion products. This is why shares of all three of these companies are flirting with 52-week lows.

Oh, and they pay fantastic dividends, too. Enbridge’s yield is 6.4%. TransCanada pays 5.4%. And Inter Pipeline’s dividend is best of all, paying 7.7%. In total, my investment in these three companies pays me almost $900 a year in passive income. That’s enough to fund my only wearing socks once and then throwing them out forever habit.

Let’s wrap it up

To summarize:

Oil = bad
Adding value to oil = good

That’s all you need to know about investing in oil. This means that if you do feel the need to invest in an oil producer then pick one like Suncor which makes a bunch of money refining and then selling its oil at gas stations. Otherwise avoid the sector like I avoid taking a shower.

Tell everyone, yo!