Despite a series of tumultuous events in recent years and the risk of a recession, 72% of Gen Zers say they believe they will be wealthy someday, according to a survey by MagnifyMoney.

The online survey of 2,072 U.S. consumers found that Gen Z, comprising those between 18 and 25 years old, was especially optimistic about their finances compared to other generations. For example, only 59% of millennials said they expected to become wealthy.

“While Gen Zers are completely optimistic, the rest of the people do not feel as optimistic,” said Brianna Wright, a spokeswoman for MagnifyMoney.

Older consumers were more pessimistic about their financial futures, according to the survey.

Only 36% of those from Generation X (42 to 56 years old) and 19% of baby boomers (57 to 76 years old) believed they would become wealthy.

Respondents had different views on what it means to be wealthy. About 55% of those surveyed described being wealthy as living financially comfortably without having any financial concerns. Only 19% saw it as commanding a six-figure salary, while 47% considered it living comfortable and 38% described wealthy as being free of debt.

Respondents expressed less optimism than a similar study conducted by the firm in 2019, right before the onset of the Covid pandemic, according to MagnifyMoney.

The voluntary online study was conducted in May and quotas were administered in order to present an accurate representation of the country. It is the second time MagnifyMoney has conducted such a survey, according to Wright. The first version took place in 2019 and only included about 1,029 participants.

That earlier survey found more optimism all around as 51 percent of all those surveyed thought they would be wealthy, compared with 49% in the most recent survey.

Generation Z members were too young in the initial study, however, the confidence in the economy among Millennials dropped from 66 percent in the 2019 study.

One of the reasons why Generation Z appears more assured of their future wealth is their access to investment opportunities and information, according to MagnifyMoney. Whereas before Wall Street may have appeared a distant entity, they now have access to it with the tap of a finger.

“With the rise of apps and social media there are a lot more opportunities for Gen Zers to develop an understanding of the [investment] products,” Wright said.

The study also found that those that came from wealth tended to believe that they too would be wealthy. Those that did not also believed that they too would fail to achieve financial success.

Of those surveyed from upper middle-class families, about 55% believed that they would become wealthy. Only 39% of lower middle-class families and 37% from low-income families thought that they would break out of their current financial state and become wealthy.