Skip to content

Predicting next-month crude oil price movements using historical data and geopolitical conflict signals between israel and iran.

Notifications You must be signed in to change notification settings

syafino/geopolitics-oil-price-model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Geopolitics-oil-price-model

Predicting next-month crude oil price movements using historical data and geopolitical conflict signals between israel and iran.

  • Data: Monthly oil prices from 1983 to 2025 from https://www.kaggle.com/datasets/sc231997/crude-oil-price/data
  • Features:
    • Historical price
    • Monthly price change
    • Conflict indicator (binary feature: 1 if known conflict occurred during the month)
  • Target:
    • 0: Price drops >3%
    • 1: Price remains within ยฑ3%
    • 2: Price rises >3%

The model predicts the next month's price trend, which is visualized alongside historical data.

๐Ÿ“ˆ Model

We use a RandomForestClassifier to classify the next-month price trend into three categories. The model is trained and evaluated using a time-series-aware split (no shuffling), and performance is measured using precision, recall, and F1-score.

๐Ÿ”ฎ Prediction Visualization

The most recent known price is extended with a forecasted price point for July 2025, based on the predicted trend class:

  • Drop โ†’ -5%
  • Stable โ†’ ยฑ0%
  • Rise โ†’ +5%

This predicted point is visualized on a line chart, preserving historical context and highlighting known conflict months.

The model predicts price to be at 78.62, it currently sits at 74 (19 June 2025) . I will get back to it to see the accuracy

About

Predicting next-month crude oil price movements using historical data and geopolitical conflict signals between israel and iran.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published