Wolfram Computation Meets Knowledge

Exploring America’s Debt Problem

It has been a roller coaster ride for the stock market lately. On August 1, the United States government avoided a default by a last minute deal to raise the debt limit. A few days later, we witnessed the first ever downgrade of U.S. credit by Standard & Poor’s.

Using Mathematica‘s TradingChart command, we can witness the stock market’s immediate negative reaction to the downgrade. Note: Mouse over the chart to see the daily open, high, low, and closing price of the S&P 500 index.

Using the TradingChart command to show the stock market's reaction to the downgrade of U.S. credit

Trading chart

Now that the world’s largest economy has lost its AAA status, what does it mean for the rest of the world? Will the debt downgrade spread? What is the implication to the bond market and the economic recovery? Can our economic well-being be measured by the amount of debt that we carry?

Indeed, there is much to think about. To fully understand the economic landscape, we first need to take a look at the U.S. fiscal situation. Wolfram|Alpha can be a handy entry point:

Asking Wolfram|Alpha for U.S. total debt

$14.27 trillion

It is alarming to see a 14 trillion figure for our total government debt. However, we should understand the composition of the U.S. debt to make a meaningful judgment. We can ask Wolfram|Alpha to show a breakdown of the debt figure:

Using Wolfram|Alpha to break down U.S. debt figure

Chart showing breakdown of U.S. debt

Note: Wolfram|Alpha provides a convenient way to generate this subpod without coding. You can do so by clicking the “+” sign on the top right-hand corner of the desired subpod from a full Wolfram|Alpha output. Please see the instructions here.

The subpod above shows a general breakdown of who owns the U.S. government securities. The amount held by the public is the amount held by Federal Reserve and government accounts. The amount held by agencies and trusts is the amount that is privately held.

Usually economists will look at the debt-to-GDP ratio as one of the indicators of the health of an economy. The debt-to-GDP ratio is the amount of national debt of a country as a percentage of its gross domestic product (GDP).

The two most commonly used debt-to-GDP ratios are total debt-to-GDP ratio, which reflects the indebtedness of a nation, and the public debt-to-GDP ratio, which reflects the government’s finances. We can ask Wolfram|Alpha for these two ratios:

U.S. debt/GDP, (U.S. public debt)/(U.S. GDP)
0.9511 years, 0.6436 years

The units are quoted in years, indicating the amount of debt as a percent of one year’s GDP.

Since the government is responsible for the public debt and not the accumulated private debt, the (U.S. debt held by public)/GDP is the ratio to consider for U.S. government securities’ credit worthiness.

Besides asking for the value of debt-to-GDP ratio, we can take a look at the time series of such ratios to see the change of the debt level as a percent of GDP.

U.S. debt/GDP
U.S. public debt/GDP
Comparing U.S. total debt/GDP to U.S. public debt/GDP highlighted in 2008
Graph comparing U.S. total debt/GDP to U.S. public debt/GDP highlighted in 2008

We notice that the public debt soared after the 2008 financial crisis. This increase can be due to an increase in government insurance programs such as unemployment insurance, Medicare, and Medicaid.

The problem with obsessing about debt is that it ignores that there are two sides to any ledger, and that someone’s debt is another person’s asset. The problem with debt is not its size, but the uneven distribution among income classes. Basically 95% of the U.S. is in debt to the top 5% in terms of income distribution. If the debt is unevenly distributed, then income is unevenly distributed.

The Gini index is a common measure of such distortion of income distribution. A value of 0 means total equality and a value of 1 means total inequality. On consulting Wolfram|Alpha, we discover that the U.S. has a Gini index of 0.408, ranked 69th highest in the world. While we are not at either extreme in the Gini index distribution, this implied distortion of income could explain why there has been a lack of income, therefore demand, from the middle class.

Gini index USA

Another major drive for the increase of our debt is the use of deficit spending to stimulate the economy, known as Keynesian economics. Wolfram|Alpha provides the amount of deficit as a percentage of GDP. By plotting the time series of the deficit percentage, we can clearly see the most recent (since 2008 financial crisis) increase in our deficit. Therefore, most of the stimulus program is deficit spending.

U.S. Fed Deficit/GDP
Making DateListPlot for U.S. Fed surplus/U.S. GDP
Federal Surplus/Deficit as a Percent of GDP

The basic point is that if government spends $1, albeit a borrowed dollar, to stimulate the economy, the national income may grow by more than $1. We can use the ratio of national income versus government spending, called the fiscal multiplier, to see the effect. If the fiscal multiplier is greater than 1, then the overall increase in national income is greater than the initial incremental amount of spending. However, if the fiscal multiplier is less than 1, the government spending might not have been as effective.

Another consequence to consider as a result of government borrowing is a concept called crowding out. It refers to a reduction in private consumption or investment due to government borrowing. The assumption is that there is a limited amount of available loanable funds in the market. The increase in government borrowing pushes up the demand for loanable funds and therefore increases the real interest rate. The result is a decrease in interest-sensitive expenditures from the private sector.

Note that crowding out only happens when the economy is at full capacity with negligible unemployment and above zero interest rates. So did the government’s stimulus program create crowding out in the U.S. economy? If the answer to this question is yes, then the demand for money and hence bond yields would increase. Many pundits predicted such an outcome, but the results as indicated below were in keeping with Keynesian predictions, and bond yields have dropped dramatically.

We can ask Wolfram|Alpha for an up-to-date unemployment rate:

U.S. unemployment

Below is the unemployment rate of the last five years:

U.S. unemployment rate since 2008

And the treasury yield:

Graph showing U.S. treasury yield curve

With a 9.1% unemployment rate and 10-year treasury note yields at a 50 year low, we can safely conclude that the recent deficit spending did not crowd out the private expenditure.

So if crowding out is not a factor, why is it that we have yet to see the economic recovery?

When the monetary policy of increasing money supply (lowering interest rates) fails to stimulate the economy, a liquidity trap might be to blame. In John Maynard Keynes’ words in The General Theory of Employment, Interest and Money: “There is the possibility… that after the rate of interest has fallen to a certain level, liquidity preference is virtually absolute in the sense that almost everyone prefers cash to holding a debt at so low a rate of interest. In this event, the monetary authority would have lost effective control.”

How do we know if we are in a liquidity trap?

In macroeconomics, the identity:


means monetary base times the velocity of money is equal to the price level times real output. The right-hand side of the equation is the dollar value of GDP. If we divide both sides by the monetary base, we get a definition of the velocity of money:

V = PY/M

We can think of the velocity of money as the average annual frequency a dollar turns over to purchase goods and services. If we believe that an increase in money supply results in an increase in GDP, we need to assume that the velocity of money does not decline.

You can interact with the dynamic Computable Document Format (CDF) file below to investigate the relation between 3-Month Treasury Bill Yield versus the Velocity of Monetary Base. The bottom left-hand corner of the graph shows a combination of low interest rate and a declining velocity of money. That is where the liquidity trap happens.

The relation between 3-Month Treasury Bill Yield versus the Velocity of Monetary Base

As of 2010, it seems that we are in a liquidity trap. We await the data from 2011 to see a complete picture.

You can download the full source code and descriptive details of the Demonstration above at the Wolfram Demonstrations Project, which is an excellent source of interactive knowledge apps on finance and economics.

It is not the amount of debt that is the concern for economic well-being, it is how we spend our borrowed money. If the borrowed funds are spent in a productive way, it is good for our economy. Otherwise, they are just wasted funds that our future generations will have to pay for.

How to tell if the funds are used wisely? One way is to calculate the stimulus multiplier. Another way to have a quick gauge is to see our nation’s labor productivity and inventiveness. Let’s save that for another post.


Join the discussion

!Please enter your comment (at least 5 characters).

!Please enter your name.

!Please enter a valid email address.


  1. Great Analysis, folks!
    I like the Mathematical approach and Logical principles…etc
    I don’t think the $14 Trillion debt is such a Big issue since the Annual GDP of U.S. is more than $14 Trillions , so our Debt to GDP ratio is less than 100%, that is much better than some of the European countries and Japan…etc.
    Besides, what does S&P know about Mathematica, or anything .

  2. Sam….definitely love this. Hoping to use this info somehow in my middle school humanities class. Great article! Thanks for sharing your expertise.

  3. A significant part of the present crisis is debt-deleveraging, c.f. Joseph Stiglitz or Paul Krugman. The analysis of debt presented in this blog entry is close, but not accurate.

  4. Sorry, but this blog entry has not so subtle political opinions that, in my opinion, should not be in a WRI blog entry. Here is an example of one of the statements that I feel is inappropriate for a WRI blog entry: “The problem with obsessing about debt is that it ignores that there are two sides to any ledger”. “Obsessing about debt”? Come on. Another problem is that there is no counter balance to the Keynesian principles that are discussed. How about some F. Hayek or M. Friedman.

    As a WRI customer, I’m disappointed that WRI allows this kind of politically biased entry.

  5. In reply to Yuting Liu:
    You are definitely right that part of the current problem is debt-deleveraging. But this debt overhang is private debt mainly held by the middle class and poor. In the blog we took care to distinguish between public and private debt and to concentrate on doing the analysis about public debt and the associated problem of crowding out. You will notice that we ended with the comment that there are other problems to be answered in further blogs and the issue of deleveraging is one of them.
    Thank you for your comment.

  6. In response to david’s comment:
    This blog did not set out to support any particular political economic theory. It asked questions, looked at the facts relevant to those questions and noted that these facts only supported the Keynes-Hicks model and its modern variants. There is no evidence in the blog to support the theories of Friedman and Hayek. It appears that the facts have a liberal bias.

  7. “It is not the amount of debt that is the concern for economic well-being, it is how we spend our borrowed money.”

    I think that it would be better to think of the debt as a primary measure of economic well-being and to describe the efficacy of our spending as indicative of our capability to recover. In this analogy, efficacy of spending is a gradient for debt as recovery is a gradient for health. After ten years without a respite from headlines of unethical behavior and spending, from businesses and from the wars consented to by the American public, the 15 Trillion dollar evidence is undeniable and cause for concern, at least from the perspective of an uneducated person under the age of twenty-five. At some point, I practically think, a country may become too sick to recover, a scenario which we have narrowly avoided by recently changing our definitions of economic viability.

    “The problem with debt is not its size, but the uneven distribution among income classes. Basically 95% of the U.S. is in debt to the top 5% in terms of income distribution.”

    I would like to see the implications of this fact expanded upon. Regardless of the taxing scheme, the 15 Trillion is held in common by the people. Whether or not we are able to resolve the inequalities by arbitrating the dispute between the lazy and the greedy will likely decide whether or not our country can survive for more than a year. We will also have to end the war and reduce the abhorrent “growth” of “defense” spending.

    Thank you for presenting all of these facts. If I may comment, a greater segment of the population, myself included, may benefit from less academic descriptions of the facts. I’m not yet convinced that there’s an advantage to speaking a language chosen by (probably) a small percentage of the country (how many people are versatile with Keynes or Friedman without coercion, more than 5%??).

    • Dear Brad,

      Thank you for your feedback. It is an interesting idea to use debt as a measure of economic well-being and spending as the capability to recover. The level of total debt and the speed at which we accumulate the debt are both important measures.

      Another aspect of the debt which deserves attention is to see who are the bond holders. The investigation of the US public debt holders, domestic vs. international, will be a starter.

      The immediate extension of this blog post is to investigate US vs. Japan. The comparison between US and Japan in terms of the debt level, the speed of accumulation and the debt holders, will give us much insight.

      We will try our best to make the technical content as easy to understand as possible. Maybe we can attract even more helpful comments from our readers!



  8. @michael kelly
    Big grin on my face. The comment about being biased free coming from the author itself, tells me the rest. I thought u were a scientist but u proved me wrong.

  9. Some readers will always try to read between the lines for “Imaginary Political messages”. Come on, lighten up a little, life is Short, don’t be so bitter all the time!

  10. Numbers about the past are all well and good. But debt is a problem only if it is unsustainable. The yearly debt is likely to be temporary.

    If current law remains in place (the “baseline” scenario) so, for example, the Bush-era tax cuts expire, and if the economy recovers from the recession, the yearly debt becomes 0 before 2020. This is the “baseline” scenario here:

    Without demand coming from somewhere (government, if all else fails), positive feedback loops can drive the economy into a depression.

  11. Interesting point but missing an important bit of analysis. The debt downgrade applied to treasury bonds, not to S&P 500 companies. If the debt downgrade were to bother investors, the result would be pulling money out of treasuries and into the stock market…in other words, the market would go *up* if people reacted as expected. Likewise we would expect that, due to the extra risk, treasury interest rates would increase; they went down. So yes, something happened, but what it looks like is large investors saying that they don’t believe the downgrade.

  12. @Russell
    We agree with your prognosis that the significance of the S&P downgrade is best measured by looking at the yields on Treasury bonds, but because of constraints on the length of the blog we could only include so much analysis. At the end of the blog we point out that further analysis is to follow in additional blogs.

    In fact I have written another blog which will appear soon, that studies the problem of Ongoing Stock Market Crashes as was witnessed after the S&P downgrade. In the first paragraph of that blog I explicitly demonstrate the same point that you have made, namely that a crash in the market with a simultaneous increase in treasury yields indicates that investors are taking their money out of the market and buying government debt, which is a complete refutation of the assessment made by S&P.

    Thanks again for your comment and I hope that we can expect further insightful input from you.

  13. Interesting analysis but here are a few more things to think about.
    -The US GDP is calculated in a quite different manor than it was 25 years ago but our debt is calculated the same, we are losing strength in substance.
    -The true problem is not the national debt at $14 trillion but actually the unfunded liabilities we are incurring. Economist can twist it however they like but the true problem is unfunded Medicaid spending, which currently estimates have it at about $80 trillion and growing at a rate of $1million every 10 seconds or $8 billion a day.
    -The most important item to consider about the US is the fact that it controls the worlds currency. If such control is lost how do you think the US economy would be affected.
    -What is the factor for war and with whom? Note that if the US goes to war with several of its debt holders that debt is essentially wiped out and theirs with us.
    -Lastly and rather inconsequential but still I’d like to point out how everyone uses the 95% to 5% or the 99% to 1% ratios to describe the wealth classes. I do believe the income classes can be broken down further.