Looking for a reason why the market's been so bumpy this year? Blame Trump. Looking for a reason why the market has held up so well this year? Blame Trump.

There's been a overriding paradox this year for investors: President Donald Trump has been both a blessing and a curse, goosing stocks through tax cuts and vexing the market with a seemingly endless stream of gut-churning headlines.

"We don't recall a President who has been simultaneously so bullish and bearish for stocks," Ed Yardeni, head of Yardeni Research, told clients in a note earlier this week. "That might explain why the S&P 500 has been zigging and zagging since the start of this year."

Actually, the market's done pretty well for itself lately.

After a wickedly volatile first quarter that saw major averages foray into correction territory, stocks have bounced back nicely. The is now up 4 percent for the year, thanks to a nearly 8 percent jump since early April, and the Dow industrials have posted a 1.8 percent increase.

Tech stocks continue to lead the market, with the Nasdaq surging 12.4 percent.

Yardeni, an economist and market strategist, said actions and policies specific to Trump can be tied to the market's ups and downs. He cited a J.P. Morgan report that looked at market behavior and determined that tariff threats by the administration had held stocks back by 4.5 percent since March, resulting in a $1.25 trillion slice in market cap.

"I guess we can blame Trump for that loss thanks to his protectionist saber-rattling. On the other hand, he deserves credit for enacting a HUGE corporate tax cut at the end of last year," Yardeni wrote.