This repository contains Jupyter notebooks that visually analyze US Economic data as provided by St. Louis Fed. The analysis is carried out using Pandas, Pandas datareader, and Matplotlib.
So far I created the following notebooks:
- Analysis of the evolution of the seasonally adjusted CPI, Fed Funds Effective Rate, Market Yield on U.S. Treasury Securities at 10-Year Constant Maturity, and comparison of the present US Treasury Yield Curve with Annual Inflation Expectations, plus a similar analysis for the Eurozone by way of comparison
- Analysis of the evolution of the US Federal Public Debt as percentage of GDP, Public Debt as percentage of Federal annual tax revenue, Annual pulic deficit as percentage of GDP, and interest outlays to tax revenues
- Analysis of the evolution of the ownership structure of US Federal Debt
- Analysis of changes in M2, Real Personal Consumption Expenditures (PCE), Wage Inflation and CPI
- Analysis of Participation, Employment to Population, Unemployment, and Unfilled Vacancies to Population Rates
- Analysis of US Money Supply
- Analysis of Quantitative Easing and Tapering by the Federal Reserve
- Analysis of US Interest Rate Spreads
- Analysis of US Past, Current, and Future Riskfree Rates
You'll need python3 and pip. brew install python
will do if you are on MacOS. You can even forgo installing anything and run these notebooks in Google cloud, as I outline below.
In case you opt for a local installation, the rest of the dependencies can be installed as follows:
python3 -m pip install -r requirements.txt
NB: I use Yahoo-Finance data in the Current_Riskfree_Rates.ipynb
notebook. Unfortunately Yahoo recently changed their API, as a result the last official version of pandas-datareader fails when retrieving data from Yahoo-Finance. To overcome it, until a new version of pandas-datareader addresses this, I added a dependency on yfinance and adjusted the notebook to make a yfin.pdr_override()
.
After you clone the repo and cd
into its directory and run one of the below commands depending on which notebook you are interested in:
jupyter notebook CPI_and_Fed_Funds_Rates.ipynb
or
jupyter notebook Fed_Public_Debt_and_Fed_Tax_Revenue.ipynb
or
jupyter notebook Fed_Public_Debt_Holders.ipynb
or
jupyter notebook M2_PCE_and_CPI.ipynb
or
jupyter notebook Unemployment_and_Participation_Rates.ipynb
or
jupyter notebook Money_Supply.ipynb
or
jupyter notebook Quantitative_Easing_and_Tapering.ipynb
or
jupyter notebook Interest_Rate_Spreads.ipynb
or
jupyter notebook Current_Riskfree_Rates.ipynb
A full run of these notebooks can be seen here for CPI, Fed Funds Rate, Treasury rates and Inflation expectations, here for public debt analysis, here for public debt ownership analysis, here for the analysis of M2, Real PCE, Wage Infation, and CPI, here for the analysis of Participation, Employment to Population, Unemployment, and Unfilled Vacancies to Population Rates, here for the analysis of US Money supply, and here for the analysis of US Interest Rate Spreads, and here for the analysis of US Past, Current, and Future Riskfree rates.
You can also run these notebooks in Google cloud. This way you don't need to install anything locally. This takes just a few seconds:
- Go to Google Colaboratory in your browser
- In the modal window that appears select
GitHub
- Enter the URL of this repository's notebook, e.g.:
https://github.com/ilchen/US_Economic_Data_Analysis/blob/main/Fed_Public_Debt_and_Fed_Tax_Revenue.ipynb
orhttps://github.com/ilchen/US_Economic_Data_Analysis/blob/main/CPI_and_Fed_Funds_Rates.ipynb
orhttps://github.com/ilchen/US_Economic_Data_Analysis/blob/main/Fed_Public_Debt_Holders.ipynb
orhttps://github.com/ilchen/US_Economic_Data_Analysis/blob/main/M2_PCE_and_CPI.ipynb
orhttps://github.com/ilchen/US_Economic_Data_Analysis/blob/main/Unemployment_and_Participation_Rates.ipynb
orhttps://github.com/ilchen/US_Economic_Data_Analysis/blob/main/Money_Supply.ipynb
orhttps://github.com/ilchen/US_Economic_Data_Analysis/blob/main/Interest_Rate_Spreads.ipynb
orhttps://github.com/ilchen/US_Economic_Data_Analysis/blob/main/Current_Riskfree_Rates.ipynb
- Click the search icon
- Enjoy