NEW YORK -- The stock market is waiting for the presidential election as much as anyone.

The U.S. stock market struggled for direction Monday. All three major indexes waffled between gains and losses before closing slightly higher. Investors were underwhelmed by earnings reports from toymaker Hasbro, clothing maker VF Corp., regional bank SunTrust and other companies.

The overhang of the November election didn't help. Investors are wary of making big moves before they know who's going to be the next president.

"They need to know the playing field before they get out there and play," said Jeff Savage, regional chief investment officer for Wells Fargo in Portland, Ore.

David Katz, principal and senior portfolio strategist at WeiserMazars Wealth Advisors in New York, said it matters more that the election is wrapped up than who is elected. "One could say the markets will rally stronger if the Republican candidate becomes president," Katz said. "But one way or another, the markets will have direction, and the markets like direction."

The Dow Jones industrial average ended virtually flat. It inched up 2.38 points, or 0.02 percent, to close at 13,345.89. A late rise erased a 108-point deficit in the Dow.

The Standard & Poor's 500 index was also little changed, edging up 0.62 point to 1,433.81. The Nasdaq composite index rose 11.34 to 3,016.96.

An economic report due Friday also has the markets in a holding pattern. That's when the government is supposed to report how much the U.S. economy grew in the third quarter. But already, company reports are signaling that consumers, who drive the bulk of economic growth, are far from healed.

The toymaker Hasbro said that sales for boys' products and preschool toys weakened. The stock slipped 66 cents to $38.39. Clothing maker VF Corp., whose brands include Timberland and Wrangler, missed analysts' revenue estimates. The stock slid $7.31, hitting $159.46.

SunTrust Banks also slipped. Its third-quarter earnings jumped, but that was largely because the bank sold shares it owned in Coca-Cola. The Atlanta-based bank wrestled with higher expenses as well as low interest rates, which can crimp the profit banks make from lending out money. The stock lost 96 cents to $27.67.

Last week, Microsoft, General Electric and McDonald's also reported third-quarter results that disappointed the market. To be fair, most companies are reporting better-than-expected profits. But investors want to know how companies are faring on revenue. Revenue can give a more accurate picture of performance, because profits can vary widely on items such as accounting charges and cost-cutting.