DailyTreasuryYieldCurve.jl

Julia package for getting US Treasury yield curves

OTHER License

Stars
4
Committers
2

DailyTreasuryYieldCurve.jl

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.

Example

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.

Disclaimer

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.