Americans are a nation divided according to age when it comes to investing in a volatile bull market, according to a survey by Allianz Life Insurance Company of North America.

Millennials (52 percent) were more worried about a coming recession or an impending market crash than Gen Xers (46 percent) and baby boomers (44 percent).

Those in the millennial generation were also more nervous about investing in the market (43 percent) than Gen Xers (35 percent) and baby boomers (29 percent).

Forty-nine percent of investors surveyed in the first quarter said they were willing to give up potential gains by investing in a product with downside protection, down from 52 percent in a similar survey a year earlier.

Fifty-two percent of respondents reported feeling optimistic that the stock market would grow at least 5 percent or more in 2019, while (33 percent said they were comfortable with market conditions and ready to invest.

However, 41 percent said that if the market dropped, causing them to lose a lot of money, they could not rebuild their savings in time for retirement. That's up from 38 percent a year earlier.

Allianz Life conducted the 2019 Q1 Allianz Life Quarterly Market Perceptions Study in March using a nationally representative sample of 1,005 respondents age 18 and older.