(Bloomberg) -- PG&E Corp. is teaching an unpleasant lesson to Wall Street equity traders who counted on utilities as a safe haven.

Investors rattled by trade wars and hints of a recession drove PG&E shares as much as 2.8% higher on Wednesday even as the utility was cutting power to millions of customers across California. That faith proved misplaced a day later as the stock crashed almost 32% after an unfavorable ruling in the company’s bankruptcy proceedings.

The whipsaw illustrates both the allure of utility stocks and the danger of blindly investing in them as a class. With big, stable revenues and limited exposure to international trade, the companies represent an investment tailor-made for the current moment. And yet while customers are unlikely to stop buying their products no matter the state of the economy, individual firms still face their own, specific risks.

“You may cut back on your electricity use during a recession, but you’re still going to use electricity,” said Paul Patterson, an analyst at Glenrock Associates. “It’s not a discretionary item.” But “utilities can fall dramatically in value, individually,” he said.

The Standard & Poor’s utilities index has risen 21% this year, setting records along the way. Individual utility owners such as Southern Co. and Dominion Energy Inc. are also trading at record highs.

Timothy Winter, who helps manage over $30 billion at Gabelli Funds LLC as an associate portfolio manager, says the rise in utility stocks has been driven by the industry’s ability to increase earnings on a sustainable basis amid massive infrastructure investments. About 10% of funds managed by Gabelli are invested in utilities, and Winter says a new fund is being planned for investments in green energy alternatives.

Strong Fundamentals

“Fundamentals are stronger than they have ever been -- that is because earnings and dividends are growing stronger than they have ever grown before on a sustainable basis,” Winter said. “Many of us in the industry are calling it the golden era of the utilities.”

Still, risks abound, as illustrated by PG&E. The company’s latest stock collapse was sparked by a bankruptcy court judge ruling that its bondholders could submit their own reorganization plans for the company, potentially wiping out shareholders. The company had already slumped over 75% over the past year after wildfires its equipment caused saddled the utility with $30 billion in liabilities.

The company is carrying out the largest blackout ever orchestrated in California to prevent electrical lines igniting wildfires during a period of high winds. The unprecedented power shutdown has ensnared millions of people, many in the San Francisco Bay area, and raised the prospect that much of a major metropolitan area could go days without electricity.

Utility Headwinds

It’s not just PG&E that faces headwinds. Dominion and Duke Energy Corp., for example, back a $7.5 billion gas pipeline project that has been tied up in court. Southern is still working on a $28 billion nuclear plant expansion -- the only such project in the U.S.

If interest rates start rising again, some of the money now flowing into utility stocks could shift to bonds instead, according to Andy Smith, utilities analyst for Edward Jones. However, it’s possible the market has entered an extended period of higher valuations for utility stocks, rather than a short-term spike, he said.

“I don’t see anything bringing them back down, other than interest rates,” Smith said.

To contact the reporters on this story: David R. Baker in San Francisco at dbaker116@bloomberg.net;Gerson Freitas Jr. in São Paulo at gfreitasjr@bloomberg.net

To contact the editors responsible for this story: Lynn Doan at ldoan6@bloomberg.net, Pratish Narayanan, Reg Gale

©2019 Bloomberg L.P.