When the stock market is performing well, everyone wishes they had more invested. For those who already have as much money in stocks as they can afford, a leveraged ETF offers a chance to get even more bang for your investment buck, and investors who have used leveraged ETFs recently have reaped the rewards of the high-risk strategy. But before you chase performance and conclude that a leveraged ETF is the right answer for your portfolio, you need to understand some of the reasons they've done so well lately -- and why these perfect conditions won't last forever.

How leveraged ETFs work and why they've dominated the market
The concept behind leveraged ETFs is quite simple, even if the execution of their strategy sometimes involves complicated investment techniques. By taking on leverage -- either by using derivative instruments like swaps or by borrowing money -- leveraged ETFs aim to boost their exposure to a given market by a fixed multiplier. For instance, the ProShares Ultra S&P 500 ETF (SSO 2.53%) is designed to produce double the return of the S&P 500 Index (^GSPC 1.29%) on any given day. So if the S&P climbs 1% today, the ProShares ETF should go up 2%. The same multiplier effect applies when the market falls, in which case leveraged ETFs take bigger losses.

When you look at the long-term performance of a typical leveraged ETF, you'll get the impression in many cases that they're doing their job admirably. For more than five years now, we've seen the stock market rise at an extremely rapid pace, and when you look at the performance of bullish leveraged ETFs, you'll see almost the same relationship that you'd expect between their returns and those of the overall market. For instance, over the past year, the ProShares ETF has almost exactly doubled the total return of the S&P 500:

SPY Total Return Price Chart

SPY Total Return Price data by YCharts.

When you extend the period out to five years, you get an even more impressive result: the long-term performance of the leveraged ETF more than doubles the index:

SPY Total Return Price Chart

SPY Total Return Price data by YCharts.

The primary factor that's driving such strong performance from leveraged ETFs is the combination of the strong bull market in stocks and the relative lack of downside volatility along the way. Given a steady upward move in the S&P 500 without long interruptions of downward or sideways stock-price movements, the conditions for leveraged ETFs have been ideal.

The dangers of leveraged ETFs
The problem for leveraged ETF investors, though, is that these perfect conditions won't last forever. So long as markets move in a single direction, the daily nature of the leverage they incur doesn't hamper returns, and in some cases, it can even improve overall returns.

Yet when you introduce volatility into the market, the leveraged ETF's returns can deteriorate much more than you'd expect. For instance, with the ProShares S&P leveraged ETF, you can see what happens when you include the years leading up to the financial crisis and the associated market meltdown:

SPY Total Return Price Chart

SPY Total Return Price data by YCharts.

Here, the leveraged ETF is still lagging behind the unleveraged S&P 500 ETF, falling far short of any investor's expectations that the ProShares ETF always has to outperform. The reason? The leveraged ETF fell so far during the financial crisis that even the amped-up returns it has generated since then haven't been enough to regain the ground lost in 2008 and early 2009.

Another unrecognized aspect of leveraged ETFs is that the sophisticated strategies they use tend to make them more expensive than a vanilla index fund. For instance, you can buy a typical S&P index fund for as little as $5 to $10 in annual expenses for every $10,000 you invest. For the ProShares ETF, however, the corresponding figure is $89 -- more than 10 times that of some index funds. When the market is powering ahead, it's easy to lose track of that 0.89% expense ratio. But over time, it can catch up to you, and it saps a considerable amount of money from your savings over the long run.

Use leveraged ETFs the way they were intended
To be fair, even the leveraged ETF companies themselves have noted that using their products for long-term investment has massive risks. As the ProShares website points out, "Over periods longer than a day, a geared fund's returns tend to be less than the multiple of benchmark returns stated in the fund's objective if its benchmark experiences relatively high volatility during the period." So it's not as though the providers are setting out to mislead the public.

Nevertheless, many investors look at the recent performance of leveraged ETFs and assume they'll always be able to double or triple the return of the underlying index. When volatility strikes next, those new investors will be among the first to realize that leveraged ETFs have hidden characteristics that you have to understand in order to use them effectively.