German business confidence held steady in May after falling for five months in a row, suggesting company executives in Europe's biggest economy are keeping their cool despite the possibility of a global trade war. 

The Munich-based Ifo economic institute said its business climate index held steady at 102.2 after revising up the April reading from an initial 102.1. 

The May reading slightly beat a Reuters consensus forecast for a reading of 102.

An economist at Ifo said the domestic economy, particularly trade, construction and services, had been largely responsible for the stabilisation, while there was "no euphoria" in the export sector which has historically propelled the economy. 

"The downward trend has stopped," Ifo economist Klaus Wohlrabe said. 

"The global economic environment is difficult, but the German economy is holding its ground."

Illustrating the challenging international environment for German exporters, Thyssenkrupp, which makes everything from chemical plants and car parts to submarines and steel, last week cut the profit margin forecast for its capital goods business, blaming a strong euro and higher material costs. 

Germany, a major exporter, faces a host of risks including the prospect of US import tariffs on aluminium and steel, a potential global trade war and the possibility that German firms conducting business in Iran will face sanctions after the US decision to back out of the nuclear deal with Tehran.

"The number of dark clouds in the German economic sky has clearly increased," ING economist Carsten Brzeski said, pointing to higher oil prices, trade tensions and Italian politics.

"Add to this the political reluctance to speed up new structural reforms and both public and private investments and it becomes obvious that the German growth story is running on its last leg," he added. 

Other recent data has painted a negative picture, showing private sector growth at its lowest in more than one and a half years, investor morale remaining at its weakest level in more than five years and the mood among consumers hitting its lowest this year. 

Economic output slowed to 0.3% in the first quarter, down from 0.6% in late 2017 but the finance ministry says the economy is still in a strong upswing. 

Germany's Bundesbank

The German government expects a 2.3% expansion this year but the Bundesbank says underlying economic momentum is likely to have weakened.  

The Ifo survey showed that German managers were more satisfied with their current business situation but felt more downbeat about their prospects for the coming months. 

A breakdown showed sentiment deteriorating in the manufacturing sector while it picked up in services, trade and construction.