There's a common rule of thumb that tells you what percentage of your retirement portfolio should consist of bonds and fixed-income assets -- and it's your age. If you're 65, 65% of your portfolio should be in bonds and 35% should be in more aggressive holdings, typically stocks.

There's a simple way of changing your asset allocation as you age through what's referred to as a "glide path." In this case, the glide path calls for declining equity exposure. Most target-date funds use a declining equity glide path throughout the life of the fund to make the portfolio holdings more conservative as it ages.

But beware: Don't confuse conservatism with safety.

Retirement plan portfolio on top of stock certificates.

Image source: Getty Images

As it turns out, the safest glide path is actually to start moving back into equities as you move through the early years of retirement. That sounds counterintuitive, but research from Wade Pfau and Michael Kitces found that "rising equity glide paths in retirement have the potential to reduce both the probability and magnitude of failure for client portfolios." In other words, reducing your exposure to equities throughout retirement makes it more likely you'll run out of money.

The biggest risk in retirement

The average return for the stock market is about 7% after adjusting for inflation. But the market doesn't go up exactly 7% year in and year out. Just look at the below historical chart of the S&P 500 index.

^SPX Chart

The biggest risk to your retirement is that a bad market environment hits just as you leave your job. Imagine if you had said sayonara to your employer in 2000. You would have seen your stock portfolio cut by nearly 80% from the high in 2000 to the low in 2002. If you were relying on the 4% rule to get you through 30 years of retirement, it's unlikely you'd still make it. This is called sequence risk.

If you see a bad sequence of returns in the early years of retirement, your risk of running out of money increases tremendously. At the same time, your financial comfort level for the next 25 years or so precipitously declines.

On the other hand, if you retired right before a bull run in the market, you're almost assured to make it through without running out of money. You'll probably leave a nice chunk for your heirs, too.

A rising equity glide path protects against sequence risk

With the biggest risk to your nest egg coming in the early years of retirement and the few years before it, it makes sense to have less equity exposure in those years. That could be the most money you have in your portfolio for the rest of your life, and you'll need it to last a long time. If the stock market crashes in the early years of retirement, you'll effectively be buying stock on the way down if you follow a rising equity glide path.

If you followed a conventional glide path, you'd be selling stock on the way down. That's a big no-no. By the time the positive stock returns show up, you won't have enough exposure for it to make a difference.

Another way of thinking about it is to spend from fixed-income assets in early retirement to give your equity assets the longest amount of time to provide positive returns. Historically, equities provide the best returns over the long run but also generate the most volatility.

What if the bad returns don't show up until the end of retirement?

The risk of using a rising equity glide path in retirement is that the stock market produces strong returns early in retirement, but then crashes later. In that case, you'll be buying more stocks as the price climbs just to have more exposure to them as the price falls.

Surely you'll be leaving money on the table by not having more exposure to stocks as the price climbs in your early retirement years. But retirement isn't about having the most money to leave to your loved ones -- it's about making sure you have enough to live off for the rest of your life.

A portfolio of 100% equities would theoretically maximize your long-term returns on average, but it comes with a high risk that you'll run out of money before you're ready.

It seems like a fair trade to risk ending your life with less money in exchange for ensuring that your money lasts longer. After all, that's what most people are trying to achieve through their declining equity exposure later in retirement. That strategy's just a bit misguided.

What's the perfect glide path?

Now that you're on board with a rising equity glide path in retirement, you'll want to know how you should allocate your portfolio over time.

Further research from Kitces found a portfolio that starts at 30% equities and steadily climbs to 70% equities over 30 years is expected to last 30 years more than 95% of the time when using a 4% withdrawal rate. He also found that a portfolio with a static 60/40 equity/bond allocation throughout retirement lasts 30 years 93% of the time. The 60% equities to 20% equities glide path found in T. Rowe Price's target date funds also is only successful 93% of the time, and the 50% to 30% glide path from Vanguard is only successful 94% of the time.

Accelerating the glide path through the first 15 years of retirement and holding a static asset allocation throughout the rest increases the likelihood of a successful retirement even further.

Kitces only tested for 30-year retirements using the 4% rule, though. Your circumstances may be different. A longer retirement may require even higher equity exposure and a shorter retirement may do better with less exposure to equities.

Understanding the fundamental reasons behind using a rising equity glide path is just the first step. Use Pfau's and Kitces' research to guide your decisions, but tweak them for your personal situation.