(Bloomberg) -- Beset by war, soaring costs and higher interest rates, 2022 was a year many European companies — and stock market investors — would prefer to forget.

Carefully crafted investment strategies were thrown into disarray, first by Russia’s invasion of Ukraine and the subsequent energy crisis, then by surging borrowing costs that lifted Germany’s 10-year bond yield, Europe’s benchmark, to the highest in over a decade.

Yet, where there are losers, there are winners. The war proved a boon for shares in defense companies, while rising interest rates boosted banks’ lending margins.

As the zero-rate environment dissipated, “one could say we had a purging of speculative investments, and eyes finally looked hard at core fundamentals of the businesses and their future prospects,” said James Rutherford, head of European equities at Federated Hermes Limited. 

Stock picking will be crucial over the coming year, Rutherford reckons, predicting “the market will become even more discriminating at the company level.”  

Below is a look at some of the biggest winners and losers of 2022:

Winners:

Good Year for Defense

European governments moved almost overnight to beef up military capacity after Russian troops marched into Ukraine. The result has been a 130% surge in German defense contractor Rheinmetall AG, this year’s top performing European stock. Other European defense names such as Thales SA, Dassault Aviation SA and SAAB AB gained between 60% and 80%.

The sector may have more juice: analysts tracked by Bloomberg still see a 20% upside for Rheinmetall.

Fossil Fuels on Top

A boom in so-called old economy sectors such as oil and mining made energy the best performing Stoxx 600 subindex with a 30% gain. An energy crisis caused by a fall in Russian supply boosted oil prices in the first half of the year, and many of Europe’s oil majors reported bumper profits and implemented buybacks. Analysts still project returns of around 20% next year for heavyweights Shell Plc and BP Plc, though increasing odds of a global recession could weigh on oil prices.  

Banking on Rate Hikes 

European banks had a strong end of the year, managing to gain 19% in the fourth quarter and almost reversing all their losses for 2022. Strong profits helped banks build capital which they can return to investors — some such as Banco Santander SA and UBS Group AG have announced share buybacks. 

And the rally could extend into 2023. Half of European fund managers in a Bank of America survey in November said they see banking stocks as an investment haven where they can position for higher rates.

Big Pharma Wins

There were bumper returns for Europe’s biggest pharmaceutical firms — AstraZeneca Plc, with its extensive cancer drug portfolio, gained over 30% for the year, while Denmark’s Novo Nordisk A/S rose 25%, as demand for its obesity drug Wegovy surpassed supply. 

Big Pharma’s run may continue in 2023, with Oddo BHF analysts highlighting “abundant” 2023 clinical news flow, including a hotly awaited lung cancer treatment from AstraZeneca. 

Losers:

Real Estate Deflates

At the bottom of the pile was the rate-sensitive real estate sector, posting the steepest annual decline since 2008. As property values tumble and financing costs rise further, the worst could be yet to come for a market inflated by years of cheap credit.  

Stockholm-listed Samhallsbyggnadsbolaget i Norden AB, or SBB, was the worst performer on the property subindex, down more than 70%. With some of the most leveraged landlords in Europe, Sweden could prove a blueprint for other markets.

Credit Suisse’s Troubles

After a series of scandals, Credit Suisse Group AG had another dismal year, with a client exodus and a 66% share price plunge. It lost close to a fifth of its market cap in one day after reporting a $4 billion loss and a business overhaul. Some analysts highlight lingering concerns, with Citi’s Andrew Coombs predicting Credit Suisse will make “a heavy loss” in 2023. 

Cost of Living Hits Retail 

The Stoxx 600 Retail Index was the second worst-performing subgroup, down 30%, as inflation erodes consumer spending and skyrocketing prices raises companies’ input costs. Neither of these headwinds is likely to abate anytime soon.

Grocers proved relatively resilient, however, as shoppers prioritized spending on food. But clothing retailers, especially in Britain, took a bigger knock, with Marks & Spencer Group Plc and JD Sports Fashion Plc shedding over 40%. E-commerce fashion firm Zalando SE lost more than 50%.

--With assistance from Lisa Pham, Joe Easton, Henry Ren, Chiara Remondini and Macarena Muñoz.

©2022 Bloomberg L.P.