Yellow Dog Prod. | Image Bank | Getty Images

Imagine being two years away from retirement and seeing your 401(k) — which you may have thought was shielded from massive market corrections — tank by more than 20 percent. That was the reality in 2008 for workers who had invested their savings in target-date funds. These funds are intended to invest your savings in a diversified portfolio of underlying stock and bond funds.

As your retirement date approaches, your target-date fund would gradually reduce the equity allocation and increase the bond portion in order to lower market risk. The kickoff of the Great Recession, including a 777-point decline in the Dow Jones Industrial Average on Sept. 29, 2008, disabused target-date investors of the notion they were safe from market swings.

"The year 2008 was the period that put target-date funds to a test," said Jeff Holt, director, multi-asset and alternative strategies at Morningstar. "Those that were approaching the retirement date weren't immune to significant losses in the market." Here's what went wrong and how it affects your retirement plan, even 10 years later.

When everything fell

Target-date funds with retirement dates beyond 2020 experienced losses exceeding 30 percent, reflecting the fact that those funds were heavily allocated toward stocks. However, those investors still had years to continue saving, and they were able to ride the bull market that started in March 2009. The situation was more grim for investors in near-dated funds, including those set to retire in 2010. See below.

Among those funds that were hit hard included the Oppenheimer Transition 2010, which experienced a 41 percent loss in 2008. About 70 percent of this fund's assets were invested in equities, according to Morningstar. The financial crisis also unearthed another risk: Bonds weren't necessarily a safe place to hide, either. "Some funds were burned because they were too aggressive on the fixed income side," said Holt. Where some target-date funds held short-term bond funds within their fixed income allocations, others held riskier high-yield bond funds, which can move in the same direction as equities, he said.

Lessons learned

The dramatic decline was a teachable moment for fund managers: Afterward, they gave more thought to their bond portfolios and considered whether any one underlying fund could drag down the whole portfolio, Holt said. What managers generally have not done is reduce their overall equity exposure.

You never learn anything from making money; you learn it all on the downside. Aaron Pottichen senior vice president at Alliant Retirement Consulting

If anything, they've added more stock exposure for investors who are in the middle of their careers. This way, these savers can continue to capture market gains and stave off the risk they will outlive their savings in retirement, said Holt. "Target-date funds aren't fundamentally different in how they are built now versus 2008," he said. "They still hold a significant amount of equities at the retirement date."

Bear in mind that the managers are the ones who determine how the assets are invested, as well as the fund's changing allocation — known as the glide path — as your retirement date approaches. That means you might see some target-date funds with greater exposure to stocks at the retirement date, while others might be more conservative.

Worker losses

Hero Images | Getty Images

Difficult lessons were also in store for employees who were invested in target-date funds and the employers that sponsored their retirement plans. "The only time people really learn when it comes to investments is if they lose a lot of money," said Aaron Pottichen, senior vice president at Alliant Retirement Consulting. "You never learn anything from making money; you learn it all on the downside." Imperfections aside, target-date funds at least kept employees from making bad investment decisions.

It should be clear that target-date funds aren't immune to losses. They weren't in 2008, and they won't be in 2018. Jeff Holt director, multi-asset and alternative strategies, Morningstar

In late 2009, following a round of layoffs by an employer in Austin, an outplacement firm brought Pottichen in to talk to employees who had just lost their jobs and educate them on what to do next with their 401(k) accounts. One laid-off worker had retirement plans at five employers. At four of those companies, he allocated himself heavily toward stocks.

At the fifth employer, he kept his savings in a target-date fund. The plans where this saver invested most aggressively experienced the steepest losses during the recession, Pottichen recalled. "If he had been all in that target-date fund at the last employer, he would have saved $60,000 in losses," he said.

Comprehending risk

PeopleImages | DigitalVision | Getty Images

Following the 2008 crash, retirement plan advisors pushed to help employers and workers understand market risk. For Pottichen, that means selecting target-date funds based on the demographics of a given employer. For instance, an employer with an older population that has high savings rates and large balances might be better off with a target-date fund that is less aggressive, he said. Employees are also coming to terms with the fact that while they can't control market performance, they can control other aspects that will improve their retirement savings. In that vein, employers have adopted automatic features to boost workers' savings rates. Automatic enrollment places workers into the retirement plan by default, while auto escalation boosts their contributions into the 401(k). "It's key to understand the role of target-date funds in your retirement success, versus your own role in saving for retirement," said Holt. "It should be clear that target-date funds aren't immune to losses," he said. "They weren't in 2008 and they won't be in 2018."

WATCH: This is how long $1 million will last in retirement