In business lore there is no better advice than "buy low, sell high."

As markets keep hitting new lows, that's pretty hard for the average investor these days, but in parts of the oil business, it's exactly what they're doing.

The news has been filled with headlines about Canada's suffering oil industry, which might leave you thinking everyone in the sector is on the verge of going broke.

But don't weep for all of them. In certain sectors, business has never been so good.

Upstream vs. downstream

In parts of southern Saskatchewan oil pumpjacks are thick along the roadside and crude is at six-year lows. That's the upstream part of the business and it's hurting. In oil lingo, although the principle applies to other sectors as well, the industry is divided, for practical purposes, into "upstream" and "downstream" portions.

The upstream part of the business is finding and gathering the resource — in this case, crude oil. Upstream includes the geologists using computer mapping and educated guesses about where oil might be. It includes seismic work where crews look deep underground for likely oil-producing rock formations.

It also includes oil drillers, bitumen miners and the smaller companies that support them with engineers, trucks, heavy equipment for making roads and berms, drilling mud, well testing, storage tanks and pumps. The upstream sector is huge and fragmented.

With oil now at a six-year low, it is this sector that has been devastated, because the dividing line between upstream and downstream is, give or take, crude oil.

Commodity hangover

With oil trading around $40 US and today's Economist magazine predicting a 10-year commodity hangover, investment in the exploration part of the business has collapsed. With a worldwide glut, only optimists with very deep pockets are looking for more.

Small companies are still drilling and pumping, not because there is a lot of money in it, but because at prices less than half what they were last year, upstream producers risk going broke if they don't keep covering their costs — including their loan payments. That is partly why crude prices keep falling to new lows.

Small companies in the upstream end of the business boost private-sector employment in places such as Alberta and Saskatchewan. They are shrinking, laying off staff. Some are going out of business.

But the downstream part of the oil business is another kettle of fish entirely.

Like Christmas

While $40 US crude oil creates pain for the upstream part of the industry, it's like Christmas for the downstream part, which uses oil as its raw ingredient.

The downstream industry includes pipelines and trains that transport oil from where it is extracted. It includes the huge refineries, mostly in the United States but also dotted across Canada, that turn the crude into the usable stuff we buy to heat our homes and run our cars. And it includes the retail end — the trucks that take the fuel to where it is needed and the gas pumps where, cussing at the high prices, we fill our fuel tanks.

Although many smaller businesses serve it, the downstream sector mostly consists of the oil giants: pipeline companies, railways, refiners and gas station chains. It's hard to run your own pipeline or refinery as a small business.

The downstream sector is running full steam. Existing pipelines are full and pipeline companies want to build more. The railways move so much oil, farmers complain their crops are being left behind. At the same time, refineries are operating at 96 per cent capacity, which is probably about as close to full capacity as they get.

And despite a staggering profit margin, the downstream sector just can't seem to produce enough. Of course that creates a shortage of gasoline, pushing prices higher.

On a recent visit to southern Saskatchewan, the roads were lined with pumping oil donkeys. The glare of flaring gas lit up the prairie at night. But as an annoyed cab driver pointed out, gasoline was selling at more that $1.20 a litre.

Yet refineries, which seem to be the bottleneck between supply and demand, are shutting down for revamps and repair. In New Brunswick, yesterday's announced Irving Oil shutdown, which will cut output by half, was being played as a good-news, job-creation story.

Buy low, sell high

Integrated oil companies including Imperial Oil, with their Esso brand, and Suncor, owners of Petro Canada, have a foot in both upstream and downstream sectors of the oil business. (The Canadian Press) Irving Oil is an example of a downstream producer, refining mostly offshore oil for Canada and the U.S. Northeast. They are making a fortune by buying cheap crude and selling expensive gas. They should have lots of money to create jobs.

Other giants, including Suncor, owners of the Petro Canada brand, and Exxon (Imperial Oil or Esso in Canada) are considered to be "integrated" oil companies. What they lose in the upstream part of the business, they make up in the downstream sector, so long as gasoline prices stay high.

It looks like there will more weeping in the energy sector. There are now predictions oil could fall below $30 US a barrel. There will be more layoffs. There will be more bankruptcies and defaults. People may lose their homes.

But for the downstream sector of the oil business, save your tears. What was Premier Rachel Notley saying about increasing Alberta's refining capacity?

Follow Don on Twitter @don_pittis

​More analysis by Don Pittis