The biggest US companies are set to spend a record amount of cash buying their own shares in 2017, according to Goldman Sachs.

The bank’s chief US equity strategist, David Kostin, and his team estimate that S&P 500 buyback spending will total $780 billion next year. That would be more than their estimate for $602 billion in 2016, which is on track to be a record.

In theory, companies buy their own shares with the belief that they are undervalued – and because there’s nothing better to do with the money.

Buybacks also reduce the number of outstanding shares, boosting reported earnings per share. Earlier this year, buybacks helped propel the market to record highs.

But because they involve companies – not investors – repurchasing their shares, buybacks have been criticized as corporate financial engineering.

Goldman thinks the splurge on share repurchases it expects in 2017 will be driven by an increase in total cash use by 12%, and $2.6 trillion in spending.

They could get a strong helping hand from President-elect Donald Trump.

The US has the highest corporate tax rate among developed countries, discouraging companies from repatriating earnings abroad back to the US. Trump has proposed to cut the rate to about 15% from 35%.

"Our economists expect tax reform legislation will pass during 2H 2017," Kostin said. "President-elect Trump and House Republicans have expressed support for a one-time tax on previously untaxed foreign profits as part of their tax reform proposals."

"We forecast that S&P 500 firms will repatriate $200 billion of their total $1 trillion of cash held overseas in 2017 and spend $150 billion of the repatriated funds on share repurchases," he said.

In addition to more spending on buybacks, Kostin forecast that capital-expenditure spending on heavy infrastructure would rise by 6% to $710 billion. This would mostly be driven by the energy sector, which should raise spending as oil prices stabilize.

Here's Goldman's chart of S&P 500 cash use and how companies could spend their $2.6 trillion stash of cash in 2017:Screen Shot 2016 11 21 at 8.36.03 AM

Foto: sourceGoldman Sachs