Canada was ranked the world’s fifth-best investment destination in a survey of business executives released Tuesday, as improving macro economic indicators spur growing optimism among management teams.

The survey commissioned by accounting firm Ernst & Young marked the second consecutive survey in which Canada ranked in the top five destinations, as part of a broader capital shift toward developed economies. Canada had fallen out of a top five position in recent years amid plummeting commodity prices.

Canada’s improved standing is partly due to a perceived rise in geopolitical risk in developing countries, as well as its close proximity to the United States, an EY executive says. It also comes as rising commodity prices show signs of brightening the outlook for oil and gas investment in the country.

“The world continues to need oil and gas, and continues to need companies to produce it,” said Doug Jenkinson, a partner at EY based in Toronto.

The firm surveyed 2,300 global business executives from 14 industries, 58 per cent of which were C-level managers. The industries include everything from oil and gas to retail to financial services.

The United States was ranked the top investment destination according to respondents, followed by China, the United Kingdom and Germany in second, third and fourth place, respectively.

The U.K. fell outside the top 10 destinations in 2016 following its decision to separate from the European Union last summer, but the country regained its position this year.

Management teams were bullish on their outlook for the global economy, with 64 per cent of respondents viewing the economy as improving, while 32 per cent said it was stable and four per cent said it was declining. Fifty-seven per cent of respondents also saw corporate earnings increasing, while 40 per cent saw earnings remaining stable.

Meanwhile, business leaders also expressed uncertainty over market volatility and political risk in developing nations. Volatility in commodities, currencies and other capital markets was the single-largest perceived business brisk among respondents at 19 per cent of the total.

Policy shifts were the next-largest concern among respondents, with 15 per cent selecting government intervention as the largest business risk. Ten per cent of respondents pointed to nationalistic U.S. trade policy in particular, following signals by the Trump administration that the country was considering stepping out of the North American Free Trade Agreement and instituting a border-adjustment tax.

Overall, 69 per cent of respondents selected some form of geopolitical risk or policy changes as the single-largest threat to their businesses, despite maintaining a broadly optimistic view of the direction of the global economy.