Margin debt climbed to a record high in February, a fresh sign of bullishness for flummoxed investors trying to navigate the political and economic crosscurrents driving markets.

The amount investors borrowed against their brokerage accounts climbed to $528.2 billion in February, according to the most recent data available from the New York Stock Exchange, released Wednesday. That is up 2.9% from $513.3 billion in January, which had been the first margin debt record in nearly two years.

With margin debt, investors pledge securities, typically stocks or bonds, to obtain a loan from their brokerage firms. The money doesn’t have to be used to buy more investments, though it often is. The gauge tends to climb—and pull back—along with broader stock market gauges, which have been rising to fresh records in the wake of November’s presidential election.

Rising levels of margin debt are generally considered to be a measure of investor confidence. Investors are more willing to take out debt against investments when shares are rising and they have more value in their portfolios to borrow against.

But experts say a steep rise can indicate that investors are losing sight of market risks and betting that stocks can only go up. Margin debt has a history of peaking right before financial collapses like the ones in 2000 and 2008. When stocks move lower, investors who are buying with borrowed money often must pull out of the market, exacerbating the decline.