President Trump picked the success of the stock market as the yardstick for the success of his presidency. Since soon after his inauguration, he’s been happy to tout its successes — when things are going well. But now that the S&P 500 and the Dow are in negative territory for the year and investors appear more pessimistic about what’s ahead than in months past, he isn’t as eager to take the blame.

Trump weighed in again on what’s happening on Wall Street on Tuesday. This time it wasn’t to brag about gains but instead to acknowledge recent turmoil in the markets. He warned voters that stocks will go down if Democrats win in the midterms.

The Stock Market is up massively since the Election, but is now taking a little pause - people want to see what happens with the Midterms. If you want your Stocks to go down, I strongly suggest voting Democrat. They like the Venezuela financial model, High Taxes & Open Borders! — Donald J. Trump (@realDonaldTrump) October 30, 2018

But Trump should know the stock market is notoriously hard to predict. Like many, he’s tried and failed in the past.

On December 4, 2017, he tweeted that a “great vote” on the tax cut bill could mean “a big day” for the stock market. The next day, the S&P 500 posted its first three-day losing streak since August.

On January 3, he tweeted that the market has “tremendous upward potential,” with the Dow Jones Industrial Average “just short” of 25,000. The Dow closed trading that day at 24,923 points. It went on to surpass 26,000 this year, but it’s since given back all of its gains and then some, ending the day Tuesday at 24,875.

The tweet from Tuesday was aimed at bolstering Trump’s closing argument before the midterms. But it also suggests he might be a little nervous about the market and what’s next.

“If you live by performance, you’re going to die by performance, and President Trump has gotten in on the performance game,” Jack Ablin, the chief investment officer at the investment advisory firm Cresset Wealth, told me. “The president doesn’t control the stock market, so he probably shouldn’t be taking credit or blame.”

But since Trump has spent much of the year taking the credit, he’s trying not to be stuck with the blame.

What’s happening with the stock market

It’s impossible to pinpoint exactly what’s causing Wall Street jitters at any one point in time — the stock market is composed of millions of investors and thousands of companies, and investors aren’t always hyper-rational. But there are four big factors playing into recent turmoil: trade tensions, corporate earnings, economic growth, and the Federal Reserve.

“Think of it as a perfect storm that’s been impacting stocks, really, since the start of the month,” Kristina Hooper, the chief global market strategist at the investment management firm Invesco, told me.

First, trade: The ongoing trade tensions between the United States and China have put investors on edge. The US has already imposed tariffs on $250 billion worth of goods from China this year, and China has retaliated in kind. Bloomberg reported on Monday that if Trump’s planned meeting with Chinese President Xi Jinping at a G20 summit in Buenos Aires in November doesn’t go well, the US could add tariffs on another $257 billion of goods. The news shook stocks on Monday.

Hooper told me the trade war is becoming increasingly “tangible” in corporate earnings, with companies saying that tariffs are an issue. Fastenal, Ford, and Caterpillar are among the firms that have publicly said trade tensions are costing them money. The International Monetary Fund this month warned that the US-China trade war will slow both economies’ growth in 2019.

Second, earnings: Companies are reporting their earnings right now, and investors also appear to be worried that it’s going too well — essentially, that corporate earnings are peaking right now as companies report their third-quarter numbers, and it’s all downhill from here. “People are readjusting their earnings estimates and trying to, in a sense, figure out: Where do we go from here? How far down?” Sam Stovall, the chief investment strategist at the investment research firm CFRA Research, told me.

Third, economists are starting to get concerned about growth: Despite recent strong GDP numbers — the US clocked 4.2 percent growth in the second quarter of the year and 3.5 percent in the third quarter — some economists also worry a slowdown is coming. “There’s a lot to be thankful for in today’s economy, but I think some of it is just there’s a growing sense that it’s been propped up and our run rate is slower than what our current rate is,” Ablin said.

Finally, there’s the Federal Reserve, which has slowly but steadily been increasing interest rates this year under the watch of Chair Jerome Powell, a Trump appointee. When the Fed raises interest rates, it generally has a dampening effect on the economy, the idea being that raising rates is necessary to keep it from overheating.

Trump has made no secret of the fact that he’s not a fan of the Fed’s current actions, earlier this month saying the Central Bank had “gone crazy.” He has promised a high amount of economic growth and a booming stock market, and he doesn’t want anything jeopardizing that, including the Fed. Investors are worried about what’s next too.

“[Powell’s predecessor] Janet Yellen had been very soothing to markets. She was cautious, she was careful,” Hooper said. “Markets didn’t know what to expect with Jay Powell,” she added, saying he has been a “bit more hawkish” than Yellen and moved more aggressively.

It might also be, in part, the midterms

The 2018 midterm elections could also be playing a part in stock market jitters right now. Democrats are considered likelier than not to take back the House of Representatives, but there are no guarantees. Regardless, the idea could have investors slightly on edge — but not, as the president said, because they “like the Venezuela financial model.” Mainly, markets don’t like not knowing what will happen next.

“Because of the uncertainty associated with a new Congress and what they might do [or] might not do, that might end up being a challenge,” Stovall said.

He also disputed the conventional wisdom that Wall Street always prefers gridlock, because it means nothing that could upset markets will happen. “The worst average performance for the S&P since 1900 has come from a Republican president with a split Congress,” he said.

That doesn’t mean that there’s specific cause for alarm about the midterms’ effect on the stock market right now.

Markets have often been shaky ahead of midterms, but historically, they’ve tended to bounce back. Stovall said that in the past 18 midterm election contests, the S&P 500 rose nearly 17 percent from October 31 of the election year to the same date the following year.

“We could see a rally going into the last two months of the year. History’s on our side,” Ablin said. “Actually, we have so much low expectations among investors, we could see a positive surprise.”

To be sure, past performance is not indicative of future results. But there’s no huge need for concern that the market is worried about elections.

Trump probably shouldn’t have been bragging about the stock market

The Dow hit 20,000 for the first time just days after Trump’s inauguration in 2017, and since then, Trump has been touting it as a measure of his success. He’s bragged about the stock market adding trillions of dollars in wealth and has held up Wall Street optimism as proof that his policies and politics are delivering.

It was never a good idea.

The thing about the markets is that a lot of factors can move them — not just earnings, the Fed, or the economy, but also surprise events. And sometimes markets just go down because it’s time for a correction, or for prices to get some sort of reset.

“Whoever is president, their scorecard is not the stock market,” Hooper said. But Trump, with his constant discussion of it, has sort of turned it into his.

Back in February, the Dow saw its two biggest one-day point losses ever in the span of a week, in part because investors were starting to get nervous about interest rates rising if wages were going up. Trump tweeted that it was a “big mistake” for the markets to go down.

In the “old days,” when good news was reported, the Stock Market would go up. Today, when good news is reported, the Stock Market goes down. Big mistake, and we have so much good (great) news about the economy! — Donald J. Trump (@realDonaldTrump) February 7, 2018

A Politico calculation at the time estimated that before that, Trump had boasted about the stock market once every 35 hours. If you look at his tweets, Trump didn’t tweet the words “stock market” again until June.

If current performance is any indication, Trump may again be in for some frustration with the markets. And while what’s happening isn’t his fault (though obviously he’s contributing to trade tensions), he’s tethered himself to a force he can’t control.

“We all know that the president likes to take credit for things and likes to offload blame onto others, and I think that’s what’s being exhibited now,” Stovall said. “When the market is going up, it’s a result of his policies, and when the market is going down, it’s the Fed or something else.”

On Tuesday, Trump also tweeted a comment from a market analyst at Wells Fargo saying that the S&P 500 could reach 2,800 to 2,900 — if the Fed lays off.