Lagging Effects of Inflation: Visualizing Data with Python
Introduction:
Understanding the impact of inflation and how it ripples through different assets and consumer prices is essential to conserving your purchasing power. This blog uses Python and the Plotly graphing library to visualize the lagging effects of inflation.
Data Source and Preprocessing:
The historical economic data was sourced from the St Louis Federal Reserve website FRED and preprocessed in three separate CSV files for missing values and correct datetime indices. Then, the dataset was put into Jupyter Notebook for EDA and visual analysis. The strategy was to break the datasets into three groups, government debt/stimulus, asset prices, and consumer expenses, to inspect the money issuance from the actual source.
Government Debt/Stimulus:
Initially, government spending categories were visually inspected and studied. The flow of debt issuance begins with the federal government’s approval; bonds are issued and usually bought up by the Federal Reserve, and finally, the money supply increases.
It is apparent in these visuals that a significant increase in debt and, thus, the M1 money supply occurred around March 2020 due to the COVID-19 lockdown and shutdown of the economy. This resulted in a decrease in the USD velocity of money and the onset of the price inflation ripple.
Asset Prices:
Initially, the percentage change in asset prices was referenced from March 2020 onward. The more liquid assets, such as stock and crypto markets, peaked higher and faster than less liquid markets, such as housing and commodities.
Consumer Price Inflation:
Next, consumer expenses were analyzed and showed a similar increase post March 2020. However, the maximum increase here was approximately 25 percent relative to the previous 250 percent in asset prices. The peak also occurred about 12 months after the maximum peak in asset inflation.
Personal Savings:
Finally, the data visually supports wages not keeping up with increases in expenses. As a result, the personal savings rate dropped into the negative, and people went from being able to save money to exhausting money within less than two years of the March 2020 stimulus.
Summary:
This project used Python and Plotly graphing tools to visually analyze data from three economic categories, government debt issuance, asset prices, and consumer expenses, to understand how the March 2020 government stimulus rippled into consumer price inflation. There is clear evidence that inflation first caused liquid asset prices, such as the crypto and the stock market, to increase and then caused consumer prices to rise. Finally, the personal savings rate turned negative once consumer prices peaked. This correlation could support a strategy for protecting purchasing power by moving a portion of your cash savings into asset prices immediately after a significant government debt stimulus is issued. Then, sell those assets back into savings as they appreciate.