Trader Michael Milano, right, works on the floor of the New York Stock Exchange, Thursday, Feb. 8, 2018. The erratic nature of the stock market continued on Friday as the Dow Jones Industrial Average rose 330 points one day after falling 1,032 points.

WASHINGTON — The stock market may be firing off warning shots to the Trump administration and Congress about their plans to blow up the size of the federal deficit.

The anxiety that has gripped the market this week appeared to escalate Thursday just as President Donald Trump and lawmakers were setting the government up for annual budget deficits that would routinely exceed $1 trillion. The higher that deficits rise, the more likely it is that interest rates will surge, too, and undercut corporate profits, stock prices, consumer spending and the overall economy.

A two-year budget accord that was forged early Friday ended a brief overnight government shutdown. But the additional spending the accord contains, coming soon after Trump signed into law sweeping tax cuts, are raising alarms about high deficits and potentially higher borrowing rates. Stocks turned choppy afterward amid fierce trading.

On Friday, the rating agency Moody’s concluded in a report that the federal government’s “balance sheet is set to deteriorate,” in large part because the tax cuts will amplify the debt pressures caused by other expenses and potentially higher interest costs.

Administration officials have downplayed the risk of simultaneously slashing taxes and boosting spending, arguing that the result will be faster growth that will then shrink the debt. But the higher deficits would come just as the Federal Reserve is on course to continue — and perhaps accelerate — the pace of its short-term rate hikes. The Fed’s rate increases will likely lead, in time, to higher borrowing rates for consumers and businesses and likely slow economic growth.

One tenet of modern economics has been that the government should run higher deficits during a recession to help the economy heal but then reduce those deficits when the economy is relatively healthy, as it is now.

The market’s plunge over the past week was initially ignited by fears of higher inflation and interest rates. But investors have also had to consider a new threat: A two-year government funding deal that would add about $300 billion to budget deficits from higher spending. The Fed might have to respond by raising rates more aggressively to counter the stimulative effect of the spending increases.

Increasing budget deficits deliver a “double whammy” to investors, said Mark Zandi, chief economist at Moody’s Analytics. “Treasury is going to be issuing a lot more bonds to finance deficit-financed tax cuts and spending increases … and the Federal Reserve will have to be more aggressive in raising interest rates” to offset the stimulus.

When a government borrows more, its increased demand for debt typically leads to higher interest rates charged on that debt.

Trading opened Friday morning with the Dow Jones Industrial Average having shed 10 percent from its January high — the definition of a market correction.

Before this week, the stock market’s steady climb deep into record territory had led Trump to boast repeatedly of its performance under his watch. Now, its sudden and steep reversal has become a source of concern.

The yield on the benchmark 10-year Treasury note, in the meantime, has been steadily rising, reaching 2.83 percent after having begun the year at barely 2.4 percent. The increased yield has reflected in large part an outlook for higher inflation. Now that the projected budget deficit for 2019 would equal possibly 5 percent of the economy — a record percentage when unemployment is so low — bond yields could rise further and herald higher rates on mortgages and other long-term loans.

John Cochrane, an economist at the conservative Hoover Institution, said there are two likely scenarios right now about what’s happening in the markets. The first is that investors are adapting to higher rates that merely reflect strong economic growth. The second is that the markets see an already troubling national debt worsening right before mounting costs for Social Security and Medicare will require even more borrowing.

Cochrane said his guess is that the stock market losses so far reflect the anticipation of higher growth and interest rates. But it’s also clear that investors are struggling to digest an enormous amount of information and stocks are swinging violently as a result.

“What you’re seeing with all this volatility is the process of digestion,” he said. “It’s like what happens after the night you go out for too many tacos.”

Raj Shah, a White House spokesman, told reporters that the president’s forthcoming budget plan would lead to stronger economic growth, which, he said, would then reduce the deficits. No outside economist has forecast that the $1.5 trillion worth of tax cuts Trump signed into law can generate enough growth to pay for themselves.

The Committee for a Responsible Federal Budget, a nonprofit that seeks to limit the national debt, estimates that the government funding deal would cause the 2019 deficit to balloon to $1.2 trillion, with trillion dollar deficits to continue “indefinitely.”

That borrowing could temporarily boost growth in the next few years because there would be more money flowing through the economy. But growth would likely suffer later once taxpayers had to pay down the debt.

“The budget deficits we are seeing will accelerate economic growth in the short-run — through 2018 and maybe into 2019,” said Sung Won Sohn, economist at California State University, Channel Islands. “After that, we could actually see slower rates of growth.”