Last week, financial adviser Joseph Kelly visited a client who had seen the value of his retirement savings soar, thanks to a surging stock market.

“He said his account was up 18 percent, and he asked me, ‘What should I do with it?’ ” recalled Kelly, who works in Berkeley Heights, N.J. His client was modestly wealthy, but Kelly still suggested holding tight.

The client had another idea: He wanted to take out $75,000 to help his son buy a house.

Later the same day, Kelly visited another client – comfortable in the upper middle class – who wanted to take out $20,000 from her 401(k) to splurge on a vacation. She was even willing to pay a 10 percent penalty, which is required under the law if an individual is not yet 59 1/2 years old.

The remarkable stock market rally of 2017 – in which the Standard & Poor’s 500-stock index shot up 22 percent and the Dow Jones industrial average 25 percent – has boosted the nation’s retirement accounts to record heights, making the painful 2008-2009 stock market crash feel like ancient history. And that fervor has not faded with the new year.

That feeling of optimism could spread as more Americans receive their year-end retirement account statements in the mail and online this month, providing concrete evidence of newfound paper wealth.

And some are so confident that they are taking money out – despite it being taxed and potentially hit by an early-withdrawal penalty – assuming it will be replaced as markets continue to surge upward.

“I’ve seen more money requests for extraneous items in the last six weeks than I have in the last five years,” said Jamie Cox of Richmond-based Harris Financial Group, which manages $500 million in savings for about 800 middle-class families.

“There’s a lot of people that are feeling comfortable spending their retirement money right now,” Cox said.

Cox said he is seeing more people take larger withdrawals, $20,000 to $40,000, to fund dream vacations or home improvement.

“I hear, ‘I want to take that Viking Cruise I didn’t go on two years ago.’ Lots of these things were holdovers from the financial crisis,” Cox said.

Megan Caldwell, 33, who works in sales operations for Higher Logic, an Arlington, Virginia-based company that manufactures cloud-based software, was tempted to tap her 401(k) to buy a house as an investment property. Her retirement account has grown to more than $140,000. It was less than $100,000 about a year ago.

“It’s a hard decision, but I think I will make more money in the stock market,” Caldwell said. She has been saving in her 401(k) for a decade but didn’t contribute the maximum under law until last year. The 2017 market returns combined with her savings in the account were “a little eye-opening.”

The average annual return for 401(k)s hit 15.7 percent by the third quarter of 2017, according to Fidelity. And for most Americans, it’s these retirement accounts – 401(k), 403(b), SEP and IRA – that provide the closest evidence of a revving stock market.

Retirement assets – including annuity reserves, pensions and defined contribution plans such as 401(k)s and IRAs – exploded in the United States from $11.6 trillion in 2000 to $27.2 trillion as of Sept. 30, 2017, according to the Investment Company Institute, which represents the mutual fund industry.

Kelly Shue, a finance professor at the Yale School of Management, said the wealth effect tends to change the way people invest and consume.

“Stock market booms make people more tolerant of risk,” she said. “They tend to increase their consumption. We know people spend more when they are wealthier and when the market goes up.”

The thinking is, “If I’m richer for good, I’m going to spend more,” said Scott Baker, a professor at the Kellogg School of Management at Northwestern University.

There are plenty of signs of 401(k) exuberance. The personal finance sector on Reddit and other message boards are littered with tales of people becoming 401(k) millionaires. People are even tweeting proud photos of their 401(k) balances.

Yet the increase in 401(k) balances has done little to calm worries that Americans still are not saving enough for retirement. The Center for Retirement Research at Boston College found that the median household approaching retirement age had a median balance in its 401(k) or IRA of just $135,000 in 2016.

“Balances in these accounts are woefully inadequate,” said center director Alicia Munnell, a management professor at the school.

And the stock market rally can’t go on forever.

Vanguard Group Chairman William McNabb told Bloomberg News last week that he thinks the U.S. stock market is “getting pretty close” to irrational prices. He said he expects stocks to continue to skyrocket for the next few months but produce “very modest” gains over the next decade.

Douglas Boneparth, president of Bone Fide Wealth in New York, said his clients – millennials, mostly in their late 20s and early 30s – have not shown sudden interest in their retirement account balances. After all, they expect to work four to five more decades.

Leah Daniels, 37, owner of Hill’s Kitchen in Washington, said she likes seeing the rising balances in her retirement accounts. Yet it remains an abstraction because her retirement is years off.

“It feels like funny money,” Daniels said.

For some older workers in or nearing retirement, the current run-up can, paradoxically, be scary, said Lynn Ballou, a certified financial planner in San Francisco.

“This is the most hated bull market. They just don’t believe it,” she said.

Ballou pointed out that most of her clients lived through the 2000 dot-com bust and the 2008 market crash – seeing their savings rise and disappear each time. And they feel trapped into keeping their accounts heavily invested in stocks now because interest rates remain so low for safer certificates of deposit and bonds.

When they get their 401(k) statements, Ballou said, they look at the eye-popping numbers and wonder how long it will last – and whether they’ll get out in time.

“This is a fearful group of people,” she said.

Linda Ramsdell, 57 and knowing that her retirement horizon is getting shorter, barely looks at her 401(k) statements.

“I’m in it for the long haul,” said Ramsdell, human resources manager at Gat Creek furniture in Berkeley Springs, West Virginia. “My account does what it’s going to do, and I just leave it alone. I am feeling more comfortable in my safety net, but my spending habits haven’t changed. I like saving money.”

More in Business

When a friend shared a Facebook post with Michelle Burris inviting her to protest in downtown Washington, D.C., last Saturday, she knew she had to go. So she bought a Black Lives Matter mask from a street vendor before marching the streets of the district with a “No Justice, No Peace” sign.