Real-Time Energy Pricing in New Zealand: An Evolving Stream Analysis

Yibin Sun, Heitor Murilo Gomes, Bernhard Pfahringer, Albert Bifet · DOI

Introduction

In the field of machine learning, data streams represent sequences of information arriving at high velocity and potentially infinite volume. Unlike traditional batch learning, streaming algorithms must process each data point once and adapt immediately to evolving patterns. While stream classification has been extensively researched, streaming regression—predicting continuous values—remains underserved due to a lack of high-quality, real-world benchmarks.

This study addresses this gap by introducing a suite of datasets based on New Zealand’s real-time electricity pricing system, implemented in late 2022. The market generates a constant stream of volatile price data, providing an ideal environment for testing online learning algorithms against "concept drift"—where the underlying statistical properties of the data change over time due to seasonal shifts or infrastructure adjustments.

Methodology

The researchers evaluated several state-of-the-art online learning techniques to forecast prices and manage risk:

  • Streaming Regression: Four primary algorithms were tested: Sliding Window kNN, Random AMRules, Adaptive Random Forest (ARF-Reg), and Self-Optimising K-Nearest Leaves (SOKNL).
  • Prediction Intervals (PI): To account for uncertainty, the Adaptive Prediction Interval (AdaPI) method was used to generate dynamic price ranges rather than point estimates.
  • Drift Detection: The ADWIN and Page-Hinckley tests monitored model error rates to detect shifts in market behavior, signaling when models required adaptation.
  • Anomaly Detection: Unsupervised Half-Space Trees (HST) were employed to identify data points in low-density regions of the feature space.

Data Acquisition and Feature Engineering

The study utilized 18 months of data (November 2022 to April 2024) sourced from the New Zealand Electricity Market Information (EMI) platform. The analysis focused on six Points of Connection (PoCs) representing major population centers, including Auckland, Christchurch, and Wellington.

To preserve the cyclical nature of energy demand, the researchers applied trigonometric feature engineering. Time of day and day of the year were encoded using sine and cosine functions, allowing the models to recognize periodic patterns effectively.

Furthermore, the datasets were structured with varying "delay" factors (0.5, 4, 6, and 24 hours) to simulate real-world trading scenarios where predictions must be made well in advance of the actual market clearing.

Results and Discussion

The Self-Optimising K-Nearest Leaves (SOKNL) algorithm emerged as the top performer, consistently achieving the highest Coefficient of Determination ($R^2$), often exceeding 0.60 for 30-minute horizons. Its success is attributed to its ability to maintain historical relevance through leaf centroids while adapting to new data.

Drift detection results provided physical validation of the models; significant drifts were identified between May and July 2023, coinciding with the onset of the New Zealand winter and the associated shifts in heating demand. While prediction intervals remained reliable—covering the ground truth over 90% of the time—anomaly detection proved challenging. Low AUC scores suggest that extreme price spikes in energy markets are often rare but "normal" market events rather than traditional outliers, making them difficult for unsupervised models to isolate from noise.

Conclusion

This research demonstrates the utility of New Zealand's electricity market as a benchmark for streaming regression. While the current models provide robust forecasting, future improvements could involve integrating meteorological data (e.g., wind speed, rainfall) to better account for renewable energy fluctuations. The framework established here is designed for global scalability, offering a template for analyzing other international energy markets transitioning to real-time pricing.

Summary updated

BibTeX
@inproceedings{sun2024real,
  author = {Yibin Sun and Heitor Murilo Gomes and Bernhard Pfahringer and Albert Bifet},
  title = {{Real-Time Energy Pricing in New Zealand: An Evolving Stream Analysis}},
  booktitle = {PRICAI},
  year = {2024},
  url = {https://openreview.net/forum?id=zL8Nxu54Gk},
}
Figure