Many baby boomers are carrying too much risk in their retirement portfolios because of the stock market’s rapid rise during the past five years. 

While the stock market boom has propelled the average 401(k) balance up 50% in the past five years it has “increased exposure to the negative impact of a market downturn,” according to Fidelity Investments in its quarterly savings analysis of its 401(k) and individual retirement accounts.

Many of Fidelity’s oldest 401(k) account holders, including those closest to retirement age, had higher allocations to equities than is recommended for their age group. Fidelity compared average asset allocations to an age-based target-date fund and found that 18% of people age 50 to 54 had a stock allocation at least 10 percentage points or higher than recommended, and for those between the ages of 55 and 59, that figure increased to 27%, Fidelity found.

Another 11% of people between the ages of 50 and 54 had 100% of their 401(k) assets in stocks, while 10% of those aged 55 to 59 had all of their 401(k) assets in stocks.

Also see: Should 401(k) plans include index funds only?

“One thing we learned from the last recession is that having too much stock, based on your target retirement age, in your retirement account can expose your savings to unnecessary risk – it’s the hidden danger that many workers are unaware of. This is especially true among workers nearing retirement, who should be taking steps to protect what they’ve worked so hard to save,” says Jim MacDonald, president, workplace investing, Fidelity Investments.

Also in the second quarter of 2015, the average 401(k) balance dipped slightly to $91,100 from $91,800 at the end of the first quarter and is nearly flat from the second quarter 2014, Fidelity found. IRA balances increased slightly from $94,000 at the end of the first quarter to $96,300 at the end of the second.

Fidelity also discovered that people are contributing more to their retirement savings in 2015. The average 12-month total savings amount, which combines both employer and employee contributions, was $10,180 at the end of the second quarter, up from $9,840 at the end of the first quarter.

The average IRA contribution dipped to $2,690 at the end of the second quarter from $3,150 at the end of the first quarter due to the significant amount of people making contributions to their IRA in the first quarter to meet the IRS tax deadline, Fidelity said.

Fidelity has noticed an increase in 401(k) loans, fueled in part by average balances that have increased over the past several years.

Also see: How to reduce employee cravings for 401(k) loans

“While the percentage of people initiating a loan (10.1%) and the percentage of loans outstanding (21.9%) have remained steady over the last several quarters, the average 401(k) loan amount continues to increase,” according to Fidelity. “For the previous 12 months, the average loan amount reached $9,720 at the end of Q2, up from $9,630 at the end of last quarter and $9,500 a year ago.”

Paula Aven Gladych is a freelance writer based in Denver.

Read more: