Containers sit stacked next to gantry cranes at the Yangshan Deep Water Port in Shanghai. (Qilai Shen/Bloomberg News)

President Trump fired a flurry of verbal broadsides against economic rivals Friday, but U.S. stock markets were indifferent.

“It’s Trump headline fatigue,” said Jeff DeMaso, director of research at Adviser Investments, a Boston fund with $5.5 billion under management. “It’s late in the week, it’s summer days, and people are just fatigued on a long week of headlines, whether it was Russia, tariffs and now the Fed.”

The president’s first volley Friday was fired against China during an interview with CNBC recorded Thursday and broadcast on “Squawk Box” Friday morning. Trump threatened to place tariffs on every dollar of the $505 billion in Chinese goods imported by the United States.

Trump then spun off several tweets accusing China and the European Union with manipulating their currencies. He also repeatedly poked the Federal Reserve on TV and Twitter, criticizing the independent U.S. central bank for raising interest rates.

“China, the European Union and others have been manipulating their currencies and interest rates lower, while the U.S. is raising rates while the dollars gets stronger and stronger with each passing day — taking away our big competitive edge,” Trump complained in one tweet.

“As usual, not a level playing field,” he continued. “The United States should not be penalized because we are doing so well. Tightening now hurts all that we have done. The U.S. should be allowed to recapture what was lost due to illegal currency manipulation and BAD Trade Deals. Debt coming due & we are raising rates — Really?”

Yet through it all, markets traded happily along, staying close to the flatline and pretty much ignoring the president’s jawboning. Stocks were poised to end the week about where they started Monday. The Dow Jones industrial average, the Standard & Poor’s 500-stock index and the tech-heavy Nasdaq composite index were all pretty much flatlining through Friday trading. The Dow was down 0.03 percent to finish at 25,058.12. The S&P 500 dropped 0.1 percent, as did the Nasdaq.

The dollar slid against the British pound and the euro after Trump’s comments on the Fed. Crude oil prices rose, and the closely watched 10-year U.S. Treasury bond finished down at 2.89 percent.

Part of the reason for the market’s relative calm has to do with corporate performance. About 10 percent of the S&P companies have reported earnings, and 95 percent have beaten estimates. The market fundamentals of strong earnings and a growing economy have been consistent.

The Dow was led by tech giant Microsoft, which closed up nearly 2 percent after reporting quarterly profits Thursday that beat estimates. The company for the first time reported annual sales above $100 billion.

“Market behavior over recent decades has taught us to ignore politics and political statements.” said Chris Brightman, chief investment officer of Research Affiliates, an institutional investor with more than $200 billion under management.

Trump’s threat to dramatically ramp up tariffs on China came during an interview with “Squawk Box” co-anchor Joe Kernen. “I’m ready to go to 500,” Trump said, referring to the $505 billion in Chinese imports to the United States last year.

Earlier this month, the United States levied tariffs on $34 billion worth of Chinese goods, prompting retaliation from China that has hit U.S. farmers particularly hard, including in states that Trump won in the 2016 election.

Trump has approved levies on an additional $16 billion in Chinese products.

“Look, I’m not doing this for politics,” Trump said in the interview. “I’m doing this to do the right thing for our country. We have been ripped off by China for a long time.”

Asked about the prospect of a stock market plunge in response to larger-scale tariffs, Trump said: “Well, if it does, it does.”

Trump said he and Chinese President Xi Jinping maintain a good relationship despite the growing dispute over trade.

The president’s comments Friday echoed a threat he made while talking to reporters on Air Force One two weeks ago as the first round of tariffs took effect.

Trump’s tariff policy has drawn criticism from some prominent lawmakers, including some in his own party. Earlier this week, Sen. Orrin G. Hatch (R-Utah) — a staunch Trump ally on many other issues — delivered a speech on the Senate floor threatening to move ahead with legislation that would rein in Trump’s trade authority.

David J. Lynch contributed to this report.