Investors were riding a growing wave of optimism as 2019 ended, according to Allianz Life Insurance Company of North America.

Following some volatility last year, Americans are feeling a bit jaunty and concerns about a possible recession are at the lowest levels since 2018, according to Allianz Quarterly Market Perceptions Study released Tuesday.

In last year's fourth quarter, just 39% of respondents said they were worried about a market crash, a decrease from the 48% who felt the same way in the prior quarter. Forty-three percent said they are worried about a coming recession, compared to 50% who felt that way in the third quarter. These numbers had been steadily rising since 2018, before dropping after a relatively calm period in the markets in mid-November, Allianz said.

“Interestingly, despite this current sense of calm, the number of people who say now is a good time to invest in the market continues to decrease,” Kelly LaVigne, vice president of consumer insights, Allianz Life, said in a statement. “This may be because people are anticipating more volatility in 2020, and don’t want to take the risks that those major swings can have on their savings and retirement.”

This comes as Lazard Asset Management director Jason Williams, in an interview with Financial Advisor, warned investors not to become complacent about risk. He said investors should be well diversified to avoid the risk of increased volatility that he believes is sure to come over the next 10 years.

According to Allianz, investors are considering the potential risks of inflation. Almost half (49%) of Americans said the rising cost of living is a big risk to their security in retirement, and 34% said inflation may prevent them from ever being able to retire.

Millennials were more worried about the impact of rising costs now and in the future than other age groups. Sixty-two percent of millennials said the rising cost of living is preventing them from saving as much money as they should for retirement, compared to 56% of Gen Xers, and 42% of baby boomers. Half of millennials also said they are more worried about being able to pay for necessities like housing or medical care in retirement due to the rising cost of living, compared to 46% of Gen Xers, and 35% of boomers.

“The rising cost of living is a real threat to hard-earned retirement savings, particularly as people are spending more time in retirement,” said LaVigne. “But less than four in 10 said they are confident their financial plan can deal with the rising cost of living.”

“Consumers who are worried about market volatility risks into 2020, and the rising cost of living well beyond next year, should work with a financial professional to help mitigate some of these risks,” said LaVigne.