A month of war in Ukraine briefly erased a year's worth of gains for European equities, but the continent's bourses have quickly recovered as investors poured money into sectors — such as energy and defense — that are poised to benefit from one of the region's deepest policy shifts in decades.

The largest war in Europe since World War II has suddenly awakened governments to the urgent needs of making their economies less reliant on oil and gas imports from Russia and building their own military security capabilities.

After initially plunging to 12-month lows, amid record outflows on worries the war could cause a stagflation shock, European equities have swiftly recovered. Shares in German defense company Rheinmetall are worth twice as much as before the conflict, while shares of wind turbine maker Vestas Wind Systems have jumped around 40% so far.