Pulls the real and nominal yield curves from the US Treasury's website for a date range (inclusive)
Project description
USTreasuryCurve
This code pulls in the nominal and real yield curves from the US Treasury's website for a date range (inclusive) into a Pandas dataframe. The nominal rates start on January 2, 1990 and the real rates begin on January 2, 2003. The US Treasury updates these yields daily.
Install package
pip install ustreasurycurve
Usage
import ustreasurycurve as ustcurve
Pull in nominal US Treasury curve
ustcurve = ustcurve.nominalRates('2010-06-30', '2022-06-30')
Pull in real US Treasury curve
ustrcurve = ustcurve.realRates('2010-06-30', '2022-06-30')
Pull in nominal US Treasury curve using an unverified HTTPS request
ustcurve = ustcurve.nominalRates('2010-06-30', '2022-06-30', False)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ustreasurycurve-0.0.7.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for ustreasurycurve-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 073e8c4e3d7ec81567c86b33534ba089ce56f91063d2c71a5f7cd18ac3a19e5e |
|
MD5 | 3ddcfff0f6d485208cf3ffeacc43755f |
|
BLAKE2b-256 | 1b6c7f8155d3e644fdbb866c6a530240047453aa7070feb421765d30131f6351 |