Despite Donald Trump’s decision to pull the United States out of the Paris Agreement, it is hard not to feel a sense of optimism on global climate politics as world leaders gather in Hamburg for the G20, writes Taylor Dimsdale.

Taylor Dimsdale is head of research at the climate change think tank E3G, and is currently based in Washington.

Even before Donald Trump decided to pull out of the Paris Agreement on climate change, the implementation of this profoundly important policy had been more or less set in stone at last year’s G20 leaders’ summit.

Under the Chinese presidency, the leaders of the world’s largest economies irrevocably committed themselves to the Paris Agreement as the new framework for global cooperation. They also recognised the need to scale up financing for clean energy and promised to pool their best brains to work together on energy efficiency.

In short, the G20 recognised that future global growth must be green and that financial stability will only be possible if the risks of climate change are managed. No here-today-gone-tomorrow politician, let alone Trump, was going to change that.

Still, the fact the world’s largest economy has made it clear that it regarded oil and gas exports as central to US energy diplomacy would on the face of it seem hardly auspicious. The US also blocked the use of strong language on the importance of climate finance at the G20 finance ministers’ meeting, and, perhaps worse still, the G7 Summit failed to reach consensus on a climate statement.

The diverse nature of the G20 also means there are more divisions between members than in the G7, and several issues on the docket are perceived as more pressing, including the political turmoil in the Middle East and tensions over protectionism and free trade. It would be quite understandable, therefore, to have modest expectations on climate and energy this year.

However, if you take a step back from the rhetoric and high-level politics and consider the bigger picture it is hard not to feel a sense of optimism. Rather than leading a wave of defections from the Paris Agreement, Trump’s announcement was met with a global consensus that countries would honor their own commitments. It also prompted an unprecedented level of support from non-state actors – over 1,000 state, local and business leaders representing $6.2 trillion of the US economy have said they want to play by the rules.

The world’s largest Multilateral Development Banks (MDBs) have also pledged to significantly increase their climate finance, alongside efforts to integrate climate change more systematically into how they lend money. Some MDBs have established climate-related targets for their portfolios. The World Bank is including climate and disaster risk assessments into its Country Partnership Frameworks.

The naysayers on climate change are ultimately finding it hard to argue with the reality of the energy market. More electrical capacity was added from renewables in 2016 than from fossil fuels. The cost of solar and wind energy has fallen by 80 and 35%, respectively, since 2010. According to Bloomberg New Energy Finance, the cost of solar photovoltaics is set to drop by another 60% by 2040 and over that same period renewables will see quadruple the level of investment of fossil fuels. Meanwhile the use of coal, gas and oil are likely to peak by 2025. Countries making big plans to dominate markets for energy by exporting fossil fuels may soon find no one wants or needs to buy what they are selling.

The G20 was conceived as a forum where the major economies could talk openly and work together to ensure financial stability. It helps to set the rules of the global economic and financial system. It is also meant to coordinate rapid response to global crises – it was essential to stabilising financial markets and co-ordinating efforts to boost national economies after the 2008 crisis.

Where once there was short-termism and political expediency on climate change, now there is realism. Even if the world meets the 2 degree target that would still put up to $1.7 trillion of financial assets at risk. If the world gets even hotter than expected, this risk would be much higher as well: up to $24 trillion or 17% of the total. Considering that the amount of carbon in the atmosphere is rising even as emissions stabilise, these risks must be taken extremely seriously.

Relationships between countries are complex and constantly changing. Against this backdrop, we need new models of global governance. These will require strong multilateral institutions, and they will need to take climate resilience into account so that they make good long-term investments.

For the first time since World War II, a new green and sustainable economic framework is emerging. Most countries still want strong institutions and prosperous citizens. What’s changed is that they now realise these cannot be sustained without lowering carbon emissions and taking steps to adapt to global warming.

Good preparation turns risk into opportunity. The transition to a low carbon economy will be bumpy and will not happen overnight, but a G20, or perhaps a G19 if necessary, that stays ahead of this massive shift in finance and energy has the best chance of limiting the damage. Concern about climate change can no longer be seen as snowflake politics: it’s about following the money.