Stocks have been on a wild ride over the past few sessions because investor confidence isn't stable -- which means that volatility could continue, one strategist says.

"We've seen this before. The dot-com boom comes to mind, as does the housing boom of the mid-2000s," Brad McMillan, chief investment officer for Commonwealth Financial Network, wrote in a research note. "In both cases, the public mood simply took good fundamentals and drove prices well above those good fundamental levels. [But] once the confidence evaporated, so did the prices."

McMillan said that "as confidence waxes and wanes, we can expect to see prices move with it -- just as we did over the past days. When something worrisome comes up (in this case, tariffs), confidence may subside, only to bounce back as confidence returns (in this case, on the expectation that the tariffs were only a negotiating tactic)."

He added that the Dow Jones Industrial Average's big recent moves both up and down are telling investors the same thing: "Markets don't really believe in current prices."

"As prices and valuations go higher, the impact of fundamentals becomes smaller and the impact of [continued investor] confidence and certainty becomes higher," Mc Millan wrote. "The higher the price, the greater the level of confidence built in. Even small changes in that certainty can result in large changes in price."