shouldibuygastoday

Model

WTI Futures Gas Signal

Predicts whether gas prices are more likely to rise by using short-term WTI crude oil price trends.

Accuracy52%
AlgorithmGradientBoostingClassifier · 100 trees · depth 3 · lr 0.1
DataYahoo Finance (training), OilPriceAPI (live pipeline)

Decision surface

The model's buy probability across its two most influential features. Every point was computed by calling model.predict_proba on the actual .joblib. Drag to rotate.

What the model pays attention to

wti_price_change_7d_lag_711%
wti_price_change_1d9%
wti_price_14d_avg8%
wti_price_change_14d8%
wti_volatility_14d8%
wti_volatility_7d8%
wti_price_change_3d7%
wti_price7%
wti_price_lag_77%
wti_price_change_1d_lag_36%
wti_price_lag_35%
wti_price_change_7d5%
wti_price_lag_14%
wti_price_7d_avg4%
wti_price_3d_avg3%

Approach

I trained this model on historical Yahoo Finance crude oil futures data for CL=F and used OilPriceAPI as the live production source configuration. I engineered features to capture short-term trend, momentum, lag, and volatility, including rolling averages, recent price changes, lagged prices, lagged changes, and rolling standard deviations. I compared Logistic Regression, Random Forest, and Gradient Boosting, then tuned Random Forest hyperparameters and selected the final model based on balanced accuracy and overall test performance. The model is designed to contribute one forward-looking oil market signal to the broader ensemble system behind Should I Buy Gas Today.

Features

wti_pricefloat
Current WTI crude oil price in USD (latest daily close).
wti_price_3d_avgderived
3-day rolling average of WTI close.
wti_price_7d_avgderived
7-day rolling average of WTI close.
wti_price_14d_avgderived
14-day rolling average of WTI close.
wti_price_change_1dderived
1-day change in WTI price.
wti_price_change_3dderived
3-day change in WTI price.
wti_price_change_7dderived
7-day change in WTI price.
wti_price_change_14dderived
14-day change in WTI price.
wti_volatility_7dderived
7-day rolling standard deviation of WTI close.
wti_volatility_14dderived
14-day rolling standard deviation of WTI close.
wti_price_lag_1derived
WTI close lagged 1 trading day.
wti_price_lag_3derived
WTI close lagged 3 trading days.
wti_price_lag_7derived
WTI close lagged 7 trading days.
wti_price_change_1d_lag_3derived
1-day WTI change, measured 3 trading days earlier.
wti_price_change_7d_lag_7derived
7-day WTI change, measured 7 trading days earlier.

Built by

Marcus Holder

Student at Arizona State University with an interest in analytics, predictive modeling, and practical data storytelling. This project applies machine learning to a consumer decision problem by using energy market data to estimate short-term gas price direction.

Trained on

2020-01-01 to 2026-01-01

All models