Black Monday. Although the event to which those two words refer occurred 30 years ago, they still carry the weight of that day—Oct. 19, 1987—when the Dow Jones Industrial Average shed nearly a quarter of its value in wave after wave of selling.

No one in living memory had seen anything like it, at least not in the U.S., and in the postmortems conducted to understand just how the Dow managed to drop 508 points in one day, experts found a culprit: so-called portfolio insurance, a quantitative tool designed to use futures contracts to protect against market losses. Instead, it created a poisonous feedback loop, as automated selling begat more of the same.

Since that day, markets have rallied and markets have tumbled, and still we marvel at the unintended consequences of what, in hindsight, was an obviously misguided strategy. Yet in the ensuing years, market participants have come to rely increasingly on computers to run quantitative, rules-based systems known as algorithms to pick stocks, mitigate risk, place trades, bet on volatility, and much more—and they bear a resemblance to those blamed for Black Monday.

The proliferation of computer-driven investing has created an illusion that risk can be measured and managed. But several anomalous episodes in recent years involving sudden, severe, and seemingly inexplicable price swings suggest that the next market selloff could be exacerbated by the fact that machines are at the controls. “The system is more fragile than people suspect,” says Michael Shaoul, CEO of Marketfield Asset Management.