U.S. airstrikes in Iraq have killed one of Iran’s most powerful generals, striking fear into the geopolitical realm. No one knows what exactly this means at the moment, but there is fear of escalating tensions in the Middle East, along with the potential for retaliation and further conflict.
Markets reacted accordingly as oil and gold prices shot up while the stock market fell and interest rates declined. Market prognosticators have an old rule of thumb that investors hate uncertainty more than anything, and there are few situations more uncertain than the threat of war.
But markets don’t always care about rules of thumb, and uncertain situations don’t always play out in stocks as many would have you assume. The relationship between geopolitical crises and market outcomes isn’t as simple as it seems.
In the six months following the onset of World War I in 1914, the Dow fell more than 30%. Because the war basically ground the business world to a halt and market liquidity all but dried up, the decision was made to close the stock market that year. This lasted for six months, the longest such period on record. Making up for lost time, the Dow rose more than 88% in 1915 after it reopened, which remains the highest annual return on record for the DJIA. In fact, from the start of the war in 1914 until the war ended in late 1918, the Dow was up more than 43% in total or around 8.7% annually.
World War II had a similarly counterintuitive market outcome. Hitler invaded Poland on September 1, 1939, setting off the war. When the market opened on September 5, the Dow shot almost 10% higher that day. When the attack on the U.S. naval base at Pearl Harbor occurred in early December 1941, stocks opened up the following Monday down 2.9%, but it took just a month to regain those losses. When the allied forces invaded France on D-Day on June 6, 1944, the stock market barely noticed. The Dow rose more than 5% over the ensuing month.
From the start of WWII in 1939 until it ended in late 1945, the Dow was up a total of 50%, more than 7% per year.
So, during two of the worst wars in modern history, the U.S. stock market was up a combined 115%.
The Korean War began in the summer of 1950 when North Korea invaded the South. That conflict ended in the summer of 1953. In that time, the Dow was up an annualized 16%, or almost 60% in total.
U.S. troops were sent to Vietnam in March of 1965. The Dow would finish the remainder of that year up almost 10%. By the time the last of the U.S. troops were pulled out of Vietnam in 1973, the stock market was up a total of almost 43% in that time, or just under 5% per year.
The Cuban Missile Crisis had the world on the brink of nuclear war in October of 1962 when the U.S. faced a standoff against Russia. The confrontation lasted 13 days. In that two-week period, the Dow remained surprisingly calm, losing just 1.2%. For the remainder of that year, the Dow would gain more than 10%. Veteran trader Art Cashin tells the following story about the advice he received from a seasoned trader during the Cuban Missle Crisis as he was worried about the impact on stocks:
Jack said – “Look kid, if you hear the missiles are flying, you buy them. You don’t sell them.”
“You buy them?” I said, somewhat puzzled.
“Sure you buy them!” said Jack. “Cause if you’re wrong, the trade will never clear. We’ll all be dead.”
The terrorist attack on U.S. soil on Sept. 11, 2001 saw stocks fall sharply, down almost 15% in less than two weeks following the tragedy. The economy was already in the middle of a recession at that point, and stocks were in a free fall from the bursting of the dot-com bubble. But within a couple of months, the stock market had made back all of the losses that occurred in the aftermath of 9/11.
The U.S. invaded Iraq in March 2003. Stocks rose 2.3% the following day and finished up the year with a gain of more than 30% from that point on. Although it is important to note these gains were coming off the brutal 2000-2002 bear market.
The point here is the market’s reaction to war and geopolitical crises can be counterintuitive. It’s always difficult to know how investors will react to certain events because so much of the market’s reaction to these events is context dependent.
I have no idea what this Iran conflict will mean for the world at large, but even if you knew exactly what the headlines would be in the coming months on this issue, it probably wouldn’t help you from an investing perspective. Markets don’t always respond to geopolitical events the way you think.
Ben Carlson, CFA is the Director of Institutional Asset Management at Ritholtz Wealth Management. He may own securities or assets mentioned in this piece.
More must-read stories from Fortune:
—2020 Crystal Ball: Predictions for the economy, politics, technology, etc.
—Why you actually may want to buy “bears” in a bull market
—5 CEO exits that sum up the memorable business year that was 2019
—What a $1,000 investment in 10 top stocks a decade ago would be worth today
—Apple’s stock soared 89% in 2019, highlighting the company’s resilience
Don’t miss the Term Sheet, Fortune’s newsletter on deals and dealmakers.