Back to blog
methodology

How to build a yield curve chart from US Treasury data

Phill Hendry 6 May 2026 8 min read

Quick answer

Build a yield curve chart by downloading free daily Treasury rates from treasury.gov as CSV. The data contains rates from 1-month to 30-year maturities. Plot maturity on the x-axis and yield on the y-axis, then apply monotone convex interpolation for a smooth, arbitrage-free curve between data points. Quadesto handles this automatically from a CSV upload.

Where can I get free US Treasury yield curve data?

The US Treasury publishes daily yield curve rates as a free CSV download from treasury.gov. The dataset contains daily closing rates for maturities from 1 month to 30 years. This data goes back decades and is updated every business day.

The key URL is: treasury.gov/resource-center/data-chart-center/interest-rates. Download the 'Daily Treasury Par Yield Curve Rates' CSV. The file contains columns for each maturity: 1 Mo, 2 Mo, 3 Mo, 4 Mo, 6 Mo, 1 Yr, 2 Yr, 3 Yr, 5 Yr, 7 Yr, 10 Yr, 20 Yr, 30 Yr.

What is a yield curve and what does its shape mean?

A yield curve plots interest rates (y-axis) against time to maturity (x-axis). In a normal economy, longer maturities have higher yields because investors demand a premium for locking up money for longer periods. This gives the curve its characteristic upward slope.

The shape of the yield curve tells you about market expectations:

• Upward sloping (normal): economy expected to grow, inflation expected to be stable

• Flat: uncertainty about the economic outlook

• Inverted (short rates > long rates): market expects economic slowdown or recession

• Steep: market expects strong growth or higher future inflation

How do you interpolate between yield curve data points?

The Treasury gives you discrete data points — rates at specific maturities. But the yield curve is conceptually a continuous function. Between the 2-year and 5-year points, there should be a smooth interpolated rate for any maturity.

There are several interpolation methods, each with trade-offs:

Should I use linear interpolation for yield curves?

The simplest approach: draw straight lines between adjacent points. Easy to implement but produces kinks (discontinuities in the first derivative) at each data point. Not suitable for professional use.

Is cubic spline interpolation good for yield curves?

Fits a smooth cubic polynomial between each pair of data points. Produces a visually smooth curve. The problem: cubic splines can overshoot, creating artificial humps or dips between data points, especially when the yield curve has a sharp bend.

What is monotone convex interpolation?

The industry standard for yield curve construction. Developed by Hagan and West (2006), it preserves the monotonicity and convexity of the raw data. This means if the raw data shows rates increasing from 2Y to 5Y, the interpolated curve will also increase — no artificial dips.

Quadesto implements monotone convex interpolation by default. When you upload Treasury data, the yield curve is constructed correctly without any configuration.

How do I build a yield curve in Excel?

For a basic yield curve in Excel:

1. Download the Treasury CSV. Open in Excel.

2. Take the most recent row (latest trading day).

3. Create a mapping of maturity labels to years: 1 Mo = 0.083, 3 Mo = 0.25, 6 Mo = 0.5, 1 Yr = 1, 2 Yr = 2, etc.

4. Plot an XY scatter chart with maturity (years) on x-axis and yield on y-axis.

5. Add a trendline (polynomial degree 3-4) for approximate smoothing.

This gives you a basic yield curve. For publication-quality output with correct interpolation, Quadesto handles it automatically.

How do I build a yield curve in Python?

For Python users, scipy.interpolate provides the tools:

from scipy.interpolate import PchipInterpolator

This implements the PCHIP (Piecewise Cubic Hermite Interpolating Polynomial) method, which is closely related to monotone convex. Pass your maturities and yields, and it returns a callable function that gives the interpolated yield at any maturity.

Is there an easier way to build a yield curve chart?

Upload the Treasury CSV. Quadesto detects it as yield curve data (wide format with maturity columns), applies monotone convex interpolation, and renders an interactive chart with:

• Smooth interpolated curve (blue line)

• Observed data points (scatter markers)

• Maturity labels formatted as 1M, 3M, 1Y, 2Y, etc.

• Hover to see exact yield at any maturity

• Export as embed, PNG, or PDF

The chart works with any date in the dataset. Navigate through history to see how the curve has evolved.

How do I calculate the 10Y-2Y yield spread?

One of the most-watched yield curve metrics is the 10-year minus 2-year spread. In Quadesto, you can compute this as a derived column using the expression [10 Yr] - [2 Yr] and chart it as a time series.

When this spread goes negative, the yield curve is inverted — a historically reliable recession indicator.

Ready to try Quadesto?

Connect your data. AI builds the charts. Embed anywhere.

Get Started Free
yield curveTreasuryinterpolationfixed income