weltby Ergodic Sign inGet started
All use cases

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.

Use caseEnergyForecastingPrediction

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

  1. 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)
  2. 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)
  3. 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

Tomorrow's pricesEvery half hour with a range.
The cheap hoursPlan flexible use around the low points.
An honest signalPrices are hard to forecast, and the range says how hard.

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]".