It wasn't so long ago that socially responsible investing, also known as "ESG" for environmental, social and governance, was seen as a way to make a statement but not so great for returns. That's changing as companies, governments and investors focus on climate risk and governance, even as President Donald Trump withdraws the U.S. from the Paris climate agreement, the sole nation to do so.

With the election last year, concern grew that "Corporate America would fall into line with Trump's vision to 'Make America Great Again' by dropping all pretense that it cared about sustainability issues. Given these concerns, the thinking went, investors might abandon sustainability and move on to other themes," Jon Hale, head of sustainability research for Morningstar, wrote in a blog post this week. "But that didn't happen. If there was a 'Trump effect' at all, it was as a galvanizing force for sustainable investing."

Major investment firms from UBS (UBS) to Bank of America (BAC) in recent weeks advised investors to incorporate climate change risk in their thinking as returns on those investments improve.

Get Breaking News Delivered to Your Inbox

"There is now strong evidence that thinking about social responsibility as part of the investment decision-making process does not sacrifice returns," wrote Mark Haefele, the global chief investment officer for wealth management at UBS in his December letter to investors. "Indeed, it can actually help de-risk, diversify and enhance them."

Haefele points to financial instruments like "green bonds" as one proof point that "sustainable investing can now move from the satellite to the core of an investor's portfolio."

The average return of the MSCI KLD 400 Social Index, which tracks sustainable firms, matched the S&P 500 on UBS's risk and return criteria, the UBS letter noted. Top companies in the 400 Social Index include Microsoft (MSFT), Coca-Cola (KO) and Disney (DIS). Companies involved in nuclear power, gambling, military weapons, civilian firearms, genetically modified organisms and adult entertainment are excluded.

The Bloomberg Barclays MSCI Green Bond Index, which measures fixed-income instruments whose proceeds are earmarked for projects with environmental value, even "slightly outperformed" the Bloomberg Barclays Global Aggregate between December 2013 and October 2017, with a return of around 17 percent versus 15 percent, UBS noted.

Bonds for the International Bank for Reconstruction and Development, the main lending arm of the World Bank, outperformed equivalent U.S. Treasuries, UBS said.

Green bonds of a certain size issued in euros and U.S. dollars through October doubled from the same period in 2016, a November report from ABN-AMRO noted. In 2016, the issuance tripled from 2015, the report said.

In a major report to investors, Bank of America this week forecasted more than $70 trillion in investments through 2040 tied to a global "low-carbon transition." There are many "entry points for investors wishing to play the climate change solutions theme, and anticipate fast growth." Among the many options are renewables, electric vehicles, batteries and storage, LEDs and lighting, smart grids, and energy efficient-buildings and transport, the report said. Clean technology, it added, is the No. 1 "energy investment opportunity of our time."

"Extreme weather is recognized as the No. 1 global risk today, with climate change acting as the ultimate risk multiplier," the BofA report said. The bank listed more than 200 global stocks with "exposure to climate change-related solutions."

At the start of 2016, sustainable investments "constituted 26 percent of assets that are professionally managed in Asia, Australia and New Zealand, Canada, Europe, and the U.S. -- $22.89 trillion in total," an October report from McKinsey & Co. noted, citing the Global Sustainable Investment Alliance. "Four years earlier, they were 21.5 percent of assets."

As leaders gathered last week at French President Emmanuel Macron's One Planet Summit to mark the second anniversary of the Paris agreement, major investment firms, companies and countries said they're working to evaluate risk tied to the agreement's goals.

"Sustainability may resemble an investment theme, but it's broader than that. It's an approach to decision-making, which in the investment context means a long-term focus that's inclusive of stakeholders," Morningstar's Hale said in his blog post. It "recognizes that the transition to a low-carbon economy will produce winners and losers, and that investors can have an impact on creating a low-carbon global economy that works for more people."