Change Point Analysis and Statistical Modelling of Time Series Data - Detecting Changes and Associating causes on Time Series Data
This project aims to analyze the impact of significant global events on Brent oil prices over the past few decades, focusing on political decisions, regional conflicts, economic sanctions, and OPEC policy changes. By detecting change points in time series data and analyzing the statistical impact of these events, we provide actionable insights for investors, policymakers, and energy companies. The project involves comprehensive data analysis and model building to predict price fluctuations and understand contributing factors.
As part of Birhan Energies, a consultancy dedicated to data-driven insights in the energy sector, this project helps our stakeholders make informed decisions in a volatile market environment.
The project is divided into multiple tasks to facilitate a structured approach to data analysis and model development.
- Objective: Plan the analysis workflow and ensure a solid understanding of the data and statistical models.
- Outline the steps involved in analyzing the data.
- Familiarize with time series models (e.g., ARIMA, GARCH).
- Identify model inputs, parameters, and limitations.
- Objective: Build on foundational knowledge to analyze Brent oil prices.
- Utilize statistical and econometric models (e.g., VAR, Markov-Switching ARIMA, LSTM) for complex pattern detection.
- Analyze economic indicators (GDP, inflation, unemployment) and their relationship to oil prices.
- Explore political, regulatory, and technological factors that influence oil prices.
- Objective: Create a user-friendly dashboard to visualize analysis results.
- Develop a Flask-based backend and a React frontend for a seamless experience.
- Present historical trends, forecasts, and correlations with events through interactive visualizations.
The project uses a modular structure to maintain clean, organized code.
├── .github/
├── data/
├── figures/
├── frontend/
├── notebooks/
│ ├── kaim_week_10_eda.ipynb
│ ├── kaim_week_10_predict.ipynb
│ ├── kaim_week_10_relation.ipynb
├── scripts/
│ ├── __init__.py
│ ├── app.py
│ ├── main.py
├── src/
│ └── __init__.py
│ ├── analysis.py
│ ├── arima_model.py
│ └── feature_engineering.py
│ ├── model_trainig.py
│ └── relation.py
│ ├── visualization.py
├── tests/
│ ├── __init__.py
│ ├── test_data_loader.py
├── requirements.txt
├── README.md
To set up the project on your local machine, follow these steps:
-
Clone the Repository:
git clone https://github.com/tedoaba/KAIM-W10.git cd KAIM-w10
-
Install Dependencies: Use the following command to install necessary packages:
python -m venv .week10 source .week10/Scripts/activate pip install -r requirements.txt
-
Set Up Dashboard (Flask + React):
- Navigate to the
scripts
directory and start the Flask server:python app.py
- Navigate to the
frontend
directory and start the React app:npm install npm start
- Navigate to the
-
Access the Dashboard: Open your browser and go to
http://localhost:3000
to interact with the dashboard.
The interactive dashboard provides the following visualization features:
- Historical Trends: Line charts displaying historical Brent oil price trends with highlighted events.
- Correlation Analysis: Scatter plots showing relationships between Brent oil prices and selected economic indicators (natural gas price, exchange rate, etc.).
- Event Highlights: Interactive elements that allow users to select and highlight specific events on the timeline.
- Model Future Forcast Results: Interactive elements that allow users to select and highlight future prices on the timeline.
- Residual Distribution: Interactive elements that allow users to select and highlight residual distribution on the timeline.
- Forecasting and Predictions: Displayed through charts (e.g., Recharts, Chart.js) for understanding future price movements based on selected models.
We welcome contributions! To contribute:
- Fork the Repository: Create a fork and clone it locally.
- Create a Branch:
git checkout -b feature-name
- Make Your Changes: Implement your feature or fix.
- Run Tests: Ensure all tests pass before committing.
- Push and Submit PR:
git push origin feature-name
- Submit a Pull Request: Describe your changes and submit the pull request for review.
For significant changes, please open an issue first to discuss your ideas.