Skip to content

charleseleri/Crude-Oil-Analysis

Repository files navigation

Crude Oil Price Analysis & Forecasting

Overview

This project analyzes and predicts crude oil prices using machine learning models (ARIMA Time-Series Analysis). It provides an interactive dashboard for users to explore historical price trends and future forecasts.

Features

  • Fetches historical crude oil prices (WTI & Brent) via API.
  • Preprocesses & cleans data for smooth trend analysis.
  • Forecasts future crude oil prices using ARIMA.
  • Visualizes trends, price distribution, and correlations.
  • Interactive Streamlit dashboard for price exploration.

Project Structure

Crude_Oil_Analysis/
│-- README.md                 # Project Overview & Instructions
│-- data_collection.py        # Fetches crude oil prices
│-- data_preprocessing.py      # Cleans & processes oil price data
│-- ml_model.py                # Trains ARIMA model for forecasting
│-- visualization.py           # Generates oil price trend graphs
│-- dashboard.py               # Interactive Streamlit dashboard
│-- requirements.txt           # Dependencies for setup

Installation & Setup

1️⃣ Install Dependencies

Run the following command:

pip install -r requirements.txt

2️⃣ Run Data Collection

python data_collection.py

This fetches crude oil prices and saves them as crude_oil_prices.csv.

3️⃣ Preprocess Data

python data_preprocessing.py

This cleans the dataset and prepares it for modeling.

4️⃣ Train the Machine Learning Model

python ml_model.py

This trains an ARIMA model to forecast crude oil prices.

5️⃣ Run Data Visualizations

python visualization.py

6️⃣ Launch the Interactive Dashboard

streamlit run dashboard.py

The dashboard provides real-time crude oil price analysis & forecasting.

Technologies Used

  • Python (Pandas, NumPy, Matplotlib, Seaborn, Plotly, Streamlit)
  • Machine Learning (ARIMA for time-series forecasting)
  • Data Processing (Feature Engineering, Normalization, Outlier Detection)
  • API Integration (EIA API for crude oil price data)

Author

Charles Eleri

Next Steps

  • Enhance the model with LSTM for deep learning forecasting.
  • Integrate real-time market news scraping.
  • Deploy the dashboard to AWS/GCP/Azure for global analysis.

🔹 GitHub Repo: github.com/charleseleri

About

Crude Oil Analysis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages