That said, there are plenty of exceptions to these general statements.

Many individuals and institutions have made tons of money through short-term trading during regular trading hours, even if investors over all have not. Furthermore, the steadily rising stock market in the 12 months through January has been better in the daytime than it has been historically — posting gains in the SPY during regular trading hours of 9.2 percent. Still, the overnight gains have been much better: 13.4 percent over the same period. The gap in returns has endured.

Why it has done so is the subject of speculation. “We’ve got hypotheses,” said Michael Kelly, a finance professor at Lafayette College, who has studied the issue. “But we don’t really know why it happens.”

One possibility, he said, is that frequent traders laboring under the “illusion of control” believe that they can respond easily to information and events during the day but can’t do so as easily after hours, when there are far fewer market participants and less money, or “liquidity,” involved in trading. “People may be inclined to sell at the market close so they can feel in control of their money overnight,” he said.

There is some evidence that smaller traders are prey to this tendency and tend to sell late in the day — and that some big institutional traders, who are well aware of the day-night gap, tend instead to buy at the close and sell at the open.

Because relatively few people actually trade after the market closes, orders tend to build up overnight, and in a rising market, that will produce an upward price surge when the market opens. But during extended declines, overnight sell orders may cause prices to plummet when the market opens.

If there were no trading costs — possible in a thought experiment but not in the real world — an excellent strategy over the last few decades would have been buying shares at the last possible moment during regular trading hours and selling them methodically at the opening bell every day, Professor Gulen of Purdue said.

While transaction costs make that strategy uneconomical, he said, the concept may still have a certain value. “If you do know that you are going to make a trade on a given day, and you have the ability to choose when you do it, you might be able to take advantage of this pattern — buying late in the day and selling early.” Of course, the pattern doesn’t hold every single day, and you could easily be disappointed.