Exploring the yield curve with d3.js

Here are a few animated visualizations that explore the yield curve, inspired by James Mackintosh’s piece. Conventional wisdom holds that if the yield curve inverts–that is, when short-term yields are higher than long-term yields–a recession may be on its way. But which yield curve to watch?

Watch the five-year/two-year curve invert in Dec. 2018.

The ten-year/two-year curve, the one that markets more traditionally watch, did not invert. Nor did the ten-year/three-month curve, which academics typically watch.

Here’s a full yield curve, including the yields on bonds with vintages between three months and ten years. Here’s the full yield curve for the period 1990 to 2018.

A d3.js visualization: Sovereign debt denominated in foreign currency

An interactive world map showing how much sovereign debt select countries hold denominated in foreign currencies. Given the world’s heavy reliance on the dollar, many emerging markets with high sovereign debt denominated in foreign currencies have suffered from the dollar’s recent relative strength. Foreign-currency debt is a risk factor for sovereign debt defaults, though far from the only factor.

A d3.js visualization: The Health and Wealth of Nations, 1800-2009

An animated visualization charting inflation-adjusted income per capita against life expectancy in 180 nations from 1800 to 2009. Each circle represents a nation, and changes in size to represent changes in the nation’s population. Hover over the circle to see the nation’s name. Click for more info.

Made with the JS library d3. Data the Gapminder Foundation.

An R visualization: Italian vs. German 2-Year Bond Yields, Aug. 2003 to Aug. 2018

A scatterplot made with R libraries ggplot2 and plotly.