Weird, weird second quarter on Wall Street.

It was devastating for almost everyone holding financial-company stocks, of course. And on the flip side, almost anything tied to the energy sector was golden -- in fact, better than gold. The average energy-related stock on the New York Stock Exchange surged 18.3% in the quarter, as the price of crude rocketed 37.8%, to $140 a barrel. The price of gold was up 1.1% in the quarter, to $926.20 an ounce.

The weirdness was in a lot of what was between the extremes of financials on one end (Bank of America Corp. , down 37% in the quarter) and well-known oil and gas plays on the other (ConocoPhillips, up 24%).

Here’s a look at some of the highlights and lowlights:

--Utilities power up: The Dow Jones utility index gained 8.7% in the quarter. Historically, electric utilities have been a classic "defensive" stock sector, meaning a place to hide in times of market turmoil. That may have helped them last quarter. The diversification moves of some of the companies over the last decade into energy trading, telecom services, infrastructure and other areas also may be a draw for some investors.

But a traditional element of utilities’ defensive appeal -- their dividend yield -- isn’t much of a lure these days. The average annualized yield of the Dow utility stocks is 3%, not much above the 2.85% yield of the Dow industrials. And for the utility industry as a whole one big question looms: Will the companies’ regulators allow them to fully pass through to customers the surging cost of fuel, as they have in the past?

--Transports on a roll: The Dow transportation stock index gained 3.4% in the three months and was the only one of the better-known indexes that was positive in the first half (up 8.3%) and that managed to reach a new all-time high (on June 5).

While airlines were hammered by soaring jet-fuel costs, their declines in the Dow transports index were offset by gains in railroad shares, including Union Pacific Corp. and CSX Corp. Soaring demand for coal and for farm commodities has been a boon for the rails, which do a big business hauling that stuff (it can’t go FedEx, after all). Even so, some of the rail giants have warned that the recent Midwest floods could hamper their business in the near term.

--Mid-cap surprise: The Standard & Poor's index of 400 mid-capitalization stocks rose 5.1% in the quarter, a tremendous showing when you consider that the big-cap S&P 500 sank 3.2% in the period.

Although energy stocks helped both the mid-cap and big-cap indexes, the mid-cap index also benefited from particular strength in non-energy sectors including biotech (companies such as Vertex Pharmaceuticals), fertilizer and chemical firms (CF Industries Holdings and FMC Corp.) and infrastructure construction companies (Quanta Services Inc.). It also got a boost from a rebound in beaten-down shares of higher-education companies (including Strayer Education and ITT Educational Services).

--Black-and-blue chips: Could Dow Jones & Co.’s decision to add Bank of America to the Dow industrials index in February been more poorly timed? That addition gave the 30-stock Dow five financial issues (the others: American Express, American International Group, Citigroup Inc. and JPMorgan Chase & Co.).

In the midst of a horrendous credit crunch, that was just asking for trouble. Not surprisingly, the renewed plunge in financial issues was a major reason for the Dow’s 7.4% decline in the second quarter. It also was a lousy three months for General Electric, General Motors and Coca-Cola Co., among other Dow issues.

What happened to the concept of blue-chips as havens in tough markets? As Wall Street’s sell-off worsened dramatically in June, big-name stocks may have suffered from a case of "sell what you can," as I explain in this recent post.