By STAN CHOE

NEW YORK (AP) — Markets can’t ignore Washington politics any longer.

Last year, investors calmly brushed aside every surprise that came out of Capitol Hill or the White House. Whether it was President Donald Trump barring the arrival of travelers from certain countries, firing his FBI director or trying repeatedly to overhaul the health care industry, nothing seemed to knock markets off their steady, record-setting course that lasted through 2017.

Now, though, markets are moving sharply either in anticipation of policy changes or upon their announcement. Stocks recently have zoomed up and down on speculation about whether Trump’s decision to impose tariffs on imported steel will lead to a global trade war. Late last year, Washington approved big tax cuts for businesses, and investors sent stocks surging.

The difference is that Trump’s actions are now aiming at what the market cares most about: corporate profits.

“The politics that matter for the market are the ones that impact the fundamentals,” said Stephen Auth, chief investment officer of equities for Federated Investors. “Which politics have moved the market? The tax deal, and now the tariffs. The other stuff tends to be noise.”

It’s easy to see how the tax cuts will affect corporate earnings: Lower tax bills will mean bigger profits, and investors hope the overhaul will encourage companies to spend more to expand their businesses, which would drive future growth. Analysts now expect S&P 500 earnings to grow 18 percent this year, up from a forecast of 12 percent a few months ago, according to FactSet.

A possible trade war could have just as strong an effect for U.S. companies, but in the opposite direction. Big U.S. businesses have become reliant on overseas customers, from Apple, which gets 63 percent of its revenue from outside the United States, to Zoetis, an animal-health company that gets just over half from abroad.

If other countries retaliate against the U.S. tariffs, escalating barriers to trade could hurt economies around the world through higher prices and slower growth.

Add in the high emotions Trump generates, and big swings in the market can quickly result. The S&P 500 plunged 1.1 percent the day Trump first mentioned the possibility of steel and aluminum tariffs to industry executives, only to recover and then plunge again in ensuing days as speculation swirled.

“Right now, half the country thinks that the president is a lunatic, and they have very little confidence in his rational approach to issues, so they are worried about politics as an issue,” said Auth.

Auth believes a global trade war is unlikely, although he won’t rule it out. So he viewed the market’s recent drop as an opportunity to buy at lower prices at a time when the economy is continuing to grow and corporate profits keep piling higher.

It may take a while to see if the worries about a global trade war were prescient, as other countries mull their options. Trump has already exempted Canada and Mexico from the tariffs and said he will be “very flexible.”

If the fears stay in the foreground, they will likely be a dominant force for the market. If the trade-war talk dies down, though, the Federal Reserve and the threat of higher interest rates will likely return to the top of the list of investors’ concerns.

Fear of a more aggressive Fed first jolted markets from their pleasant ride at the start of February, when worries about higher inflation pushed investors to ratchet up their expectations for Fed rate increases this year. That fear has abated somewhat with recent government reports showing only modest growth in wages and consumer prices, signals that inflation remains under control for now.

“It’s really a horse race between the President and the Fed in terms of what’s important and when,” said Brian Jacobsen, senior investment strategist at Wells Fargo Asset Management.

On Tuesday, the president gave the markets more to digest with the firing of Secretary of State Rex Tillerson and his decision to block Singapore-based chipmaker Broadcom’s takeover of U.S. rival Qualcomm, citing national security issues.

The market’s reaction to Tillerson was muted, certainly not as dramatic as the drop that immediately followed the resignation of National Economic Adviser Gary Cohn, who failed to get Trump to reconsider the tariffs. That may be because investors see Tillerson as having a smaller effect on the economy, and specifically on corporate profits.

The decision to halt Broadcom’s efforts to buy Qualcomm had more measurable impact. Qualcomm shares tanked, and analysts raised concerns that other attempts by foreign companies to buy U.S. technology companies could meet the same fate.