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."

More from Investing

Dave & Buster's Weakness in Same-Store Sales Hits Shareholders

Dave & Buster's Weakness in Same-Store Sales Hits Shareholders

The Final Barrier for One Last Bull Market High

The Final Barrier for One Last Bull Market High

Wednesday Wrap-Up: Roku Rebounds, Tesla Ships

Wednesday Wrap-Up: Roku Rebounds, Tesla Ships

Interest Rates: Definition, Types and Why They're So Important

Interest Rates: Definition, Types and Why They're So Important

Today's Market Action Can Be Summed Up as Nervous and Uncertain

Today's Market Action Can Be Summed Up as Nervous and Uncertain