Q2 was easy for investors, just buy everything that fell in Q1. Q3 it's not so simple — What to do

Despite pandemic, panic and protests, not to mention possibly the deepest recession in U.S. history, investing in the second quarter actually turned out to be not that mystifying: Just pick all the losers from the beginning of the year, plus the stay-at-home stocks that the coronavirus made popular.

It all added up to a 20% second-quarter gain for the S&P 500 despite the quickest fall into a bear market in history.

As the second half of the year starts, however, things get more complicated.

The calculus of reopening will be difficult. How strong the gains are in the economy and employment will be hard to predict and highly dependent on the path of the virus. Valuations are elevated and volatility is increasing.

It all adds up to more complicated investing puzzle ahead.

"It will be a market where managers, traders, hedge funds and portfolio managers try to carve out and create pockets of certainty amid an uncertain environment that's obviously jeopardized by the virus," said Quincy Krosby, chief market strategist at Prudential Financial. "Then there is the race for the vaccine. That is what will bring us to the other side."

A look at a few big second-half themes and how to invest around them: