A version of this story first appeared in CNN Business’ Before the Bell newsletter. Not a subscriber? You can sign up right here. You can listen to an audio version of the newsletter by clicking the same link.

New York CNN  — 

This hasn’t been a good year for the equities market. The S&P 500 is down nearly 20% and with two trading days left in the year, investors’ hopes of a miraculous recovery have been dashed.

But even when the overall market is losing, there are still winners – and there were quite a few of them this year – mostly in energy, which has been the best-performing sector of 2022.

Here are the big winners, and losers, of the year.

The winners: The story of 2022 has been energy.

Brutally high oil and gas prices were the talk of the town this year and one of the largest contributing factors to sky-high inflation. That’s bad news for drivers, but ended up being great for the energy industry as oil prices and energy stocks are closely interlinked.

The energy sector has so far returned more than 60% this year, significantly outperforming every other S&P 500 sector. No other sector has gained even 5% year-to-date.

Occidental Petroleum has been the biggest gainer of the year in the S&P 500, up 122% year-to-date.

Constellation Energy (CEGDX) is in second place, up 109% and Hess (HES) comes in third with a gain of 94%. Rounding up the top ten are Marathon Petroleum (MPC), Exxon (XOM), Schlumberger (SLB), APA (APA), First Solar (FSLR), Halliburton (HAL) and Marathon oil (MRO), all up between about 70 and 80% this year.

Gas and oil prices have been falling in recent weeks, but they’re still higher than they have been over the past few years. That’s contributed to record-breaking profits at major energy companies. The net income of global oil and gas producers is expected to double in 2022 to a record $4 trillion, according to the International Energy Agency.

In the third quarter, 81% of all energy companies in the S&P 500 reported earnings above estimates, the highest of any sector, according to Factset data. The energy sector reported the highest year-over-year earnings growth of all 11 sectors, at 137.3%.

The losers: This was the year of no more free lunch in Silicon Valley.

Big Tech soared to new heights over the past decade as the companies enjoyed a low-interest rate, low inflation environment. That’s no longer the case, tech and communications stock prices clearly reflect that.

Energy technology solution company Generac Holdings (GNRC) is the worst performing stock in the S&P 500 so far this year, down about 74%. Coming in second is dating app company Match Group (MTCH), which is down 70%. Elon Musk’s Tesla (TSLA) is also down about 70%, making the auto tech company the third worst performer this year. Meta, Facebook’s parent company, also makes an appearance in the bottom ten stocks– down 65%.

That’s a huge shake-up, at the start of this year Tesla was the fifth most valuable company in the S&P 500 and Meta was sixth.

Big tech had a nightmare year in 2022– collectively losing nearly $4 trillion in market value in 2022. That’s a lot when you consider the 10 worst-performing stocks in the S&P 500 have wiped out a market value of about $1.6 trillion.

Even Apple, generally considered more resilient than other tech companies, is down 31%, more than the overall market in 2022.

Wall Street is hoping for a tech rebound next year, but with more interest rate hikes on their way and a possible recession, investors may be left waiting.

SBF borrowed $546 million from his hedge fund to buy Robinhood stake

Sam Bankman-Fried bought a nearly 7.6% stake in Robinhood (HOOD) earlier this year, financed with half a billion dollars borrowed from his hedge fund. The same one that prosecutors say was illegally funneling customer funds from its affiliated platform, FTX.

In an affidavit that emerged Tuesday, Bankman-Fried said he and FTX co-founder Gary Wang borrowed more than $546 million from the hedge fund, Alameda Research. He then used the money to purchase a large stake in Robinhood, reports my colleague Allison Morrow.

Why it matters: Bankman-Fried’s stake in Robinhood is now at the center of a separate, multinational legal battle over the assets associated with FTX’s bankrupt crypto empire.

Four separate entities have laid claim to the approximately 56 million shares, worth about $450 million. SBF really wants to hold on to those shares himself– he’s leaning on them as a source of payment for legal expenses, according to FTX.

It’s not clear from the court filings whether the $546 million used to purchase the stake included funds that prosecutors allege were stolen from customer deposits in FTX.

Meanwhile, the recent crypto winter has been bad news for Robinhood. The company laid off 23% of its staff in August after cutting 9% of its employees in April. The online brokerage’s stock is down nearly 60% year-to-date.

Southwest’s meltdown continues

Southwest (LUV) is in the middle of a service meltdown – canceling thousands of flights during the busiest travel days of the year and leaving a trail of angry investors, government officials, employees and tens of thousands of stranded customers in its wake.

The company’s stock fell about 5% on Wednesday after a 6% drop on Tuesday – its largest tumble in five months. The airliner is currently down about 27% this year as investors fear the worst for the fate of the company that just can’t seem to get it together.

So what happened? ​​Experts, employees and even the CEO admit that Southwest’s mess was decades in the making, reports my colleague Alicia Wallace.

“We’ve been having these issues for the past 20 months,” Captain Casey Murray, president of the Southwest Airlines Pilots Association told CNN this week. “We’ve seen these sorts of meltdowns occur on a much more regular basis and it really just has to do with outdated processes and outdated IT.”

Murray noted that Southwest’s ancient scheduling system hasn’t changed much since the 1990s. Chief Operating Officer Andrew Watterson told employees this week that the outdated scheduling system was the main culprit for the outage.

Southwest’s “point-to-point” model also didn’t help. The operational approach involves planes flying consecutive routes, picking up crews at those locations and relying on short turnaround times.

“When they have cancellations in one area, it really ripples through, because they don’t necessarily have their crews and their pilots in the right positions,” said Jeff Windau, senior equity analyst of equity research for Edward Jones. “They just kind of build on from city to city to city, and when that gets disrupted, it’s very difficult to get the operations flowing smoothly again.”

Southwest acknowledged many of the concerns raised by Murray and others.

“Part of what we’re suffering from is a lack of tools,” Southwest CEO Bob Jordan told employees in a memo obtained by CNN. “We’ve talked an awful lot about modernizing the operation, and the need to do that.”

What’s next: The Department of Transportation said it is investigating Southwest’s spate of cancellations and customer service delays. President Joe Biden said his administration “is working to ensure airlines are held accountable.”

Democratic Sens. Ed Markey of Massachusetts and Richard Blumenthal of Connecticut issued a new letter Tuesday calling on Southwest to pay up for what they say were avoidable holiday cancellations.

“Southwest is planning to issue a $428 million dividend next year – the company can afford to do right by the consumers it has harmed,” they wrote. “Southwest should focus first on its customers stranded at airports and stuck on interminable hold.”

Other airlines, meanwhile, are doing their best to pick up the slack. United and American Airlines (AAL) said they would place price caps on travel to and from select cities designed to help the melted-down airline’s customers get home without breaking the bank.