Investors looking beyond Tuesday’s U.S. midterm elections are focusing on trade, earnings and interest rates, reflecting an expectation that economic and market trends likely will continue to play a bigger role in stocks’ direction through the end of 2018 and thereafter.

Shifts in Congress could easily swing major indexes following a whirlwind October that highlighted investor uncertainty focused on interest rates, growth expectations and trade tensions, analysts said. On Tuesday, the Dow industrials rose 173 points to 25635,...