Generally, the amount of time you are invested in the stock market determines your returns, with higher probabilities of positive and larger returns if you are invested longer. This distinguishes investing from gambling. However, you cannot have rewards without risk, and it is entirely possible to lose money in a quarter, year, or even a whole decade.

In 2018, we saw what many define as a “bear” market; the S&P 500 index, which contains stocks of 500 of the largest U.S. companies, reached an all-time high on September 21, 2018 (intraday high), but fell 20.06% from this peak by close of trading on December 24, 2018. Although it went up a bit in the last week of 2018, it was still down 6.2% for the year.

Market declines invite counterfactual thinking—thinking what could have been if you had timed the market correctly, selling at the peak and buying at the lowest point. But, timing the market transforms investing into gambling; no one can consistently beat a “buy and hold” approach. If you try to time the market, the odds are against you; your returns are more likely to be lower than if you had bought and held.

Even Warren Buffett cannot time the market correctly; he had long been saying stocks are over-priced and had been holding much of Berkshire Hathaway’s assets in cash, but plowed much of this cash into Apple, banks, and other stocks in 2018 Q3. However, he would have saved billions by waiting until December 2018. Similarly, corporate stock buybacks have been enormous in recent years, and in hindsight, most were poorly timed.

It is not comforting to look to gains in prior years as recompense for 2018’s losses. Even if you invested in 2009, you still lost money this year, despite tremendous gains in prior years. Many more of us who invested over the past couple years saw our accounts in the red this quarter, erasing all gains and even part of our principal—if we could go back and put the money in a savings account or even under a mattress, we would be doing better now.

To survive a bear market, holding for the long term is critical. Preparations should start in the good times, far before panic strikes. When you invest, you should kiss your money goodbye for at least a decade or preferably even longer; if you’ll need it sooner, it’s too risky to put in equities. The Bogleheads, followers of Vanguard’s founder, Jack Bogle, call this principle “never bear too much or too little risk.”

To ensure you will hold, not sell, in a bear market, you must have at least the following: (a) education, (b) mental preparation, and (c) free cash flow. Without mental preparation, even if you have financial education and funds available to cover your expenses without selling equities, you might still sell in a panic. Without free cash flow, you might be compelled to sell to cover your debts or loss of income. Without education, you might have all your money in one stock (a horrible risk), BitCoin, or with a financial “advisor” who is plundering your portfolio with fees.

Free cash flow can be generated by selling the conservative parts of your portfolio during a market downturn. Depending on how conservative these parts of your portfolio are, they might experience no erosion of principal at all—savings accounts, certificates of deposit, and Treasury bills/bonds come to mind. The idea of asset allocation is to maintain a certain percentage of your portfolio in equities; to stay at this percentage, you would automatically buy more stocks when the market is down (“rebalancing”), because equities have declined as a proportion of your portfolio.

When is timing the market appropriate? Some would say never, but the insidious form of market timing really is jumping in and out of the market instead of holding. Assuming that you are not bearing too much (or too little) risk, timing the market can be appropriate on the way in, if it would cause you to invest earlier, or on the way out, if it would cause you to divest later. Although there is a whole industry built around timing stock purchases based on variables such as price–earnings ratios and geopolitical happenings, these are not much better than astrology. Generally, the longer you are invested in an index fund of the whole stock market, the higher your returns. Therefore, the only good forms of market timing are the ones that cause you to be invested for a longer duration.

The S&P 500, which is about 80% of the U.S. stock market by valuation, returns an average of about 10% each year. Adjusting for inflation, the average real returns are around 7–8%. However, if you were to take a portfolio of 100% Vanguard Total Stock Market Index Fund and withdraw 10% of the balance each year, you could easily run into sequence-of-returns risk (or for short, sequence risk). You could get lucky and have many years of good returns at the start, but you could head toward a complete capital wipeout with a few years like 2018 (or worse, 2008) in the first decade of your experiment. Market timing, via refraining from divesting stocks during market downturns, is an essential tool for retirees, including members of the FIRE community (financial independence, retire early), to mitigate sequence risk. Because this approach to market timing involves holding (not selling) and extending the duration of doing so, it is beneficial or at least benign, rather than malignant.

Ten percent is nice, but neither spectacular nor guaranteed. A savings account can now yield you over 2% per year, guaranteed. With stocks, you might earn 10% in 2019, earn 25%, or even lose 40%. Although credit card companies lose money when people default, overall they are wildly profitable because they collect returns on debts that approach 30% per year. Before you invest, you should pay your credit card debts. Even mortgages and student loans with interest rates around 5% per year might be paid first before investing in stocks; this is a guaranteed return, while stocks may lose value. Of course, if your employer matches 50% or 100% of 401(k) contributions you should do this up to the cap before paying more than the minimum payments on your credit cards, but this is a rare example. Usually, money does not grow on trees.

Take solace. In an index fund of the whole U.S. or global stock market, your investment will not go to zero, and it will eventually come back up. On the other hand, if you have the bulk of your investments in your company’s stock, you could certainly lose everything. Even an entire market sector could get wiped out (e.g., fossil fuels). You can’t have rewards without risk, but you can have risk without rewards. An “investment” can be both risky and more likely than not to be a loser (e.g., lottery tickets). It is your responsibility to learn and know the difference, implement this knowledge, and follow through, especially in a bear market.