Skip to content
Samiel Remulla
← Selected work

Gas Wait

Should I fill up now, or wait?

Gas Wait uses market data to predict whether U.S. gasoline prices are likely to rise or fall over the following week.

The problem

Gas prices change constantly, but consumers usually have no way to know whether today's price is likely to be better or worse in the near future.

Gas Wait explores whether market data can provide useful information to help people decide when to buy gas.

The idea

The consumer-facing question is simple: should I fill up now, or wait?

The underlying model analyzes gasoline and petroleum-market information and converts the prediction into a signal anyone can read.

FILL UP

Prices may rise

WAIT

Prices may fall

NO CLEAR SIGNAL

The model is not confident enough

How it works

The current model uses Ridge regression. It takes gasoline and petroleum-market information, estimates the expected price movement, and turns that into a consumer signal.

  1. Market data
  2. Feature engineering
  3. Predictive model
  4. Expected price movement
  5. Consumer signal

The major inputs:

  • U.S. retail gasoline prices
  • Crude oil prices
  • Wholesale gasoline prices
  • Gasoline inventories
  • Recent price movement
  • Seasonal patterns

The results

Directional accuracy
77.3%
Baseline directional accuracy
68.1%
Average prediction error
2.86¢
Baseline average error
3.95¢
Weeks in final holdout test
525
Walk-forward directional accuracy
79.1%

The model correctly predicted whether gasoline prices would rise or fall about 3 out of 4 times on historical data it had never seen before.

What I found

The biggest improvement came from incorporating daily crude oil and wholesale gasoline market information. Those movements can provide useful information about where consumer gasoline prices are headed.

Inventory and seasonal information provided relatively small additional improvements in the initial experiments. Regional experiments showed that geographic matching can help in some areas, but a geographically closer wholesale market is not automatically a better predictor.

Built with

Python, pandas, NumPy, scikit-learn, Matplotlib, and the EIA API.

  • Data ingestion and preprocessing
  • Feature engineering and predictive modeling
  • Time-series backtesting and walk-forward validation
  • Point-in-time data handling and leakage testing
  • Prediction CLI, signal generation, and prediction history
  • Automated tests — 59 tests passing

Validation

The model was evaluated with chronological time-series testing and walk-forward validation, so later weeks are tested against what could have been known at the time — not a random mix of the past and the future.

The system includes safeguards against using future information when making historical predictions.

Current limitations

  • Predicts approximately one week ahead
  • Predicts the national U.S. average
  • Does not predict individual gas stations
  • Does not currently provide reliable 24–72 hour local predictions
  • Does not guarantee that a prediction will be correct
  • Does not guarantee savings

What's next

The current MVP is a weekly national-level research tool. The long-term goal is a local 24–72 hour prediction tool.

Future versions could include local and metro gasoline predictions, 24-hour, 48-hour, and 72-hour horizons, and location-aware recommendations.

Should I get gas now, or should I wait?

The goal is to turn complicated oil and gasoline market information into a simple decision anyone can understand.