Or, in general,
government debt < corporate debt < common equity (i.e., stocks)
Debt, in general, is considered less risky than common stock because interest and principal payments are explicitly defined in debt contracts, although guaranteed only to the extent that these contracts can be enforced. Since dividends are at the discretion of the board of directors and capital gains are the result of uncontrollable market forces, earnings of common stockholders are much more uncertain. Furthermore, equity investors are in a riskier position than creditors because the latter get paid first, both in the course of the firm's operations when interest and dividends are paid and during bankruptcy proceedings when the firm's assets are used to satisfy financial obligations.
Why is government debt less risky than corporate debt? In financial theory, government debt instruments like treasury bills and bonds are considered "risk-free", even though they are strictly only default risk-free; this means that government securities are still exposed to risks such as inflation risk, interest rate risk, and reinvestment risk that affect other types of debt . And the only reason why government debt holders would be immune to default risk is that the borrower--in this case, the government--can theoretically always just print more money to pay back its debt. This is why the downgrade of US debt from a AAA rating in August last year baffled a lot of people: credit ratings are basically just a reflection of default risk, so as long as the US Treasury can print more US dollars, there is no way the US will default on its debt.
Developments in the world economy in the past few months force us to reevaluate these traditional views of investment risk. Sovereign defaults are not new, but what happened in Greece in March, where creditors lost around 74% of the value of their investments, makes us wonder what "risk-free" really means. Recent reports that the US treasury is planning to sell negative-yield bonds, a move which does not make sense to ordinary investors like you and I, further add to the confusion.
In his most recent letter to Berkshire Hathaway shareholders, Warren Buffet underlines the idea that investments that are traditionally considered "safe"--government securities and corporate bonds--are really far from being risk-free, particularly if we define risk as "the probability--the reasoned probability--of that investment causing its owner a loss of purchasing power over his contemplated holding period."
And if government securities and bonds aren't really safe, then what other reasons do ordinary investors have for holding them? Not for the returns, definitely, since we all know that these offer lower expected returns than most other investments. Maybe we really are better off buying productive assets like businesses and real estate, as Buffet suggests. Businesses and real estate, businesses and real estate. Maybe we can never go wrong with businesses and real estate.