A rise in the "risk free" rate of return (I'm looking at you, 3-month Treasury bills!) is an ongoing threat to stocks, but rising interest rates aren't the only things that could derail stock investors.

An ongoing trade war has caused the U.S. trade imbalance to worsen to levels last seen during the Great Recession, wage inflation is increasing corporate operating expenses, and uncertainty associated with the investigation into Russian interference in the 2016 presidential election remains an overhang.

Toss year-end tax-loss selling into the mix, and there are arguably good reasons why the S&P 500's (NYSEMKT:SPY) nearly decadelong rally could end. Are you prepared if the stock market crashes? Here are six things you can do to protect your portfolio against a tumble.

No. 1: Reset your allocation

The long run-up in stock prices may have increased the proportion of your portfolio invested in stocks relative to other investments. If that's true, then your first step is to reset your allocation in stocks.

A man in a suit climbs a hill of failure signs toward a sign that says finish.

Image source: Getty Images.

There's no one-size-fits-all percentage of stocks to own, but risk tolerance and age can help you figure out what proportion is right for you. As a rule of thumb, analysts recommend subtracting your age from 110 and using the result as the percentage to invest in stocks. For instance, a 70-year-old would have 40% in stocks, while a 40-year-old would invest 70% in stocks.

If this simple calculation shows you're too heavily weighted toward stocks and the recent correction has you feeling a bit queasy, then it could be time to rethink your current allocation.

A man puts his hand on his forehead in front of a wall showing a declining stock price.

Image source: Getty Images.

No. 2: Avoid margin

Margin accounts let you borrow money (at competitive interest rates) from your broker using your stock portfolio as collateral. In a bull market, this leverage can boost your return, but in a bear market, it can wipe out past profits and savings because your broker can force you to sell stocks or add cash to bring your account current.

Here's how margin works: Let's assume you contribute $50,000 to a margin account and you use margin to leverage it at a 2:1 ratio. In that scenario, you'd have $100,000 invested in stocks, made up of your $50,000 contribution and a $50,000 margin loan. If your stocks go up in price by 10%, then your account would climb to $110,000, which is a 20% return on your $50,000 investment.

Conversely, if your stocks fall 10%, then your $100,000 portfolio would be worth $90,000, which is a 20% loss on your $50,000 investment. It gets worse, though. Since you still owe your broker the original amount you borrowed, your broker can force you to sell stocks in your account or deposit more cash to bring yourself back into compliance with your loan.

Generally, investors will violate their maintenance margin requirement if their collateral in their accounts drop below 25% of the amount borrowed on margin. If that happens to you, then the broker will liquidate enough stock in your account to put you back into compliance, or require you to deposit more money in your account. Because of these rules, it's possible to lose more than 100% of your investment in a margin account.

Since a bear market is a 20% decline in the broader stock market, you could easily see your investment decline twice that percentage or more if your investments are in high-growth stocks that underperform during crashes. Rather than run the risk of a margin call and steep losses, consider selling enough stock now to get yourself out of margin before you have to at unfavorable prices.

A man pointing at a drawing of an ascending bar chart.

Image source: Getty Images.

No. 3: Embrace dollar-cost averaging

Unfortunately, most investors are horrible at timing when it's best to buy stocks. As a result, many miss out on bargain-basement prices. There's no perfect strategy for taking advantage of a market crash, but dollar-cost averaging can help.

A dollar-cost averaging strategy involves investing a specific amount at a set interval, such as monthly. As an example, you're using dollar-cost averaging if you're contributing a portion of your pay to an employer-based retirement plan every pay period.

Dollar-cost averaging during market declines can help result in a lower average cost, which improves long-term returns because investing a set amount of money every period means you're buying more shares when markets are crashing than when markets are rising. Because the stock market has trended up over the past century, not down, this approach has been a winner.

If you're using a dollar-cost averaging strategy already, then consider increasing the amount you invest every period as the market is falling. And if you're not already using this strategy, consider starting it now, because doing so will remove the need to accurately predict the right moment to buy.

A woman working at a desk.

Image source: Getty Images.

No. 4: Review your holdings

This is a good time to assess your holdings and make sure that your reasons for owning them remain valid -- especially if the number of stocks in your portfolio has increased during the bull market. 

The simplest way to do this is to review your investing diary. But even if you don't keep one, you should still be able to recall your thesis. If the thesis no longer holds water, then it may be time to focus on other stocks. A word of caution, though: Your reason for owning a stock should relate to the company's business and prospects, not its past or current price. 

Why? Because focusing on price alone can cause you to sell great companies that can drive your long-term returns. For instance, imagine selling Amazon.com when the S&P 500 declined 23% in 2002 and it was trading at $19, or selling Netflix when the S&P 500 fell 38% in 2008 and it was trading around $4. If you had, you would have missed out on two of the best-performing stocks over the past decade. 

No. 5: Keep your head

Watching your portfolio decline in value during a stock market crash is a horrible feeling, but it may help your mood to put declines in a bit of historical perspective. 

As I mentioned, the long-term trend of the market is up, but that long-term trend includes many periods where stocks have suffered 10% corrections, and bear markets of 20% declines or more. According to Yardeni Research, there have been 36 declines of 10% or more in the S&P 500 since 1950, including a 49% crash between 2000 and 2002 and a 57% crash between 2007 and 2009. 

Make no mistake: Suffering a 50% decline in value over a two-year period is heart-wrenching. But each one of those 36 setbacks preceded significant rallies that have increased the S&P 500's market value to record highs. And remembering that can help keep you from reacting emotionally to a crash in ways that damage your long-term retirement strategy. 

A blank piece of paper next to a pen.

Image source: Getty Images.

No. 6: Get your watch list ready

One mistake investors make is being unprepared for market crashes -- and, as a result, reacting emotionally rather than proactively. In the past, my team used to say "plan a trade, trade a plan," and that mantra is never more true than when markets are tumbling.

A great way to make sure you're prepared to take advantage of a stock market sell-off is to actively maintain a watch list of top stocks you're interested in adding to your portfolio. This list should include five to 10 high-quality stocks that fit your investment approach and goals. For example, if you're an income investor, your list may include pharmaceutical stocks like Johnson & Johnson (NYSE:JNJ) that offer long track records of revenue, earnings, and dividend growth. Or, if you're a growth investor, it should include disruptive companies that have the potential to reshape markets, like digital payments company Square (NYSE:SQ).

Everyone's watch list will be a bit different, but what matters is that you have one. If you do, then you'll be able to make the most of a stock market crash, especially if you've reined in risk by adjusting your allocation to stocks, avoiding margin, and making sure you only own the names you're most confident in.