The tariff tit-for-tat between the U.S. and China might be over soon, and it would be a good sign for the stock market, says J.P. Morgan's chief global strategist, David Kelly.

"I think we're eventually going to see a trade war cease-fire before Election Day," Kelly told CNBC's "Squawk on the Street." "If you think about the politics of this, we really don't want to go into Election Day with just having imposed $200 billion of tariffs on Chinese goods."

The uncertainty over the effect of future tariffs is holding markets back, Kelly added, saying even a cosmetic deal between the worlds' largest economic powers would lift stocks. Kelly said he expects company earnings will be up about 27 percent for the third fiscal quarter of 2018 compared with the same period last year, but that gains would be hampered by escalating tariffs.

Still, Kelly said the U.S. economy is strong at the moment, with 5 percent real GDP growth at an annual rate in the second quarter of 2018 and unemployment claims close to 200,000.

Kelly predicts that if the economy slows down as a result of a continued trade war the Democrats will gain a congressional majority this November, ultimately placing checks on future tariffs.