Skip to content

ouafaebousbaa-io/caiso-price-forecast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

CAISO Price Forecast

This project implements a basic pipeline for forecasting hourly electricity prices in the California ISO (CAISO) markets. It demonstrates how to ingest public market data from the CAISO OASIS API, prepare a time-series dataset, and train baseline models to predict future prices.

Data sourcing

The CAISO OASIS service provides historical price data for day-ahead and real-time markets. A helper function in caiso_price_forecast.py fetches price data by constructing a query to the OASIS endpoint with parameters for market (e.g. DAM for day-ahead) and node. The downloaded zip file is parsed into a Pandas DataFrame.

Modeling

The script supports two forecasting approaches:

  • ARIMA: A classical autoregressive integrated moving average model. It is simple and fast to fit and serves as a baseline. In the __main__ section, a demonstration uses an ARIMA(5,1,0) model on a synthetic dataset, achieving a root-mean-square error (RMSE) around 3.9 on a 24-hour forecast horizon.

  • LSTM (optional): A recurrent neural network model implemented with PyTorch. If PyTorch is available, the script can train a single-layer LSTM on normalized price data and forecast future prices. Users can adjust the look-back window and number of training epochs. The LSTM section is wrapped in a try/except block so that the script still runs when PyTorch is unavailable.

Usage

  1. Clone this repository and install the required Python packages (pandas, numpy, statsmodels, and optionally torch and scikit-learn).
  2. To fetch CAISO price data, call fetch_oasis(start, end, market, node) with the desired date range.
  3. Fit an ARIMA model with arima_forecast(series, order, steps) and optionally an LSTM model with lstm_forecast(series, look_back, steps, epochs).
  4. Run the module directly (python caiso_price_forecast.py) to execute a synthetic demonstration and print RMSE metrics.

Notes

  • This repository is intended as a starting point for more advanced forecasting work. You can extend it by adding exogenous variables (load, renewable generation, weather) and performing more sophisticated model selection. For an example of a similar project where LSTM models reduced the root-mean-square error by 40–50 % compared with ARIMA for CAISO prices, see Morgan‑Sell’s GitHub project.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages