0% found this document useful (0 votes)
8 views16 pages

Oil Price

The document summarizes a project to predict crude oil prices using machine learning models. A team of 6 members collected historical oil price data using the yfinance Python library then performed exploratory data analysis including outlier detection, missing value imputation, and data visualization. Several time series forecasting models were trained including LSTM, ARIMA, Holt-Winters, simple exponential smoothing, and Prophet. The team selected the LSTM model for deployment based on its ability to capture complex patterns in time series data.

Uploaded by

Rajesh Hm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views16 pages

Oil Price

The document summarizes a project to predict crude oil prices using machine learning models. A team of 6 members collected historical oil price data using the yfinance Python library then performed exploratory data analysis including outlier detection, missing value imputation, and data visualization. Several time series forecasting models were trained including LSTM, ARIMA, Holt-Winters, simple exponential smoothing, and Prophet. The team selected the LSTM model for deployment based on its ability to capture complex patterns in time series data.

Uploaded by

Rajesh Hm
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

Crude Oil Prediction

Team Members
Pranjali Jeevan Rachchawar

Vikram Reddy S

Rajesh HM

Divya Avdhut Thakur

Kudipudi Sai Shiva

Amruta Dattaram Taral


Project Flow Chart
Business Objective

Data Collection

Data Preparation

Exploratory Data
Analytics

Model Building

Model Evaluation

Model Deployment
Business Objective:
predicting crude oil prices serves a range of business objectives,
from risk management and decision
making to investment strategies and market insights.
The specific objective will depend on the
industry, sector, and goals of the organization using the predictions.
Data Collection
‘yfinance’ is a Python library that provides a
convenient way to fetch historical stock and financial
Data from Yahoo Finance. To collect data using ’yfinance’,
follow these steps:

1. Install yfinance: If you haven’t already, you need to


install the ‘yfinance’ Library.
2. Import the Library: In your Python script or Jupyter
Notebook, import the ‘yfinance’ library.
3. Define Ticker Symbols: Determine the ticker
symbols(stock symbols) For the companies or assests
you want to collect data for.
4. Specify Data Parameters: Define the parameters for the
data you want to collect, Such as the start and the end dates
of the historical data, the frequency. And the data fields
you’re interested in.
5. Fetch data: Use the ‘yf.download()’ function fetch the
historial data.
Exploratory data analysis (EDA)
 Describe Dataset.
 Check for duplicate values.
 Conversion data types to datatime.
 Setting index.
 Check for missing values and
Imputation.
 Outlier detection and removal using
capping method.
 Visualization of the data.
Visualization:
1. Plot the historical oil prices to get an initial understanding of the trends and patterns.
A basic time series plot shows the historical data over time. Here we consider day wise data.
This is essential for understanding the underlying patterns, trends, and seasonality in the data.
From the above graph, we conclude that it is not constant or
not increasing or not decreasing. It is continuously fluctuating over the day.

2. Plot histogram graphical representation of data points organized into user specified ranges
3. Plot distplot which shows price data distribution.
4. Plot distplot which depicts the variation in the data distribution.
5. Plot histogram with only kernel density distribution.
6. BoxPlot to detect outlier in yearwise data.
7. LinePlot – give basic understanding of data.
8. ACF and PACF Plot.
• Check if data is stationary or not.
• Convert stationary using difference transformation.
• Convert stationary using log transformation.
Model Building:
LSTM Model:

ARIMA Model:

Holt-Winters Model:
Holts/double exponential method:

Simple Exponential Smoothing:


Support Vector Regression:

Prophet:
From the above table we get low RMSE value for SVR model but we are
not going to use this model because the relationship between oil prices
and influencing factors (like geopolitical events, economic indicators,
etc.) can be highly complex and may require more sophisticated models
to capture intricate patterns. SVR may not scale well with large datasets
due to its computational complexity, especially when dealing with a high
number of data points or features. SVR may struggle to capture complex
seasonal and trend patterns that are commonly present in time series
data.SO we are going to use LSTM model for our model deployment.
Deployment:

You might also like