This Julia package does one thing: gets you daily yield curves from the US Treasury. The data is served via an XML feed, but this package cleans it up into a DataFrame
so that you can use it.
Add the package via the Julia Package Manager.
] add DailyTreasuryYieldCurve
It is easy to get the historical yield curves:
using DailyTreasuryYieldCurve
df_rates = getyieldcurves()
df_realrates = getyieldcurves(;realrates=true)
You can also build a RateInterpolator
which helps you interpolate/extrapolate using the data:
using Dates
nominal_itp = createRateInterpolator(df_rates)
nominal_itp(45,Date(2020,4,13)) # gets the 45 day rate on 2020-4-13
For more information check the documentation.
This package is provided as-is and without guarantees. I am not affiliated with the US Treasury. Please cite the original source when using this data.