This could be a “big day” for the stock market, President Donald Trump tweeted on December 4. The next day, the S&P 500 posted its first three-day losing streak since August. On December 19, both the House and Senate voted to pass the much-hyped, allegedly stock-boosting Republican tax plan. That day and the next, stocks slid.

It’s not that Trump is particularly bad at predicting what’s going to happen in the markets — it’s that the markets are notoriously hard to predict. Hedge funds that get paid millions of dollars to make rich people even more money underperform the S&P 500 all the time. Before the 2016 election, there were plenty of predictions that a Trump victory would herald a major stock market correction and a global economic recession.

And yet the past year proved once again just how tricky predictions can be. More than a year after the 2016 election, the markets are humming along just fine, even if they’re not spectacular. The S&P 500 climbed about 19 percent in 2017, and the Dow Jones Industrial Average surpassed multiple 1,000-point markers. The unemployment rate is 4.1 percent, the lowest in 17 years and down from 4.8 percent at the start of the year. (To be sure, much of this can be attributed to the Obama economy.) This hasn’t been the best year ever for stocks, but it’s been pretty good. And spirits on Wall Street are high.

I spoke with six market analysts and experts about how they viewed investing in 2017 through the lens of politics and Trump.

The takeaway: Investors have learned to traverse the new landscape, both because of Trump and in spite of him.

“The markets are happy. Stock prices are at record highs, credit spreads are narrow, cap rates in the real estate market are thin, you have Bitcoin and Ethereum going skyward,” said Moody’s Analytics chief economist Mark Zandi. “A big chunk of that is that the entire global economy is growing for the first time in a decade. Markets are strong everywhere, not just here.”

The markets got really excited about Trump for a while, then things sort of fizzled out

Global markets nosedived the evening of the 2016 election as it became clear that Trump, and not Hillary Clinton, would win. But by the time of Trump’s victory speech in the early morning hours of November 9, things had begun to turn around, and when the US markets opened the next day, stocks climbed higher.

Investors had apparently decided a President Trump might not be all that bad — he had campaigned on a trillion-dollar infrastructure proposal, and Republicans being in control of the House, Senate and White House, they reasoned, would likely lead to tax cuts and deregulation. And as for the headline risks of Trump’s unpredictable nature and, of course, the tweets, he had said he’d reduce the Twitter activity and act more presidential once in the Oval Office.

Stocks rallied from there. The Dow Jones Industrial Average hit the 20,000 mark for the first time five days after Trump’s inauguration. Small-cap stocks, generally considered to be the best marker of tax cut expectations because usually they pay higher effective tax rates than larger companies, rallied into mid-February.

“The effective tax rate over the last five years [for small caps] is about 33 percent, so if you go from 33 percent to 20, that’s a pretty big boost,” said Steven DeSanctis, a small-cap analyst at the investment bank and research firm Jefferies.

Large-caps took off too.

But as the GOP’s agenda began to falter, and by the late winter and early spring it became clear that the repeal and replacement of Obamacare — which Republicans had set out to tackle before taxes — would be difficult, optimism on Wall Street fizzled as well. When Sen. John McCain (R-AZ) cast his now-famous thumbs-down vote on GOP health care efforts in late July, pessimism weighed even more, and in August, it was hard to find anyone in the professional investment community who thought a tax bill was even close to a sure thing. Bond yields gave back their gains by midyear as well.

US stocks have largely rebounded since — something President Trump often likes to brag about.

“The market was expecting Trump to be stimulating the economy through tax cuts and infrastructure spending,” said Sam Stovall, chief investment strategist at the investment research firm CFRA Research. “That acted like a carrot that continued to lead investors forward in anticipation of the eventual passage.”

The infrastructure bill never materialized — one of the ways Trump has governed more like a traditional, tax- and regulation-cutting Republican than many expected a year ago. But the tax cuts did.

“The markets are still taking time to digest, a) what’s in the tax plan, and b) what kind of impact it’s going to have,” said Aaron Kohli, a fixed-income strategist at BMO Capital Markets. “All of these questions are unknown.”

Investors are no longer clamoring for big tech growth stocks, such as Facebook, Apple, and Google, and instead appear happy to invest in value stocks in areas like industrials, financials, and telecommunications, Jack Ablin, chief investment officer at BMO Private Bank in Chicago, explained. “That signals to me that investors are becoming more bullish on the economy,” he said.

Part of the markets acclimating to Trump has been learning to brush off him off

In the early days after the election, Trump’s habit of singling out companies on Twitter for criticism led to speculation that he might send markets haywire. After all, a tweet from then-Democratic presidential candidate Hillary Clinton about price gouging in the drug market sent biotech stocks tanking in September 2015.

Price gouging like this in the specialty drug market is outrageous. Tomorrow I'll lay out a plan to take it on. -H https://t.co/9Z0Aw7aI6h — Hillary Clinton (@HillaryClinton) September 21, 2015

Nothing Trump has tweeted has wielded such power. The stock prices of the companies he’s attacked on Twitter — Lockheed Martin, Ford, United Technologies (which owns Carrier) — have done just fine. Amazon’s stock price slid on Friday, the last trading day of the year, after Trump tweeted that it’s ripping off the US Postal Service. But he tweeted about the company multiple times in 2017, and its price ended the year up more than 55 percent.

“Investors have largely ignored the things that we all focus on day to day, the tweets and the headlines and everything else, and this has been a back-to-basics market,” said Nick Colas, co-founder of DataTrek Research, a market insight and research firm in New York.

In fact, market volatility has been historically low under Trump.

That’s not to say Trump has had no impact. Health care stocks declined when he signed an executive order to end Obamacare subsidies. Stocks fell at the start of December when ABC News erroneously reported that former National Security Adviser Michael Flynn was prepared to testify that Trump as a candidate has directed him to contact Russians, though by the end of the day they largely recovered.

The S&P 500’s worst day under the Trump presidency was May 17, 2017, the day after the New York Times reported a memo from ousted FBI Director James Comey revealing that Trump had asked him to scrap a federal investigation into Flynn.

Trump’s saber rattling with North Korean leader Kim Jong Un has shaken global markets somewhat, but it hasn’t caused an all-out panic.

The Wall Street Journal in August spoke with a South Korean trader who provided perhaps the best insight into why: “If war breaks out with North Korea and they fire a nuclear weapon, it becomes a matter of life or death, and at that point, what happens in the stock market is meaningless.”

It’s the (global) economy, stupid

While not doing hedge fund manager-level well, many Americans are better off as well. US household income is up for the second straight year, and unemployment is at record lows.

There is no doubt US markets and the economy are doing well, but that’s also true for the rest of the world. In fact, in many places, it’s going better.

As Vox’s Matt Yglesias recently pointed out, the German and Japanese stock markets have outperformed the American market in 2017, and stocks in the United Kingdom, Canada, South Korea, Taiwan, and elsewhere are also hitting all-time highs.

The US unemployment rate is the lowest in more than 17 years, but Japan’s is the lowest in more than 20, and the UK and Germany are the lowest since the 1970s.

“It’s just the general strength of the economy, and that matters more by a good margin,” Zandi said.

Through the lens of American history, the US stock market is doing well — but not unprecedentedly spectacularly.

The actual best year for stocks, per NYU’s Stern school of Business, was 1954 when the S&P 500 rose 52.56 percent, Yglesias recently noted. In 1933 the benchmark index gained 49.98 percent, and in 1935 it rallied 46.74 percent. In 2009 under President Obama, the S&P climbed 25.94 percent, and in 2013, also under Obama, it gained 32.15 percent.

In 2017, the S&P gained about 19 percent. Still, Trump should be careful about taking credit: If and when it goes down, he’s going to be in trouble.