Earlier this month, the U.S. economy was declared to officially be in a recession. Since we've been grappling with double-digit unemployment since April, the news wasn't shocking.

What is shocking, however, is the apparent disconnect between economic conditions and the stock market's performance. On March 23 -- back when COVID-19 cases were multiplying and Americans were being thrust against their will into a new normal -- the S&P 500 hit rock bottom at 2,237. On June 23, it was at 3,148. And while that's undoubtedly a good thing for investors, it's also hard not to pose the question: What gives?

A puzzling turn of events

Though recessions typically lead to lower stock values, the recession we're currently in is unique for a couple of reasons. First, it wasn't actually triggered by unfavorable economic conditions. Quite the contrary; the jobless rate was low before COVID-19 hit, and stocks were trading at a high, with the S&P 500 holding steady above 3,300 for much of February. Rather, it was the pandemic itself and the immediate shutdowns it forced that caused unemployment to skyrocket.

Professionally dressed adults grabbing falling bills.

Image source: Getty Images.

For the first time, workers were laid off left and right not due to financial constraints but due to health-related ones coupled with government orders. But that, in theory, isn't something that should've impacted stock values -- and clearly, in the end, it didn't. Sure, the stock market plummeted in March, but that crash was purely panic induced. The fact that stock values have almost fully recovered to their prepandemic levels is indicative of the fact that finances were never the problem here.

Furthermore, with most recessions, there are warning signs for months that hard times are brewing. In fact, the stock market will generally start to decline before a full-blown recession becomes evident. But that didn't happen this time around. Instead, unemployment soared overnight due to COVID-19, but by the time the stock market could fully react, the situation -- dare we say it -- began to improve.

Case in point: May's unemployment numbers were more favorable than April's (though a deeper dive into those numbers indicates that this might not actually be true), and with so many states easing restrictions, it's easy to be optimistic that the jobless rate will slowly but surely decline in the coming months.

Even if there is a second wave of COVID-19 cases, which health experts have warned of from the start, it's fair to assume that many states will be better equipped to deal with it. As such, we may have already seen the worst of things as far as stock prices go, and the rest of the economy just needs to catch up on the recovery front.

Or maybe not. It could very well be the case that the stock market bottoms out again in the coming year, whether due to the recession, COVID-19 developments, or even the general volatility an election year tends to bring. There are so many unknowns that it's hard to predict what the rest of 2020 has in store for stocks, but right now, investors should embrace the fact that somehow, against the odds, the stock market is thriving.