Beleaguered energy stocks might get a boost if only the industry could win over Gen Z.

That's the finding of a recent report from British bank Barclays which found that just 19% of 18-24 year-olds, a.k.a. the leading edge of so-called Generation Z, would consider buying energy stocks.

"This is the lowest level of any age group and highlights the problem that Big Oil faces," states the report. "[...] energy shares have stubbornly refused to re-rate over the past two years despite a structural re-set and much improved free cash flow."

In the simplest terms, the oil and gas sector has an image problem with investors of all types despite its much improved operating performance over the past 24 months or so. Gen-Z's aversion to the industry merely highlights broader issues. 

There is some good news. Gen Z is quite explicit in what would entice them to invest in this type of stock, according to the Barclays report, which states:

Gen Z responders indicated what made them more likely to invest in the sector were increased renewables investment, reduced environmental impact, but also good returns on investment, namely dividends and share buybacks.

Or put another way, more clean energy, less dirty after-effects of fossil fuel extraction and better investment returns would make the sector attractive to this young cohort and other investors alike.

Such a transformation may be coming sooner than many think.

A Dark History

The recent history of the oil sector has been particularly brutal for energy stock investors. While the oil price has almost tripled to $74 a barrel recently from its low around $26 in early 2016, the same cannot be said for the oil company shares.

The stocks haven't come close to keeping up with the gains in the price of oil. The Energy Select Sector SPDR (XLE - Get Report) exchange-traded fund, which tracks a basket of energy stocks, has risen 21% since the beginning of 2016 through Thursday versus gains of 51% for the SPDR S&P 500 index ETF (SPY - Get Report) , which tracks the broad market of large-cap stocks, according to data from Yahoo. Both figures exclude dividends.

The reason is that investors still fear the sector.

"That speaks to the fact that the investor base is still shell shocked," says Art Hogan, chief market strategist at financial firm National Securities Corporation. He refers to the fact that investors took a beating when oil prices crashed from over $100 a barrel in mid-2014 to $26 in early 2016, and have remained shy of the sector ever since.

Better Outlook

Part of the underperformance has also been due to the historical lack of financial discipline at the oil companies, but the good news is that these firms are now dancing to a different tune that should make investors happier.

"They have slashed costs, and are not chasing growth for growth's sake," says Stewart Glickman, energy equity analyst at New York research firm CFRA. In the language of a finance department, now when an energy company spends money it must be because they are going to make a boat-load more of it.

Glickman notes that back in the heydays of $90-plus prices for oil many major oil firms had negative free-cash flow. That's completely turned around now even though oil prices are not sky high.

"The median E&P [exploration and production company] will generate a cash flow surplus in 2019 even though oil prices are lower than where they were," he says.

That sharp-eyed focus on financial management also comes through in the tone the companies take towards their investors.

"There's now a lot of talk about the sanctity of the dividend," Glickman says. That's designed to keep hold of income investors who may rely on the regular cash dividend payments.

Unclean Image or Dirty Business?

Financial returns and performance aside, the carbon-based energy extraction industry hasn't done itself many favors lately.

"A lot these fossil fuel companies have tried to add eco-friendly lipstick to their dirty business," says Glickman. 

He notes that "by and large these companies extract fossil fuels from the ground." What some have done in response hasn't connected with people who are concerned about environmental damage.

"A picture of a bucolic field on the annual report resonate with people who are environmentally sensitive," he says.

A nice photograph doesn't change the fact that the overwhelming part of the business still involves drilling holes. The percentage that isn't hydrocarbons, such as oil and gas, is small.

Changing that fossil fuel focus could take time because despite the inroads of new clean energy technology, hydrocarbons are still a crucial part of the world economy.

Still, in the meantime, the renewed financial discipline and attention to steady dividends should eventually help boost the sector while the "clean energy" divisions of the companies expand.

The author owns none of the securities listed in this story.