Group members: Kangyang Wang (kangyangwang), Wendy Zhu (wheeendiii), and Kay Avila (kayavila)
- https://voxeu.org/article/inflation-aftermath-wars-and-pandemics
- https://www.goldmansachs.com/insights/pages/gs-research/reflation-risk/report.pdf
Based on the analysis of the above two articles, the authors conclude that, overall, "wars result in higher inflation and bond yields, pandemics do not". This conclusion is supported by several well-plotted graphs of Consumer Price Index (CPI) Inflation or Nominal ten-year bond yields around wars and pandemics. More specifically, the authors used the last year of significant fatalities as the end-year for wars and pandemics (Year = 0) (In a number of instances, this is one year before the formal end of the war/pandemics) and overlaid the historical CPI Inflation/Bond Yield data 10 years before and after the year 0 to monitor the evolution of Inflation and Bond Yield before and after each event.
The analysis of the articles seems well organized, but we have several concerns:
- The conclusion is contradicting with what we are experiencing now. As we know, the CPI inflation rate is surging since the outbreak of COVID-19 and is reaching a 30-year record high recently.
- The conclusion in the article didn't consider many inner factors of the events, such as the fatalities and the duration of the events. Would they affect the final overall trend of the CPI Inflation and bond yield around the events?
- Are there any significant market vibrations (changes of major market indexes) before and after wars and pandemics?
As we investigate these, we will look specifically at the United States, and see if the authors' proposals hold true for this one country in particular, using events that have influenced it.
- CPI - For the United States, we follow the authors' hypothesis that wars will result in higher inflation in the near term after the end of the war (as indicated by the consumer price index), but pandemics will not.
- GDP - The growth of GDP will be exceptionally strong during wars and will remain an increasing trend afterwards, whereas pandemics exhibit minor impact on GDP growth.
- S&P 500 and Dow Jones
- In the aftermath of wars and pandemics, the major stock market indexes (S&P500 and Dow Jones) will slide down due to the impacted economic conditions.
- The major stock market indexes (S&P500 and Dow Jones) will be more volatile after the start of the wars/pandemics.
This data file is compiled from the wars and pandemics chart in the reference article "Inflation in the aftermath of wars and pandemics" (https://voxeu.org/article/inflation-aftermath-wars-and-pandemics) and the Wiki pages for wars and pandemics("List of epidemics" - https://en.wikipedia.org/wiki/List_of_epidemics, "Timeline of wars" - https://en.wikipedia.org/wiki/Timeline_of_wars).
Note: We modified our original event dataset to focus only on the events that are significantly related to U.S. The pandemics/epidemics selected in this dataset are based on the article "The Worst Outbreaks in U.S. History"1.
- CPI for US from 1913-present - https://beta.bls.gov/dataViewer/view/timeseries/CUUR0000SA0
- CPI for G20 countries from 1915-present - https://stats.oecd.org/Index.aspx?DataSetCode=G20_PRICES#
Consumer price index represents the change in prices that consumers are paying for common household goods, including food, gas, and prescription drugs.
The US CPI data set comes from the United States Bureau of Labor Statistics website, which has data available from 1913 through the present year. The values are relative to each other. That is, rather than discrete amounts, the index represents the change in prices from year to year, based on a "base index". The base index for this dataset is calculated by taking the average of the period from January 1982 through December 1984 and setting it at 1002. All other index values are then given as a percentage change from that value.
- GDP for all countries from 1929-present - https://databank.worldbank.org/reports.aspx?source=2&type=metadata&series=NY.GDP.MKTP.CD#
- S&P500 historical monthly nominal and real (inflation adjusted) data from 1927 - https://www.macrotrends.net/2324/sp-500-historical-chart-data
- Dow Jones historical monthly nominal and real (inflation adjusted) data from 1915 - https://www.macrotrends.net/1319/dow-jones-100-year-historical-chart
First we plotted individual pandemics/epidemics and wars. The year that the event ended is set as time zero. The plot lines end early when no data for an event exists. For instance, the two ongoing health events, covid-19 and HIV/AIDS, are plotted for 2021 as year zero, which is the last year for which there is data.
Notably, the graphs for diptheria epidemic and Spanish flu look the same, because they have an overlapping time period with the former ending in 1925 and the latter ending in 1920. The time period for these two events also overlap with the United States' involvement in World War I, which lasted from 1914 to 1918. This makes it hard to draw independent conclusions for events during that time.
In order to get a higher level picture, we also plotted the 25% and 75% percentiles and median of the values, as well as the mean of the values.
The quartiles for the pandemics have a wider band than the wars, meaning the pandemics follow less of a strict pattern than the wars. On average, the pandemics have a much smaller increase in the rate of inflation at their end than the wars do.
Wars have a narrower range of inflation change values, except right after the end of the war. Here, they exhibit a large range. Looking at the individual graphs above, the events that most notably lead to an increase in inflation in the United States were World War I and World War II, as well as the Vietnam War. Many of the other wars did not seem to have a noticeable impact on inflation when they ended.
From these results, we conclude that the authors conclusions (and our hypothesis following them) were correct on average. Inflation tends to increase after wars end but not as noticeably after pandemics. However, as we've seen, this is far from guaranteed.
1. Overall GDP and subcategories (Personal consumption expenditures, Gross private domestic investment and Government consumption expenditures and gross investment)
Take the ongoing HIV pandemic as an example, all indexes exhibit a gradually increasing pattern throughout the years. Personal consumption expenditure takes up the majority of proportion of GDP, while Gross private domestic investment and government consumption stays more stable and with less proportion.
2. Pandemics Vs. Wars
-
GDP fluctuations for SARS outbreak, Hong Kong Flu and COVID-19 pandemic: Pandemics appear to cause negligible effects on GDP and its sub-categories. With an exception to COVID-19 pandemic where Personal consumption index decrease led to a noticable drop in overall GDP.
-
GDP fluctuations for Korean War and World War II: GDP trends fluctuate more around war-time period compare to those for pandemics. Government consumption index increases significantly for wars, and it leads to increases of overall GDP. For Korean War, government consumption reaches a peak before war period and a drastic increase in the later part of World War II.
Monthly historical data for S&P500 and Dow Jones are used in the plots below. x = 0 is the January of the selected "Year Zero".
- If we use the year before the event end year as zero point, and select the inflation adjusted SP500 and Dow Jones historical data 10 years before and after the zero point year, plots would be:
-
The evolution of real SP500 and Dow Jones 10 years before and after all the Pandemics: ['Asian Flu', 'Hong Kong Flu', 'London flu', 'Russian flu', 'HIV/AIDS pandemic', 'SARS outbreak', 'Swine flu pandemic']
-
The evolution of real SP500 and Dow Jones 10 years before and after all the Wars: ['Korean War', 'Vietnam War', 'World War II', 'Gulf War', 'Civil war in Afghanistan', 'War on Terror', 'Iraq War', 'War in Somalia']
-
The evolution of real SP500 and Dow Jones 10 years before and after Pandemics with over 1m fatalities: ['Asian Flu', 'Hong Kong Flu', 'HIV/AIDS pandemic']
-
The evolution of real SP500 and Dow Jones 10 years before and after Wars with over 1m fatalities: ['Korean War', 'Vietnam War', 'World War II', 'War in Somalia']
In the above plots, I used the year before the formal end of wars and pandemics as the year 0, which is the segment within the dashed lines. The 0 in the x-axis is the January of Year 0. Then, we plotted the percentage change of indexes 10 years before and after the year 0 to see whether these indexes would be impacted by the occurrence of wars/pandemics. From the plots, we can see (1) during the years after the formal end of severe pandemics with over 1 million fatalities, the volatility of S&P 500 and Dow Jones increases; (2) After the end of wars, there was usually a dip of these indexes; (3) The percentage change of S&P 500 and Dow Jones are closely related to each other; (4) In a long term, the inflation adjusted indexes was NOT significantly impacted by wars and pandemics.
- If we use the event start year as zero point, and select the real SP500 and Dow Jones historical data 5 years before and after the zero point year, plots would be
-
The evolution of real SP500 and Dow Jones 5 years before and after all the Pandemics:
-
The evolution of real SP500 and Dow Jones 5 years before and after all the Wars:
-
The evolution of real SP500 and Dow Jones 5 years before and after Pandemics with over 1m fatalities:
-
The evolution of real SP500 and Dow Jones 5 years before and after Wars with over 1m fatalities:
In the above plots, I used the start year of wars and pandemics as year 0 and plotted the historical percentage change of indexes 5 years before and after the year 0 to explore the volatility of these indexes after the start of wars and pandemics. We can see there was no significant change happened after the start of wars and pandemics.
Therefore, I would reject our original hypotheses.
Without any selective compilation, the program took about 43.99 seconds on an initial sample run.
We initially intended to try numba compilation on the read_event_facts(), which uses numpy.setdiff1d(), since numba primarily improves numpy functionality. However, once applying it, numba took issue with the try/except code catching different kinds of exceptions, and that led to us researching and reading that numba has only the barest exception handling support.3. Handling different kinds of exceptions in read_event_facts() function was desirable and thus numba was not a good option.
Next we followed the PyCharm instructions for compiling with cython.4 Without any help with static typing, only compiling the code as is from a .pyx file, a sample run of the program took 24.7 seconds. Profiling showed that analyze_index(), output_sp_dj(), plot_sp_dj(), and add_mean_and_quartiles() took the most time. As these were primarily pandas and plotting, they did not easily take to static typing. The helper functions min_max_year_checking() and read_event_facts() seemed to be more readily adapted, but on attempting that, we better understood the static typing inside a function is for variables declared inside the function rather than the parameters. get_gdp_info() is the only function where we save new variables inside of the function, so we added static typing there. After recompiling, a sample run took 21.7 samples.
However, sample running times varied greatly, and so these numbers are only provided as examples.
Footnotes
-
https://www.healthline.com/health/worst-disease-outbreaks-history ↩
-
https://www.bls.gov/cpi/questions-and-answers.htm#Question_17 ↩
-
https://numba.pydata.org/numba-doc/dev/reference/pysupported.html#pysupported-exception-handling ↩
-
https://www.jetbrains.com/help/pycharm/cython.html#get-started-cython ↩