The Idea
Nordic electricity markets are split into 15 price zones. Five in Norway. Four in Sweden. Two in Denmark. One for Finland. And one each for Estonia, Latvia, and Lithuania. Prices can swing wildly between zones. On a windy day in southern Sweden, power might be nearly free while northern Norway pays five times as much.
I wanted to build something that would make these prices visible. Something that would pull real data from the official European transparency platform and turn it into forecasts. Something I could actually use.
The result is a dashboard that fetches electricity prices across all Nordic and Baltic markets and forecasts volatility using GARCH models.

Why This Matters
Electricity is not like other commodities. You cannot store it easily. Supply and demand must balance in real time. When wind farms produce more than expected, prices drop. When a nuclear plant goes offline, prices spike. These movements happen fast.
For traders, knowing where volatility is heading matters. A quiet market behaves differently than a volatile one. Position sizes change. Hedging strategies change. Risk limits change.
For analysts, understanding price patterns across zones reveals something about the physical grid. When prices diverge between Norway and Sweden, it often means transmission lines are congested. When Baltic prices move independently from Nordic prices, it suggests the interconnectors are at capacity.
For researchers, having clean historical data in one place saves time. The ENTSO-E API is free but awkward to work with. This dashboard handles the data fetching, cleaning, and storage.

What the Dashboard Does
The dashboard has three main functions.
Price monitoring. Select any of the 15 zones and see current prices, historical trends, and basic statistics. The data updates automatically when you load the page. You can compare prices across zones or focus on a single market.
Volatility forecasting. The GARCH model generates 24 hour volatility forecasts based on recent price movements. The forecast tells you whether to expect calm or turbulent conditions ahead. The model parameters are displayed so you can judge the quality of the fit.
Backtesting. Run historical simulations to see how well the volatility model would have performed. The backtest uses walk forward validation, which means the model only sees past data when making each prediction. This gives an honest estimate of real world accuracy.
How It Works
The data comes from the ENTSO-E Transparency Platform. This is the official source for European electricity market data. The API provides day ahead prices for every bidding zone in Europe.
Fetching data reliably required some engineering. APIs fail. Networks timeout. Rate limits exist. The data pipeline retries failed requests with increasing delays between attempts. This sounds simple but makes the difference between a demo that works once and a tool that works every time.
for attempt in range(self.max_retries): try: prices = self.client.query_day_ahead_prices(zone, start, end) return prices except Exception as e: sleep_time = self.retry_delay * (2 ** attempt) time.sleep(sleep_time)
The prices live in a SQLite database with indexes on zone and timestamp. The database holds about 100,000 hourly price points per zone per year. Queries are fast even with several years of history.

The GARCH Model
GARCH stands for Generalized Autoregressive Conditional Heteroskedasticity. The name is intimidating but the idea is simple. Volatile periods tend to cluster together. A big price move today makes another big move tomorrow more likely. GARCH captures this pattern mathematically.
The model tracks volatility with two key parameters. Alpha measures how much today’s shock affects tomorrow’s forecast. Beta measures how long volatility persists before fading. For Nordic power prices, the sum of alpha and beta typically lands between 0.85 and 1.0. This means volatility shocks take days or weeks to fully dissipate.
The conditional variance follows this formula:
In backtesting, the model achieves around 70% direction accuracy. It correctly predicts whether volatility will rise or fall about seven times out of ten. This is meaningfully better than random guessing and useful for practical decisions.

Who Can Use This
Energy traders can monitor price movements and volatility across Nordic markets. The forecasts help with position sizing and risk management.
Risk analysts can use the volatility estimates for Value at Risk calculations and stress testing. The backtest results provide evidence for model validation.
Researchers get a clean data pipeline and historical database without having to build their own ENTSO-E integration.
Students learning about energy markets or time series modeling can see a complete working example. The code shows how to go from raw API data to forecasts.
Anyone curious about electricity prices can explore how prices vary across the Nordic region. The dashboard makes abstract market data concrete and visual.
What I Learned
Building this project taught me things that are hard to learn from textbooks.
Production code is different from research code. My first implementation worked on clean test data. It crashed on actual database output because the query returned a DataFrame when the function expected a Series. I spent hours adding type checks and input validation. Defensive coding is not paranoia. It is professionalism.
Cloud deployment has different rules. On my laptop, I run a script once and the database exists forever. On Streamlit Cloud, the filesystem resets on every deploy. The app needs to create its own database and fetch fresh data on startup. This took a full rewrite of the initialization logic.
Timezone bugs are everywhere. When your data comes from multiple sources or is fetched at different times, timestamps might have inconsistent timezone information. Pandas warns you. Then it crashes. Adding explicit timezone handling everywhere is the safe approach.
Read the research before debugging. I spent days trying to fix GARCH forecasts that looked wrong. The model kept producing flat lines or explosive predictions. It turned out this was correct behavior for electricity prices, where volatility persistence is often near one. The academic papers explain this. I should have read them first.
Simple models can be powerful. A basic GARCH(1,1) with no fancy extensions achieves 70% direction accuracy. Adding complexity might help marginally but the simple version already captures most of the signal.
Try It Yourself
The dashboard is deployed at nordic-power-dashboard.streamlit.app. It fetches fresh data automatically when you load the page. Select a zone, generate a forecast, run a backtest.
The complete code is on GitHub. The repository includes the data pipeline, GARCH implementation, and Streamlit interface.

If you work in Nordic energy markets or study electricity price dynamics, I would be interested to hear your thoughts. There is more I want to add. Cross zone spread analysis. Weather integration. Longer forecast horizons. But the foundation is solid and the tool is useful today.






Leave a Reply