Oct. 19, 1987, was one of the worst days in stock market history. Thirty years later, it would be comforting to believe it couldn’t happen again.

Yet that’s true only in the narrowest sense: Regulatory and technological change has made an exact repeat of that terrible day impossible. We are still at risk, however, because fundamentally, that market crash was a mass stampede set off through viral contagion.

That kind of panic can certainly happen again.

I base this sobering conclusion on my own research. (I won a Nobel Memorial Prize in Economic Sciences in 2013, partly for my work on the market impact of social psychology.) I sent out thousands of questionnaires to investors within four days of the 1987 crash, motivated by the belief that we will never understand such events unless we ask people for the reasons for their actions, and for the thoughts and emotions associated with them.

From this perspective, I believe a rough analogy for that 1987 market collapse can be found in another event — the panic of Aug. 28, 2016, at Los Angeles International Airport, when people believed erroneously that they were in grave danger. False reports of gunfire at the airport — in an era in which shootings in large crowds had already occurred — set some people running for the exits. Once the panic began, others ran, too.