Skip to content

Data science & machine learning project which studied the different factors affecting inflation. Explored different models including regression, KNN, ARIMA and LSTM.

License

Notifications You must be signed in to change notification settings

keanekwa/Inflation-Prediction

Repository files navigation

Inflation Prediction

About

Our project seeks to look at how different global financial and non-financial factors (hereon referred to as "cool factors") drive inflation. For the purpose of our project, inflation shall be quantified by looking at the rise of the Consumer Price Index (CPI) in the USA over the years.

By analysing these factors, we seek to understand inflation from two points of view:

  1. To understand if factors traditionally theorised to have correlations with inflation in traditional economic literature (e.g. crude oil prices, Producer Price Index (PPI), gold prices) really do have their theorised correlations with CPI and to quantify the extent of their relationships.
  2. To explore if there are any other interesting correlations between other more indirect factors (e.g. CO2 levels, bitcoin prices), and to postulate if there are any deeper links between these factors and CPI. For example, finding a correlation between CO2 levels and CPI could show that there are relations between the use of fossil fuels on CPI (perhaps indicating demand pull inflation on transportation or manufacturing activities that produce CO2), while finding a correlation between bitcoin prices and CPI could show how bitcoin is becoming a "digital gold" in today's digital age.

For a detailed walkthrough, please view the source code in order from:

  1. Data Extraction
  2. Data Visualisation
  3. Linear Regression
  4. K-Nearest Neighbours (KNN)
  5. ARIMA
  6. Long Short Term Memory Network (LSTM)

Problem Definition

To address the two areas we set out to explore, there are some important questions which can help us better quantify and structure our analysis:

  1. What are the individual relationships between factors in traditional finance and CPI? Which has the highest correlation to CPI?
  2. Are there any multivariate relationships between these factors in traditional finance and CPI?
  3. What are the individual relationships between our cool factors and CPI? Which has the highest correlation to CPI?
  4. Are there any multivariate relationships between these cool factors and CPI?
  5. Are there any multivariate relationships between both traditional financial factors and cool factors that could help us better predict CPI?

Conclusion

Our 'cool' factors seem to have good correlations with CPI. While they might not be correlated for certain comparisons (e.g. for monthly and yearly percentage changes in basic correlation analysis), they can be useful especially as part of other multivariate models.

Our best models to predict CPI:

  • ARIMA with 8 exogenous factors
  • Multivariate LSTM

There is value in exploring factors not traditionally agreed upon in traditional economic literature for predicting inflation.

What did we learn from this project?

Apart from the data extraction, visualisation and regression we learnt in the module, we applied our learning of ARIMA, KNN and LSTM, as well as tied together our financial knowledge, throughout this project.

References

  1. US Consumer Price Index (CPI) dataset: https://www.bls.gov/cpi/data.htm
  2. Business Inflation Expectations (BIE) dataset: https://www.atlantafed.org/research/inflationproject/bie.aspx
  3. Crude Oil Price dataset: https://tradingeconomics.com/commodity/crude-oil
  4. US Producer Price Index (PPI) dataset: https://fred.stlouisfed.org/series/PPIACO
  5. US Unemplyment Rate dataset: https://www.kaggle.com/datasets/axeltorbenson/unemployment-data-19482021
  6. S&P 500 dataset: https://finance.yahoo.com/quote/%5EGSPC?p=^GSPC&.tsrc=fin-srch
  7. Bitcoin Price dataset: https://finance.yahoo.com/quote/BTC-USD/history
  8. NASA CO2 dataset: https://climate.nasa.gov/vital-signs/carbon-dioxide/
  9. Nominal Effective Exchange Rate dataset: https://fred.stlouisfed.org/series/NBUSBIS

Individual Contributions

Keane (https://github.com/keanekwa): Data Extraction, Data Visualisation, ARIMA
Samuel (https://github.com/Sampie314): Data Extraction, Long Short Term Memory Neural Network
Lim Yi (https://github.com/iymil): Data Extraction, Linear Regression, K-Nearest Neighbors

About

Data science & machine learning project which studied the different factors affecting inflation. Explored different models including regression, KNN, ARIMA and LSTM.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published