S&P 500 companies will buy back a record $800 billion of their own shares in 2018, funded by savings on tax, strong earnings and the repatriation of cash held overseas, J.P. Morgan said Friday.

That will far exceed the $530 billion in share buybacks that was recorded in 2017, analysts led by Dubravko Lakos-Bujas wrote in a note. Companies have already announced $151 billion of buybacks in the year to date.

“There is room for further upside to our buyback estimates if companies increase gross payout ratios to levels similar to late last cycle when companies returned >100% of profits to shareholders (vs. 83% now),” said the note. “Corporates tend to accelerate buyback programs during market selloffs.”

The stock market has experienced two bouts of steep declines so far this year, the first in early February, when the Dow Jones Industrial Average DJIA, -2.93% fell 1,175 points in a single session to mark its biggest ever one-day point drop, driven by fears about interest rate hikes. There were $113.4 billion of buyback announcements in February, a three-year high, according to Trim Tabs Investment Research.

Read now: Now we know where the tax cut is going: Share buybacks

The second selloff was ignited on Thursday, after President Donald Trump said he is planning to impose tariffs on imports of steel and aluminum, triggering a more than 500 point drop in the Dow at its worst level, on fears the move would spark a trade war. The Dow was down another 300 points in early trade Friday.

Read now:Why returning cash to shareholders hasn’t been good for shareholder returns

J.P. Morgan notes that buybacks will be a support for stocks and recommends that investors continue to buy the dips. Analysts are expecting a combination of improving economic growth and lower taxes to contribute $100 billion of buybacks. Repatriation is expected to contribute about $200 billion.

Companies sometimes opt to buy back shares over using funds to invest in organic growth via capex or research and development because it is difficult to consistently reinvest retained earnings at attractive returns, said the note.

“Given this challenge, we recommend investors continue to seek companies that run a more efficient capital structure with a consistent track record of returning capital to shareholders over companies with bloated cash balances,” said the note.

Stocks with higher buyback yields and new announcements tend to outperform their peers, especially during corrections and recessions. Since 2000, those stocks have outperformed peers by 150 basis points during corrections and 200 basis points during recessions, said the note.

They are also less volatile than their peers in all market conditions, as buybacks tend to stabilize price weakness.

J.P. Morgan’s Long Buyback basket lists 50 stocks that it selected based on five criteria; cash held overseas; net income growth over the next two years; last 12-month buyback announcements as a percentage of market cap; last 12-month net buyback yield; market cap greater than $20 billion.

Treasury Secretary Mnuchin on Tax Reform, Trade and a Weaker Dollar

The list includes Dow components Boeing Co. BA, -2.35% , Coca-Cola Co. KO, -3.50% , Procter & Gamble Co. PG, -1.82% , Johnson & Johnson JNJ, -3.91% , Citigroup Inc. C, -3.13% , American Express Co. AXP, -6.11% , Goldman Sachs Group Inc. GS, -1.90% , Mircrosoft Corp MSFT, -0.48% , Apple Inc. AAPL, -0.14% , Cisco Systems Inc. CSCO, -2.21% . and Intel Corp. INTC, -0.87%

Read also: These companies spent over $1 billion buying back shares while their CEOs were dumping them

It also includes Lam Research Corp. LRCX, +2.14% , regional bank KeyCorp. KEY, -4.98% , biotech Celgene Corp. US:CELG and Airlines Delta Air Lines Inc. DAL, -8.46% and Southwest Airlines Co. LUV, -5.32%

Share buybacks also have their critics, especially when companies announce programs at a time when their stock price is trading close to a high, meaning they are likely overpaying. Companies have been widely panned for their plans to use savings from the tax overhaul to reward shareholders, instead of investing in growth, boosting job creation and rewarding their employees.

Don’t miss: Despite Gary Cohn’s claims, former CEO says companies would probably ‘pocket’ tax cuts

See now:Share buyback machine now in overdrive — dropping a strong hint at what CEOs plan to do with tax savings