My understanding is that U.S. Treasuries are considered as close to risk free as you can get and in some places this yield is used in place of the "risk free rate" in performing calculations. However, when I look at current yields I could get buying bonds, corporate bonds are largely yielding less than treasuries unless I go down as low as A/A or a longer time frame than 2 years. And even then there is still a lone outlier in 10 year bonds where the best yield on Aa/AA is less than the treasury rate! In the picture below I have highlighted all the cases where I see a CD or corporate bond is yielding less than a treasury bond of the same maturity.
Why is this? I thought maybe it was due to the spread on the secondary market, or perhaps due to YTW being significantly worse than YTM, but when I look at the actual offerings, I see that the actual rates available are even worse than the summary shows. For instance, if I look at 2 year Aaa/AAA which is quoted as best 4.376% I see that the actual best on offer is 4.164% YTM/YTW whereas 4.376% is on the ask side. If I look at the actual rates for 2 year treasuries I see a similar discrepancy although it is smaller: 4.433% YTM/YTW with a spread of 20 basis points (versus 208), so the treasury is actually yielding more: 269 basis points vs. what appears to be only 186 in the summary. I did not check them all but if other time frames and ratings are similar there could be even more cases than I have highlighted where treasures are yielding more than corporate bonds.
I also had the thought that perhaps U.S. Treasuries are considered lower grade due to the "downgrades" by some credit agencies in the past (over 10 years ago if I recall). But it seems in this case the yields should be more in the Aa/AA range, which they are still higher than. Additionally, I have trouble believing that if the U.S. defaulted on debt payments that this would have no effect on ability of corporate entities (in the U.S.) to pay their bills, given how intertwined their finances are (e.g. how many of them are holding treasuries as their "cash equivalents.)