Conventional wisdom dictates that trying to time the market is almost always a recipe for difficulty if not outright failure. The key to consistent gains is “time in the market,” which is to say buy and hold is still the most effective path to wealth.

This likely comes as unwelcome news to those who prefer to jump on the latest rocket ship and celebrate unsustainable gains. But what happens when the market goes the other direction? What’s the best way to prepare for a crash?

Having a portfolio of quality investments is a good first step. Here are some other factors to consider.

Diversify your portfolio

Piling your funds into a single vehicle is absolutely not advisable, no matter how strong its fundamentals may be. It is always better to spread your wealth among many different investments and investment types. Five less-expensive stocks in different industries will always be better than one expensive stock. Three stocks and two mutual funds are an even better idea. Later in your investing career, two stocks and three bonds are likely to be the most successful mix.

Hedge your investments

Right alongside advising you to diversify, most investment experts will tell you subsequent investments should work as hedges against your earliest positions. For example, if you are long on stocks, you should pair up those investments with precious metals or real estate, which are the types of investments the market will flee to if stocks slip.

This strategy makes it more likely one set of shares will gain because the other set drops in price, and that means the hedge will preserve your wealth.

Do not panic

Although your shares might seem less valuable after a crash, the truth is you realize no losses until you sell. At the same time, you have to remember that selling locks in those losses. If time in the market is the right strategy, then holding shares with good fundamentals and good valuations is the right move whatever today’s close was.

Prices drop. Prices rise. Over time, however, there has never been a more reliable vehicle for wealth creation than the stock market. At the same time, strategies have emerged to help investors navigate rough spots. Hedging, cost averaging and retaining good positions are among the best pieces of advice an investor can get.

As long as your portfolio executes on the fundamentals, over time it is virtually impossible to lose money.