The interest rates on mortgages, credit cards and business loans have shot up in recent months, even as the Federal Reserve has left its key rate unchanged since July. The rapid rise has startled investors and put policymakers in a tough spot.

The focal point has been on the 10-year U.S. Treasury yield, which underpins many other borrowing costs. The 10-year yield has risen a full percentage point in less than three months, briefly pushing above 5 percent for the first time since 2007.

This sharp and unusually large increase, alongside others, has sent shock waves through financial markets, leaving investors puzzled over how long rates can remain at such high levels “before things start to break in a meaningful way,” said Subadra Rajappa, head of U.S. rates strategy at Société Générale.

So what’s going on?

Initially, when the Fed first began to fight inflation, it was short-term market rates — like the yield on two-year notes — that rose sharply. Those increases closely tracked the increases in the Fed’s overnight lending rate, which rose from near zero to above 5 percent in about 18 months.

Longer-term rates, like the 10- and 30-year Treasury yields, were less moved because they are influenced by factors that have more to do with the long-term outlook for the economy.

One of the most surprising outcomes of the Fed’s rate-rising campaign, which is intended to rein in inflation by slowing economic growth, has been the resilience of the economy. While shorter-dated rates are linked mostly to what is happening in the economy right now, longer-dated rates take greater account of perceptions of how the economy is likely to perform in the future, and those have been changing.

From June through August, the changes in the 10-year yield mirror changes in Citigroup’s economic surprise index, which measures how much forecasts for economic data vary from the actual numbers when they come out. Lately that index has been showing the economic data has consistently been stronger than expected, and as the outlook for growth has improved, long-term, market-based interest rates like the 10-year yield have risen.

Better-than-expected jobs figures and consumer spending data is welcome news for the economy, but it makes the Fed’s role of slowing inflation trickier. So far, growth has held up as inflation has moderated.

But the resilience of the economy has also meant that price gains haven’t cooled as quickly as the Fed — or investors — had hoped. Bringing inflation fully under control may require interest rates to stay “higher for longer,” which has recently become a Wall Street mantra.

At the end of June, investors put a roughly 66 percent chance that the Fed’s policy rate would end next year at least 1.25 percentage points below where it is now, according to the CME FedWatch. That probability has since fallen to around 10 percent. This growing sense that rates won’t come down very soon has helped prop up the 10-year Treasury yield.

Usually, investors demand more — that is, a higher yield — to lend to the government for a longer period, to account for the risk of what might happen while their money is tied up. This extra return, in theory, is called the “term premium.”

In reality, the term premium has become a kind of catchall for the portion of yield that is left over after more easily measurable parts like growth and inflation are accounted for.

Although the term premium is hard to measure, the consensus is that it has been rising for a few reasons — and that’s pushing overall yields higher, too.

A large and growing federal budget deficit means that the government needs to borrow more to finance its spending. It could, however, be a challenge to find lenders, who may want to sit out the bond market volatility. As bond yields rise, prices fall. The most recently issued 10-year Treasury note from mid-August has already slumped nearly 10 percent in value since it was bought by investors.

“Until it is very clear that the Fed is finished raising interest rates, some investors are going to be less willing to buy,” said Sophia Drossos, an economist and strategist at Point72.

Some of the largest foreign holders of Treasuries have already begun to pull back. For the six months through August, China, the second-largest foreign creditor to the United States, sold more than $45 billion of its Treasury holdings, according to official data.

And the Fed, which owns a large amount of U.S. government debt that it has bought to support markets during bouts of turmoil, has begun to shrink the size of its balance sheet, reducing demand for Treasuries just as the government needs to borrow even more.

As a result, the Treasury Department needs to offer a greater incentive to lenders, and that means higher interest rates.

The ramifications go beyond the bond market. The rise in yields is being passed through to companies, home buyers and others — and investors are worried that those borrowers could be squeezed.

Investors are parsing earnings reports for the latest read on how companies are coping with higher interest rates. Analysts at Goldman Sachs noted at the start of the week that investors have homed in on companies better prepared to weather any coming storm, avoiding companies “that are most vulnerable” to increased borrowing costs.

The rise in rates is weighing on stocks. As Treasury yields rose again on Tuesday, the S&P 500 slipped 1.4 percent. The index has lost about 9 percent since its peak at the end of July, a drop that coincides with the run-up in yields.