You might expect that the crunch of a recession would lead people to put off having kids. It sounds obvious, and conventional wisdom would be on your side. But you’d be wrong.

The truth is that people begin to conceive fewer children before major economic contractions. That relationship is counterintuitive, yet it is exactly what my colleague Robert Prechter suspected he would find 19 years ago when he charted data from the U.S. Department of Health and Human Services and Dow Jones & Co. going all the way back to 1908.

Prechter observed that conceptions tended to rise and fall with the stock market. Like the stock market, they are a leading economic indicator, sounding the alarm well before the economy contracts.

Over the past two decades, Prechter’s fellow researchers at the Socionomics Institute have found the same tendency in data from Germany, Japan and the UK. The latest study on the topic comes from outside the Institute, as a team from the National Bureau of Economic Research recently posted a working paper which confirms that declines in conceptions preceded the three most recent U.S. recessions.

Like the NBER team, Prechter recognized the economic implications of his research, writing in 1999, “the trends of the economy lag trends in both the stock market and procreation.” But why is that the case? Prechter’s socionomic theory, which motivated his research, provides an answer.

The theory proposes that trends in social mood regulate trends in social behavior, including those in conceptions, the stock market and economic growth. A positive mood prompts feelings of friskiness, daring and confidence, inspiring people in the aggregate to have more children, to send stock prices higher and to become more productive economically. A negative mood prompts feelings of somberness, defensiveness and fear, inspiring people in the aggregate to have fewer children, to send stock prices lower and to become less productive economically. Because people generally can express their friskiness in their trading accounts and in bed sooner than they can expand or contract business, trends in stocks and conceptions tend to lead trends in the economy.

Prechter’s findings, originally published in 1999, were reprinted in the 2003 book Pioneering Studies in Socionomics and updated in 2016’s The Socionomic Theory of Finance. Over the years, he has presented his research at major universities, including the University of Cambridge, the University of Oxford and MIT. Science writer John Casti covered Prechter’s study in his popular book Mood Matters, which was reviewed in both Science and Nature. The Institute’s latest research on the subject was included in the 2017 book, Socionomic Studies of Society and Culture, an Amazon #1 bestseller in social theory. And the new NBER research has been covered widely in the media. People just can’t seem to get enough research on stocks, sex and the economy. But the research is more than an intellectual curiosity. It is also useful to economists, social researchers and investors.

Prechter found that, like breadth in the stock market, conceptions have tended to diverge from the stock index’s price trend in the final wave of large bull markets, prior to the onset of recessions. At the conclusion of the 1999 study, he noted that conceptions had been falling despite a mania for stocks on Wall Street. He wrote, “the same type of trend divergence that occurred prior to previous major market tops is again in evidence from 1989 to 1999, portending a social mood reversal of like magnitude.” The dot-com collapse began the following year.

We find ourselves in a similar situation today. Births have declined as stocks have soared and the economy has grown. Millennials are delaying marriage and having fewer children. If history is any guide, the economy may soon be the entity having contractions.

Matt Lampert is the director of research at the Socionomics Institute, a think tank that uses data on social mood to understand and anticipate social trends. He’s a contributing author to Socionomic Causality in Politics, an Amazon #1 bestseller in behavioral psychology.