The stock market rally seems to have already priced in bad economic data and rising tensions both domestic and abroad, but there are still plenty of investing opportunities out there as long as you are smart about it.

The economy is a shambles (but recovering), there’s civil unrest as hundreds of thousands take to the streets protesting police brutality and racism, and tensions between the U.S. and China continue to simmer. But the U.S. stock market ignores it all and continues to climb.

CNBC’s Jim Cramer tried to explain some of this market phenomenon Tuesday morning on his “Mad Money” program.

“At the end of the day, the market has no conscience,” Cramer said. “Investors are simply trying to make money, and that’s why they’re crowding into the stay-at-home economy stocks.”

Banyan Hill Publishing’s Jeff Yastine doesn’t think Cramer is quite on the money, though, and instead sees the rally breaking off into other market sectors.

Jeff Yastine stock market rally

Banyan Hill’s Jeff Yastine

“The rally has been steadily broadening as the weeks have rolled by,” said Yastine, Editor of Total Wealth Insider and Profit Line. “We got an early glimpse of that back in late April when the small-cap stocks in the Russell 2000 suddenly started to outperform the ones in the S&P 500. Since the stock market’s bottom in mid-March, the small-caps are up 41%, while the S&P 500 is up 36%.

“So that’s where the money is going — out of the big companies, which everyone already owns and where growth is limited by a still weak economy — and into small companies where there are still good prospects for rapid profit growth.”

U.S. stock market indexes have rocketed back off March 23’s lows. By Tuesday morning the S&P 500 and Dow Jones Industrial Average had gained at least 36%, while the Nasdaq composite, driven by the tech sector, had gained over 39%.

Year to date through Monday, the Nasdaq is up 10.1% while the S&P 500 is down 5.3% and the Dow 10.6%.

Yastine is still bullish, thanks in part to stimulus from the Federal Reserve and federal government. He also thinks investors shouldn’t focus on the bad headlines, but rather on the recovery because markets have already priced in data like record unemployment.

As I noted to Money & Markets readers on May 20, I continue to believe we’ll soon see new all-time highs in the market before the end of the summer,” Yastine said.

Tech stocks in particular have enjoyed the boom as investors bet on companies that have thrived during the coronavirus lockdown. But now there are opportunities elsewhere as the economy opens again and markets have reflected a rotation back into sectors that were beaten down as consumers sheltered in place.

Be Careful When Looking for Opportunities in This Stock Market Rally

While Yastine thinks the rally has plenty of steam left, he also has a word of warning for anyone getting into the stock market now, saying they must be careful when looking for opportunities.

“The main reason NOT to be bullish is mainly that the market has already come very far, very fast,” Yastine wrote via email. “A lot of the cheapest, obvious stocks are up double- and even triple-digits. So the danger for any investor is being drawn in by the momentum — and (if you’re buying the wrong kinds of stocks) — being the person left holding the bag when another shift happens in the stock market.”

Good news on the economic front that sends the stock market even higher could be just what some professional investors are looking for, Yastine argues.

“If I’m correct and we soon see news headlines about ‘new stock market highs’ and improving post-virus economic data, that could be just the signal that pro-Wall Street traders need to quietly sell out of many of their positions and move to the sidelines,” Yastine said. “They made their profits already. So anyone who’s just starting to buy now needs to understand they will have to own those stocks for a number of quarters before seeing substantial profits. The biggest ones have already been made at this point.”

Yastine, in a recent YouTube video alongside Automatic Fortunes Editor Ian King, said there is still plenty of investing opportunities to get into this rally.

Check out the full video below, and make sure to subscribe to the Smart Profits Daily YouTube channel to get more insights from Yastine and his investing peers are Banyan Hill Publishing.

Also, be sure to check out Yastine’s Total Wealth Insider, where he and his team hunt down under-priced and “transformative” companies that are adapting and set to thrive in the digital age.