When the markets perform like they have since 2009, it’s easy to forget 2007 and 2008, when the stock market lost half its value in a matter of months. Only a handful of companies managed to go higher during the financial crisis.

Everything else dropped like a rock.

Risk and reward are usually very correlated. Higher risk means higher returns. Since stocks offer the opportunity for the best long term returns, they also carry substantial risk. Stocks are much riskier than…say, a bond issued by a triple-A rated government or blue chip company.

You can’t rule out losses entirely. At some point in your life, your total returns on your stock portfolio may be negative. That’s just reality. However, there are a few ways to minimize the chance of losing a lot, or all, of your investment dollars using both techniques and different financial products.

Diversify

Studies have concluded that holding at least 30 stocks is the best way to diversify against company specific investment risks. Holding 20 stocks instead of one stock reduces portfolio risk by more than 40%.

That isn’t to say that you should just stop at 30. A broadly-diversified total stock market index will have much less risk than a portfolio of 10 stocks you pick yourself, as it is diversified across many different companies operating in every country around the world.

Buy what you know

The best investors are people who know they know something, and those who know they know nothing. When you buy a share of stock, you own part of a business that faces both opportunity and risk. If you can identify major points of upside and downside for a company in a way that makes logical sense, you shouldn’t hesitate from making an investment.

However, taking advice about stocks from a cocktail party isn’t the same as doing your own research. Likewise, if you know you know too little to pick individual stocks, go with a fund or ETF as a low cost way to get a diversified portfolio.

Over history, the majority of index fund investors have beaten the performance of active managers without all the headaches of picking your own stocks.

Seek insurance with annuities

Annuities get a bad rap in the personal finance arena, but they aren’t all bad. A variable annuity allows you to get exposure to the stock market, but with a minimum guaranteed monthly payout each year when you retire. Think of it as investing in the stock market, but with some kind of insurance in place to protect against huge losses.

The worst part about variable annuities are the fees, often 1-2% of assets each year when all fees and expenses are tallied up. The fees are the cost you pay for the “insurance” in the form of minimum guaranteed payments when you enter the payout phase. Variable annuities reduce your risk of investing in the stock market, but they also significantly increase the costs of investing.

One word of advice: an annuity makes much more sense for someone who is entering retirement than someone who has many years or even decades to retirement. Over a long period of time…say, 20 years, the stock market has never been negative, so guarantees wouldn’t have been necessary over history. Over shorter periods of time…say, 5 years, the stock market has certainly seen periods of negative returns, and a guarantee may pay off.

Remember the golden rule!

The golden rule in finance is that any time you seek to reduce your risk, you also reduce your returns. A variable annuity will slash your risk, but the costs will eat into your performance. Likewise, a well-diversified portfolio will reduce your company specific risks, but it does come at a cost – you’re not going to get meteoric returns in any given year.

Any investment has risk. The only way to fully eliminate risk is to fully eliminate returns by keeping your money in a mattress.

The bottom line: Investing in the stock market is inherently risky. You can reduce your risk by investing in other assets (real estate, CDs, or bonds) and by diversifying within many different stocks on the stock market. In almost all cases where you can reduce risk with a particular product, like an annuity, fees will hold down your performance.