Investors are using a record amount of borrowed money to bet on stocks. Why it matters: Trading with borrowed money — known on Wall Street as "margin" — can amplify both returns on the way up and losses if the market turns.Even investors who do not trade on margin should watch it: Borrowed money has played a key role in market crashes, from 1929 to the dot-com bust.State of play: Through the end of April, net margin debt hit more than 1.25% of U.S. market cap, near the highest level in records stretching back to 1997.Big picture: It's just one of the metrics causing some to question the sustainability of the market's AI-driven boom. Others include: Long-term measures of market valuation like Yale professor — and Nobel laureate — Robert Shiller's Cyclically Adjusted Price-to-Earnings ratio (CAPE) are at highs not seen since just before the dot-com crash. The market's valuation as a share of U.S. GDP — sometimes known as the Buffett Indicator because Warren Buffett often cited it — is the highest on record. As we mentioned Wednesday, the stock market seems to be offering skimpy returns compared with bonds, a state of affairs that's sometimes signaled poor returns to come. And speculative trading activity seems to be picking up, with bullish trading of options (as measured by put-call ratios) and leveraged ETFs gathering momentum.What they're saying: "Whether we're in a bubble is a very common question from investors and there are a number of ways to address that," said Ben Snider, Goldman Sachs' chief U.S. equity strategist. He added: "I think it's fair to say the increase in leveraged retail trading activity does point in the direction of signals that would warrant some caution."Yes, but: As compelling as these measures of market exuberance may seem, their record as timing mechanisms — that is, as guides for when to buy and sell — is pretty terrible.Shiller's CAPE ratio, for example, has signaled market overvaluation for almost all of the last decade. Anyone who sold when it broke out of its previous range in late 2016 would have missed out on an over 200% rise in the S&P 500. Case in point: Goldman Sachs' Snider doesn't find the current levels of market enthusiasm off-putting. On Wednesday, he raised his year-end S&P 500 target to 8,000 (it was previously 7,600), implying a gain of 16.9% in 2026. He cited the strength of corporate earnings, wrinkles and all, as a reason for continued optimism.The bottom line: Stocks are probably a bit frothy and could be due for a correction. But timing the markets is incredibly hard.