To put it mildly, 2016 was an odd year. With Brexit and Trump’s presidential nomination, there were political upheavals that were fully unexpected. What’s more, these upheavals were expected to cause stock declines. The opposite happened.

Brexit’s impact on equities has been interesting. The initial decline lasted just a couple of days and quickly reversed. However, the pain was still felt in the United Kingdom, where a weakening currency has meant higher prices on imports and lower purchasing power for British consumers. That may be offset, however, by higher imports, tourism, and foreign investment into the country driven by a cheaper pound. In fact, a recent study showed private investment was soaring and was a strong contributor to GDP growth in the U.K. Could Brexit’s hit on the British pound actually paradoxically increase foreign investment into the U.K. and end its notorious trade imbalance with the rest of the world?

The case of Brexit’s strange fall and swift recovery, as well as possible upsides that are the exact opposite of the intuitive result that just “makes sense” demonstrates two things. Firstly, punditry and dire warnings of immediate dire consequences from Remain supporters, mainstream politicians, and economic think-tanks can backfire. Now many of these soothsayers have had to backtrack and qualify their initial warnings, when they should have had more nuanced and subtle warnings to start with.

Secondly and more importantly, Brexit teaches us that financial markets are complicated and counterintuitive. What happened in the wake of the Brexit vote and the encouraging economic data afterwards suggests that, sometimes, Cause A can have Effect C when you’re really expecting Effect B because of Contingencies 1, 2, and 3. Finance is deeply interconnected and often counterintuitive (try to explain negative interest rates, for instance), but it also has its own internal logic and makes sense (if it didn’t, someone would take advantage of that nonsense and make a huge profit). Sometimes to really understand the effect of Cause A, you need to spend a lot of time studying Contingencies 1, 2, 3, and so on. This is the constant struggle—and joy—of working in finance.

That brings us to Trump’s win. Trump’s victory was supposed to be a colossal financial calamity. This was the warning of several investment bank analysts, academic economists, and casual pundits. Even Trump supporters would need to concede the logic of such an expectation; Trump’s plans to completely upend the laws of international commerce and domestic policy are unprecedented, and markets do not like unprecedented developments. Trump himself dismissed these fears and promised a rally after his victory. Few expected this to happen, but it did.

Why did it happen? For one, markets tend to breathe a sigh of relief after presidential elections. But that doesn’t mean a strong surge—not always. However, Trump’s pro-inflationary policy plans, combined with the inflation-desperate Federal Reserve, mean higher prices are almost inevitable. For everything, including stocks. Higher prices will mean higher revenue and earnings figures as well higher prices for those revenues and earnings. This doesn’t mean the recent stock rally represents confidence in Trump or his policies, and many analysts have already warned the long-term consequences of a potential trade war are horrifying. But that doesn’t mean stocks will or should collapse anytime soon.

The biggest winners in Trump’s victory were the financial firms themselves. Trump has promised deregulation and infrastructure spending. Both will increase banking activity and improve banking margins. Goldman Sachs (GS) ended the year as one of the Dow Jones’s top performers: up 33%. J.P. Morgan (JPM) followed at 31%. The S&P 500 ended up almost 10%—a great performance, slightly above average, and not too high as to signal overbought conditions.

Other metrics are more dire. The S&P 500 P/E ratio is now 26. Sales growth for 2016 was barely positive. Income growth remains low, and Trump’s economic policies remain uncertain. Labor participation is still poor. Higher interest rates will be a drag on the economy, and the Fed has suggested we’ll see 3 in the coming year. Some believe we’ll have more. This means there are many reasons to be cautious, and look closely at what to do next.

Such a situation is reminiscent of the beginning of 2014. After the 30% S&P jump in 2013, the S&P’s P/E ratio was high and many worried that a QE-driven bubble was forming. Those who abandoned the market lost 22% price gains over the next 3 years, or roughly the market’s long-run average. Those who shorted the market lost money. Caution, then, is good, but overcautious fear can cost money.

That is a healthy perspective to bring to 2017, and all the more reason to put our heads down, do our due diligence, and find great stocks for the new year.