I've been thinking a lot about the "fear/greed cycle" lately, specifically the "greed" part.  

The fear part is that investors often get excessively spooked in periods of extended market weakness, switching to cash and bonds and reducing their ability to participate in risky assets' eventual recovery. This happened during and in the wake of the last market downturn; even after the market started to recover in early 2009, bond funds continued to receive the lion's share of new fund flows.

In the caricatured version of the fear/greed cycle, avarice kicks in at the opposite inflection point –after the market has already gone up a lot. Having missed the biggest stretch of outperformance, investors pile into the market segment that has performed best, even if it's grossly overpriced. We saw it with the dotcoms in the late 1990s and in early 2000, and we saw it again with the housing market in the mid-2000s.

Those bubbles weren't terribly hard to spot, so you might conclude that you'd see the next one coming. You might also assume that such mistakes are the exclusive domain of rank amateurs. You have no intention of loading the boat with Amazon.com and Netflix at this juncture, so you're in the clear.

What I've been ruminating over lately, though, is that cartoonishly overvalued assets aren't the only way that investors can get themselves into trouble toward the end of a market cycle. Greed – and I hesitate to even call it that because it's negative and judgmental – can present itself in much more benign and sensible-seeming ways. It doesn't always entail naive investors hugging on to a narrow subset of investments after their heyday.

This more mainstream type of "overdoing it" still has the potential to do significant damage. Specifically, I've noticed how many pre-retirees and retirees are disinclined to lighten up on equity risk today even though in many cases their portfolios have grown beyond their wildest dreams.

I get why investors are sticking with stock-heavy portfolios. Recency bias – the tendency to believe that the environment that has prevailed in the recent past will persist into the future – is a force to be reckoned with. Most pre-retirees and retirees were investing during the financial crisis, and the dotcom crisis before it. But the current bull market for stocks is one of the longest in market history, and volatility has been relatively mild.

The few market drops we've seen of late – in early 2018 and again in the fourth quarter, for example – have been followed by swift and decisive recoveries. Investors who have been willing to hold tight through those periodic swoons have received near-immediate gratification. You'd also be correct to note that people like me have been advocating that pre-retirees and retirees rebalance for quite a while now, and yet stocks have continued to trump bonds.

Pre-retirees and retirees also have reasonable concerns about the main alternative to stocks: bonds. Even though yields look better these days, it's still hard to get excited about an asset class that has gained less, on an annualised basis, than stocks over the past 10 years.

When you’ve won, quit playing

Yet a bad year in the bond market is equivalent to a bad day in stocks, as the saying goes. And I keep coming back to asset-allocation guru Bill Bernstein's advice: "When you've won the game, quit playing." Thanks to the equity market's rally, many pre-retirees and retirees have effectively won the game. Having amassed the assets they need for a comfortable retirement, they should transition at least a portion of their portfolios into safer investments to ensure that they'll actually be able to enjoy it.

I wouldn't go so far as to say that pre-retirees and retirees should dump stocks altogether. Most people retiring don't have enough in assets to switch into very safe assets and jettison equity risk entirely. And retirement could be a 25- or 30-year proposition, so hunkering down in very safe investments leaves you exposed to inflation risk.

But I think it's possible to find a comfortable balance. As retirement approaches, moving some assets from stocks into bonds or even cash is an acknowledgment that your job description as an investor has changed. Amassing assets for retirement was your one and only investment job in the years leading up to retirement. But if you're about to transition from growing your portfolio to spending from it, an equally important job is battening down the hatches with the part of it that you're about to consume. Otherwise, fluctuations in your portfolio could force you to change up your spending plans or, worse yet, run out of money later in life because you didn't change up your spending plans.

But how much to allocate to the safe stuff? I like the idea of using market history to help inform how much of a runway to give yourself before you'd need to rely on stocks to pay your retirement bills.

The past isn't prologue, of course, but the data suggest that if you have at least a 10-year holding period, the odds of having a positive return from stocks over that time frame are pretty good. As your spending horizon shrinks, however, bonds are a safer bet because market history suggests they'll be reliably positive for your shorter time horizon. Their returns are apt to be lower, but that's the price you pay for peace of mind.

As your retirement date draws close, using your planned portfolio spending to drive how much to allocate to each of the major asset classes is an intuitive way to go about something that can feel very abstract and black-boxy. And not everyone will draw the same conclusions; some investors approaching retirement may find that their portfolios are positioned too meekly given their spending amount and proximity to spending. But if your retirement is on the line, you owe it to yourself to run the numbers and take a closer look, factoring in your own planned spending.