What Will Electricity Cost Tomorrow, Half-Hour by Half-Hour?
From the recent price history, what will the next 48 half-hourly electricity prices be? A business that can shift its use to the cheap hours saves real money.
The table
Half-hourly electricity prices from the ICON 2014 forecasting challenge, with calendar fields, load and wind forecasts, weather and the day-ahead price. It's in Welt's research catalogue as Electricity Prices from the ICON 2014 Forecasting Challenge, 38,014 rows by 18 columns, licensed Public. The catalogue measures its signal at 0.38, in time order. Chronos-2 forecasts the series in one request and needs no training. Chronos-2 reads up to 8,000 steps of history per series, so the walkthrough keeps the latest 8,000.
Walkthrough
Load it from the catalogue
Find the table, read its recorded target and print the column names.
import pandas as pd from welt import Client, Forecast with Client() as client: item = client.research_datasets(q="electricity prices ICON 2014", limit=1)["items"][0] info = client.research_dataset(item["id"]) data = client.load_research_dataset(item["id"]) target = info["targets"][0] target = target["name"] if isinstance(target, dict) else target print([column["name"] for column in info["schema"]], target)Pick the history
Keep the time column and the target.
time = "datetime" history = data[[time, target]].dropna() history[time] = pd.to_datetime(history[time]) history = history.sort_values(time).tail(8000)Forecast with a range
Ask for the next 48 steps, one per half-hour. The median is the forecast, and the 10% and 90% columns give a low and a high case.
model = Forecast(model="chronos-2").fit(history, time=time, target=[target]) result = model.forecast(48, quantile_levels=[0.1, 0.5, 0.9]) print(result.to_frame()[["timestamp", "median", "q_0.1", "q_0.9"]].head(48))
What you get
Try it
Use Open with to run the research datasets notebook in Colab, Kaggle or Jupyter and search for "electricity prices ICON 2014", or run the code above after pip install "welt-client[parquet]".
Open with
- Type
- Use case
- Area
- Energy
- Question
- What Will Electricity Cost Tomorrow, Half-Hour by Half-Hour?
- Model
- Chronos-2
- Data
- Electricity Prices from the ICON 2014 Forecasting Challenge, 38,014 rows
- For
- Energy traders and large power users
- Licence
- Public