The U.S.-Iran war drags on with no sign yet of a peace deal. Someone needs to tell the stock market.

After a small early drawdown near the outset of the war, the S&P 500 has rebounded to all-time highs, closing above 7,400 on Monday for the first time ever even as oil prices remain at elevated levels.

Some say the equity market is ignoring the coming impact of the war, fueled by speculative activity. But it’s more than that.

There are very real fundamental reasons for the comeback, including an economy much less reliant on oil to power it, strong company margins with energy costs as just a small input and tech companies whose businesses are insulated from the impact powering S&P 500 earnings forward.

The index has made short work of recovering from its March low, having rebounded roughly 17% from around 6,300 in just a little over a month.