Sitting on the sidelines holding on to cash as the stock market heads to fresh records? Then you may be making a big financial mistake.

That is the point Bridgewater Associates founder Ray Dalio tried to drive home on Tuesday during an interview on CNBC at the World Economic Forum in Davos, Switzerland.

“We are in this Goldilocks period right now. Inflation isn’t a problem. Growth is good, everything is pretty good with a big jolt of stimulation coming from changes in tax laws,” Dalio said, referring to the health of the U.S. market as well as what he sees as an improving global economic climate.

Dalio said corporate tax cuts in the U.S. are expected to deliver a further jolt to economy and stock market entering its ninth year.

The prominent investor, who runs the largest hedge fund in the world with about $150 billion in assets, says a “blowoff rally”, or melt-up as some refer to it, in which investors begin to rush into equities for fear of missing out on gains, will take the Dow Jones Industrial Average DJIA, -0.87% , the S&P 500 index SPX, -1.11% and the Nasdaq Composite Index COMP, -1.07% to ever-new heights.

Against that backdrop, Dalio says hanging on to cash, rather than investing in risk assets, like stocks, may be a misguided strategy that could cost investors.

“ ‘If you’re holding cash, you’re going to feel pretty stupid.’ ” — Ray Dalio, Bridgewater Associates founder

However, one thing that could rattle market optimism: The Federal Reserve’s plans to raise rates three times this year.

“You can’t have a significant rise in interest rates without knocking over the whole asset markets,” the hedge-fund manager. He said the Fed will need to figure out the optimal level for real interest rates.

Worth a read: Stock markets don’t need a ‘trigger’ to correct, says Robert Shiller

Check out the CNBC interview here: