People take part in a demonstration as part of a pan-European movement to welcome refugees and call on European governments to show solidarity with refugees and migrants, in Madrid, Spain, September 12, 2015. Susana Vera/Reuters The population of the developed world is aging. Places such as the US, the eurozone, China and Japan are all starting to see declines in the growth of the working-age population.

Theoretically, this slows economic growth and puts pressure on government budgets since fewer workers have to support the welfare needs of a growing retired population.

James Pomeroy of HSBC wrote an in-depth analysis of this "unprecedented shift" in global demographics. In addition to issuing warnings, he also offered up a possible albeit probably unpopular solution.

Pomeroy said immigration could help stimulate developed economies and reduce the burden on government budgets.

The idea is simple. The working-age population is still exploding in developing areas such as Africa and Southeast Asia, so by moving people in their "productive" years to countries with a shrinking working-age population, you can boost potential economic growth.

"Immigration is generally a positive thing from a demographics perspective because it helps to maintain population growth rates and rebalances the population pyramid," wrote Pomeroy. "A high proportion of immigrants are of working age: for the US in 2013, 80% of immigrants were aged 18-64 years compared with 60% for the native population."

According to Pomeroy's analysis, in addition to balancing the demographics of developed countries, immigrants could be an economic boon.

"This means that immigrants should be net contributors in terms of taxation and government spending, with the OECD finding that, on average across the member countries, the net fiscal impact of immigration is more than 0.5% of GDP," said the note. "While not enormous, this is a positive contribution, which would help to keep taxes lower and/or government spending higher."

HSBC

In addition to supplying a larger tax base, he says that immigrants also benefit local labor economies. Research shows that for every immigrant that enters a country, 1.2 jobs are created for native residents.

Pomeroy notes that in the current political climate, there are some difficulties with this plan. The response to the recent Syrian migrant crisis, especially after the terrorist attacks in Paris, have made opening up borders a hot button issue in both the US and Europe.

Recognizing this problem, Pomeroy emphasizes that he is talking only about economic migrants, not refugees, and that "integration is key" and helping migrant adjust to the economy and culture of a new country is important for success.

"Much care needs to be taken over the integration of migrant workers into communities, labor forces and the education system to avoid 'ghetto-isation'," said the note. "The European Commission has been in favor of measures that facilitate integration via language learning, employment access, education, training and fighting discrimination. Without such policies and integration, the full benefits may not be realized."

There are other issues that would need to be addressed, such as brain drain from the emerging countries and skill matching between migrants and new countries. Proper planning and policy, however, could help alleviate those issues, said the note.

To Pomeroy, immigration presents an opportunity to reinvigorate the slowing economies of the developing world, but political will and intelligent policy are necessary to make the shift successful.