Stock investors have enjoyed one of the greatest bull runs in history. Since March 2009, when U.S. stocks hit bottom in the aftermath of the Global Financial Crisis, the S&P 500 (^GSPC -0.22%) -- a decent proxy for the performance of the U.S. stock market -- has gained an incredible 520% in total returns. 

Moreover, the U.S. economy is in relatively strong shape, with high employment and expectations that there's life left in this bull market. But at the same time, there are reasons to be concerned. The spread of coronavirus in China is already having major impacts, bringing travel and economic activity in major parts of the country to a grinding halt. The impact is already being felt in energy markets; the International Energy Agency is predicting the first quarterly decline in global oil demand in over a decade to start 2020. 

A hand reaching for cash in a rat trap.

Cash is king, but too much cash in your investing accounts can hurt your returns. Image source: Getty Images.

Whether coronavirus or something else entirely will finally bring economic growth to a halt, and send the market crashing, remains to be seen. But none other than Warren Buffett giving signs he's not a fan of stocks right now, with Berkshire Hathaway (BRK.A 0.64%) (BRK.B 0.54%) being a net seller of stocks last quarter. 

With some of those same concerns, I've also taken actions to prepare my portfolio for an eventual market crash. 

Here's my strategy 

To start, a little bit of background. I'm 43, and the majority of my wealth is in retirement accounts, as well as a taxable account focused on high-yield dividend stocks. Those investments are for things that will happen multiple decades from now, so it doesn't make sense for me to sell a large portion of my stock portfolio at this stage. Sure, I might get lucky with my timing and avoid short-term losses from a market downturn, but I'm more likely to just miss further market gains. As Motley Fool co-founder David Gardner has pointed out, the stock market goes up about two-thirds of the time, so time in the market continues to beat timing the market. 

In other words, I'm saying largely fully invested with my core portfolio holdings. As much as I think we could see a market downturn in the next year, particularly if China’s economy -- both its consumption and its manufacturing output -- slows enough to affect the rest of the world, I realize it’s impossible to predict whether this will happen with any accuracy, or how it would affect stocks. Moreover, it's just as impossible to know when it would happen (if it does) or how much stocks could go up before eventually falling. 

There's nothing worse than sitting on the sidelines waiting for a 20% market decline, only to see it gain another 25% while you watch. So I intend to stay invested to a large degree

This is how much cash I have in my portfolio right now

As of this writing, after the market closed on Feb. 21, I have almost 5.2% of my entire equity portfolio in cash. In addition to that existing cash, my wife and I contribute roughly another 5% of our present portfolio value in new cash every year, and at present, only about three-fourths of those contributions are being invested into the stock market. 

That's not to say all that cash will stay cash, because even as the market continues going up, I'm still looking for opportunities to buy, and finding them, including high-yield dividend stocks that I can count on even during a market downturn. 

A little context goes a long way

It may not seem like much, and in reality, 5% of my portfolio isn't a large amount. And for good reason: The best course of action almost all of the time, is to be invested. It's essentially impossible to time your way around market crashes, and then buy back in at the bottom. For most of us, it's simply better to make new investments regularly, and hold those investments through every sell-off and downturn, to profits on the other side. Basic asset allocation makes it clear that sitting on the sidelines is not an effective long-term wealth building strategy. 

Here's some context. This is what it looked like to hold stocks from the 2007 stock market peak, to the 2009 bottom:

^SPXTR Chart

^SPXTR data by YCharts

Now let's apply a healthy dose of time to that painful downturn: 

^SPXTR Chart

^SPXTR data by YCharts

Doesn't look quite so painful as we get further away, does it? 

Sadly, far too many investors got out of the market because of the first chart and didn't enjoy any of the amazing gains since. That's why I don't keep a large amount of my portfolio in cash, even with the market regularly breaking records and another downturn eventually going to happen. 

Ready to act, but not too ready

By keeping some cash on hand -- dry powder, if you prefer -- I have some ability to act to take advantage of the next market crash, or to a lesser degree, just a sell-off in a stock that I want to own. In the grand scheme of things, this small amount of money may not lead to life-changing gains, but it should prove a nice way to juice my returns by taking advantage of the next big sell-off. 

Most importantly, by keeping it a small portion of my portfolio, I won't end up harming my returns by keeping too much cash on the sidelines.