By Corrie Driebusch  and Ben Eisen

July 12, 2016 6:50 p.m. ET

Records reached this week by major U.S. stock indexes underscore the power of a popular but controversial tool: the corporate share buyback.

The Dow Jones Industrial Average surged 121 points Tuesday, vaulting the 30-stock measure to its first record close since May 2015, joining the S&P 500, which notched its second record close in two days.

Among the most prominent drivers of the 2016 stock rally has been companies’ willingness to buy back shares. The strategy has been embraced by firms and outside investors alike, because it drives up share prices and improves per-share earnings by reducing the number of shares outstanding. Some investors decry buybacks as financial engineering.

Shares outstanding in the S&P 500 have fallen this year from year-earlier levels, on track for the first yearly decline since 2011, according to S&P Dow Jones Indices. Companies in the S&P 500 bought back $161.39 billion of shares during the first three months of the year, the second-biggest quarter for repurchases ever.

While uneven economic growth, tumbling interest rates and a volatile political climate will likely drive wide market swings in the second half of 2016, portfolio managers said, buybacks appear to be providing support for shares.

“Corporate demand for stocks has been very healthy, and there’s no reason to believe it’s going to end anytime soon,” said David Goss, managing director and head of proprietary strategies at money manager Boston Private Wealth LLC.

 

Gilead Sciences Inc. spent the most in the first quarter, at $8 billion, while Apple Inc. executed $6.7 billion of repurchases, S&P Dow Jones Indices data show. Apple is a member of the Dow but Gilead isn’t.

The repurchasing spree doesn’t appear to be over. Companies have authorized $357 billion in 2016 through the end of last month, according to research firm Birinyi Associates. That is down 28% from a year earlier, though it is unclear how much will be instituted until firms report earnings.

Companies had $156 billion of unused authorizations at the beginning of the second quarter, according to Goldman Sachs Group Inc.

Large share repurchases have come under scrutiny during the tepid U.S. recovery from the financial crisis. Some analysts warn that firms executing large buybacks risk shortchanging the investment spending that fuels economic growth and rising living standards over time.

While buybacks can bolster demand for shares in the short term, according to these skeptics, long-term profitability is better served by investing in projects that promise higher returns over the long haul.

Stock gains are “being supported by kind of less stable underpinnings than we would like to see,” said Thomas Melcher, chief investment officer at PNC Asset Management Group.

To be sure, buybacks aren’t the only driver shrinking S&P 500 stock outstanding.

Corporations broadly are selling fewer shares, and more mergers and acquisitions are being funded by cash rather than share issuance, reflecting in part the ease with which high-quality borrowers can take out debt at low rates and make purchases without diluting shareholders, as stock-financed acquisitions do.

And questions over the long-term impact of buybacks aren’t the only ones hanging over the fresh U.S. stock records. Individual investors remain anxious, pulling $52 billion from U.S.-stock mutual funds and exchange-traded funds in the first half of the year, according to research firm Morningstar Inc. Many money managers said they believe stocks are set for a fall of 5% to 10%, reflecting choppy economic growth and high valuations.

While stock-fund withdrawals alone aren’t enough to drag down major market indexes, the outflows are worrisome for some analysts who track flows as an indicator of stock-market momentum. Investors have been pulling money out of actively managed funds for years, but in recent months that money hasn't flowed directly into ETFs, which are designed to mimic the performance of an asset class or index. Now, some of it is also getting parked in cash or money-market funds.

“It’s a head-scratching situation,” said Jack Ablin, chief investment officer at wealth manager BMO Private Bank. Mr. Ablin said one BMO fund that is typically entirely invested in stocks is 7% in cash.

Fundamentally, said Mr. Melcher of PNC, what drives stocks higher is earnings growth. But companies in the S&P 500 are expected to report their fifth consecutive quarter of contracting earnings, according to FactSet. While earnings are important, many portfolio managers view revenue growth as better reflecting firm performance in the context of the broad business environment, and therefore more germane to routine investment analysis.

“What we’d like to see is earnings growth coming from higher revenues and economic activity running at a faster pace,” Mr. Melcher said. “Those are typically more solid underpinnings for stocks.”

Write to Corrie Driebusch at corrie.driebusch@wsj.com and Ben Eisen at ben.eisen@wsj.com