The captains of Corporate America are steering a record amount of cash into stock buybacks.

Companies have announced them this year at a rate of more than $5 billion a day. The buyback boom has been viewed by investors as a sign of confidence among CEOs.

Yet with their own money, executives are quietly taking a much different approach: They're cashing out.

Insiders dumped $8.4 billion of their shares in May and $9.2 billion in June, according to an analysis of regulatory filings by TrimTabs Investment Research. That's the biggest two-month period of insider selling in a year.

"They're buying back from the front door, and shoveling shares out the back door," said John Mousseau, president of CEO of Cumberland Advisors, an investment firm that manages more than $3 billion.

"It would be like going on TV to tell everyone what stocks we like, and then selling them," he said.

Related: Execs are cashing in on the explosion of stock buybacks

Boosted by the Republican tax cut and the strong economy, corporate executives authorized $436.6 billion of stock buybacks during the second quarter, according to TrimTabs. That nearly doubled the previous record of $242.1 billion, which was set during the first three months of 2018.

Apple (AAPL) alone announced plans last quarter for $100 billion in buybacks. Big banks are also plowing more money into repurchases. Wells Fargo (WFC), JPMorgan Chase (JPM) and Bank of America (BAC) each said they'd buy back at least $20 billion of their own stock.

Vast corporate purchases of stock are a reward for shareholders, at least in the short term. Not only do buybacks provide persistent demand, which lifts share prices, but they artificially inflate earnings per share.

Buybacks are also a reward to executives because many of them are paid heavily in stock.

"Large US companies have become cash machines for the top insiders who run them," said David Santschi, director of liquidity research at TrimTabs.

In fact, insider selling accelerates immediately after buybacks are unveiled, according to a recent analysis from the office of SEC Commissioner Robert Jackson Jr. The study found that in 2017 and early 2018, the percentage of insiders selling stock more than doubled immediately after buyback announcements.

"Right after the company tells the market that the stock is cheap, executives overwhelmingly decide it's time to sell," Jackson Jr. said in a June speech.

Related: Tax cut triggers explosion of buybacks

Despite authorizing massive buybacks, insiders aren't buying much themselves.

In June, insiders sold about $8 of stock for every $1 they bought, according to TrimTabs. That ratio has climbed sharply since the end of last year.

Of course, share buybacks are not new. For decades, major American companies have returned excess cash to shareholders, traditionally through dividend hikes and more recently through buybacks.

Defenders of buybacks, including JPMorgan CEO Jamie Dimon, note that the money doesn't disappear — and it's better than letting the cash sit in the bank. Shareholders can use their winnings to boost the economy, such as by purchasing a new car.

Related: American companies have never owed this much money

Yet Mousseau questioned the wisdom of plowing money into buybacks at a time when share prices are near all-time highs.

"God forbid you give it back in the form of a dividend," he said. "While it may not be the most tax efficient, at least with dividends you let the shareholder decide what to do with the money."

But Mousseau cautioned against viewing the spike of insider selling as a signal about where the stock market and economy are heading because he doubts that executives know more than everyone else.

"I don't want to give them that much credit," he said.

TrimTabs' Santschi said he wasn't surprised to see more "financial engineering" like buybacks during a period of extremely low interest rates. Many companies even borrowed to pay for buybacks.

However, the environment is changing. Borrowing costs have climbed sharply as the Federal Reserve has raised interest rates and unwound emergency programs.

"It's not over," Santschi said, "but the party is coming to an end."