When it comes to millennials’ investment strategy, cash is king.  

A new survey from Bankrate.com (RATE) finds those ages 18 to 29 are the most likely to say cash is their favorite long-term investment.

Thirty-nine percent of people in this age group identified cash as their preferred way to invest money they won’t need for at least a decade. This is three times the number of people who opted for the stock market, despite the S&P 500 gaining 17% over the past year. On the flip side, cash investment yields remain below 1%.

While young investors are missing out on Wall Street’s rally, it’s hard to blame them for being risk averse, says Greg McBride, CFA and chief financial analyst at Bankrate.

“The financial crisis, the housing bust—they had front row seats to that and were seeing the impacts it had on their family and friends,” McBride says. “It contributes to a naturally risk-averse stance from the get go.”

Looking at investments over the long-term can be helpful, McBride says, but there is also an educational gap for this age group that hasn’t had the opportunity to invest long-term.

“Look at the market over a 25-year period and that puts short-term volatility in context,” he says. “Even something as severe as the financial crisis—if you hung on through that, you have recovered your losses and even come out ahead. You can’t expect someone to have a 25-year outlook when they’ve only invested a few years.”

But it’s not just millennials with a cash mentality. Bankrate also finds 1 in 4 Americans prefer cash investments for money they won’t need to use for 10 years. Real estate came in at second place with 23%, and stocks trailed in third place at 19%. This is up from the 14% of respondents who favored the stock market last year.

“The wounds of the 2008 financial crisis are still fresh for people,” McBride says. “They generally don’t have an appetite for short-term volatility. They feel the pain of losses more significantly than the joy of gains. Investors tend to be performance chasers, so traditionally when we see investors jump on the bandwagon when the market hits all-time highs, but we haven’t seen that turn at this point.”

The survey also measures financial security among respondents, and found that while security dipped in July to 100.1 from 101.5 in June, it still indicates improved financial security from one year ago. A reading over 100 indicates improvement, and in five of the seven months of 2014 so far, it has registered above 100.

Job security, comfort level with debt, net worth and overall financial situation all improved compared to last year, Bankrate reports. The survey was conducted by Princeton Research Associates International among 1,000 adults by phone.

But just because cash is their preferred method of investing, it doesn’t mean millennials are forgoing savings altogether. A recent report from the Transamerica Center for Retirement Studies finds millennial household retirement savings increased dramatically to an estimated median $32,000 in 2014 from $9,000 in 2007. Millennials say they are saving through employer-sponsored plans like 401(k)s, or outside the workplace, and began saving at age 22.

Young adults do have time on your side, McBride says, which is something they should consider when weighing cash versus the stock market as an investment option.

“The power of compounding works best over long periods of time—it has an exponential effect on the nest egg you can accrue for later years,” McBride says.

Follow Kate Rogers on Twitter at @KateRogersNews