> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nexenergie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Interpreting Nexenergie Forecast Results Effectively

> Learn to read Nexenergie forecast fields, weight confidence intervals, and use accuracy metrics for better trading decisions in OMIE markets.

Getting a forecast response from the API is only the first step. Understanding what each field means, how to weight the confidence interval, and when to trust or discount a given forecast determines how much practical value Nexenergie delivers in your workflows. This guide explains the semantics behind the response fields and shows you how to layer in accuracy metrics to make more informed trading decisions.

## Key Response Fields

Every forecast response — whether day-ahead or intraday — shares the same core structure. The table below explains each field and describes how to put it to use.

| Field            | Meaning                                                           | How to Use                                                                                                    |
| ---------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| `forecast_price` | Point estimate of the settled OMIE price in EUR/MWh.              | Use as the primary central forecast in models, bid strategies, and P\&L projections.                          |
| `lower_bound`    | Lower edge of the model's confidence interval in EUR/MWh.         | Represents a conservative low-price scenario. Use when stress-testing for downside revenue risk.              |
| `upper_bound`    | Upper edge of the model's confidence interval in EUR/MWh.         | Represents a conservative high-price scenario. Use when stress-testing for upside cost exposure.              |
| `model_version`  | Identifier of the ML model that generated the forecast.           | Record this alongside your stored forecasts so you can correlate accuracy shifts with specific model updates. |
| `data_as_of`     | UTC timestamp of the latest input data incorporated by the model. | Always check this before acting on a forecast. A stale `data_as_of` value may indicate a data pipeline delay. |

## Using Confidence Intervals

The gap between `lower_bound` and `upper_bound` is the model's quantified uncertainty for that hour. A narrow band means the model is relatively confident in the point estimate; a wide band means the forecast is more speculative and your actual exposure could vary significantly from `forecast_price`.

Wider bands are most common during:

* **Hours of high renewable penetration** — solar and wind are inherently variable, and small forecast errors in generation mix propagate into larger price uncertainty.
* **Unusual weather conditions** — storms, heat waves, or unexpected cold snaps that fall outside the model's training distribution.
* **Peak demand periods** — morning and evening ramps where marginal generation can swing quickly.

Use the following snippet to compute the band width for each hour and flag hours where uncertainty exceeds a threshold you define.

```python Python theme={null}
import requests

BASE_URL = "https://app.nexenergie.ai/api/v1"
TOKEN = "<your_token>"
UNCERTAINTY_THRESHOLD = 20.0  # EUR/MWh

response = requests.get(
    f"{BASE_URL}/forecasts/day-ahead",
    params={"date": "2024-11-15"},
    headers={"Authorization": f"Bearer {TOKEN}"},
)
response.raise_for_status()
data = response.json()

for entry in data["forecasts"]:
    band_width = entry["upper_bound"] - entry["lower_bound"]
    flag = " ⚠️  HIGH UNCERTAINTY" if band_width > UNCERTAINTY_THRESHOLD else ""
    print(
        f"Hour {entry['hour']:02d}: {entry['forecast_price']:.2f} EUR/MWh "
        f"[{entry['lower_bound']:.1f}–{entry['upper_bound']:.1f}] "
        f"band={band_width:.1f}{flag}"
    )
```

As a general practice, avoid relying on the point estimate alone during high-uncertainty hours. Consider using `lower_bound` as the effective price in cost calculations when you are the buyer, and `upper_bound` when you are the seller.

## Comparing Forecasts Across Sessions

As the delivery day progresses, each successive intraday session incorporates fresher weather observations, updated ENTSO-E telemetry, and more recent OMIE settlement data. This means the later the session, the more accurate its forecast tends to be for near-term hours.

* **Day-ahead** — broadest coverage (all 24 hours), generated the day before delivery. Best for overall daily planning.
* **Intraday session 1** — first intraday revision; useful for adjusting morning positions using early-day actuals.
* **Intraday session 2** — benefits from mid-morning solar and wind actualization; best for afternoon position management.
* **Intraday session 3** — highest data freshness; typically the most accurate for evening hours, though with the narrowest coverage window.

When your trading decision involves hours that are covered by multiple sessions, **always prefer the forecast from the latest available session**. The incremental accuracy gain from session 1 to session 3 is most significant for the hours closest to real time.

## Combining with Accuracy Metrics

Even a well-calibrated model has bad days. The `/metrics/accuracy` endpoint gives you a rolling view of how the model has been performing recently, which you can use to dynamically size your risk buffer.

```python Python theme={null}
response = requests.get(
    f"{BASE_URL}/metrics/accuracy",
    params={"market": "day-ahead", "days": 7},
    headers={"Authorization": f"Bearer {TOKEN}"},
)
response.raise_for_status()
metrics = response.json()

mae = metrics["mae"]
print(f"7-day rolling MAE: {mae:.2f} EUR/MWh")

if mae > 15.0:
    print("⚠️  MAE is elevated. Consider widening your risk buffer before using forecasts.")
```

As a practical rule of thumb:

* **MAE \< 8 EUR/MWh** — model is performing well; standard risk parameters apply.
* **MAE 8–15 EUR/MWh** — moderate degradation; apply a modest widening to bid-offer spreads or position limits.
* **MAE > 15 EUR/MWh** — significant degradation; widen risk buffers meaningfully, and cross-check forecasts against the Market Data tab for unusual fundamentals.

<Note>
  Nexenergie forecasts are updated at defined intervals aligned with OMIE session gate closures — they are not updated in real time. Always check the `data_as_of` field in the response to confirm you are acting on the most recently generated forecast before placing orders.
</Note>

<Accordion title="What should I do if prices spike unexpectedly?">
  Unexpected price spikes — where the settled price lands far outside the confidence band — can have several causes. Here is a structured approach to investigating them:

  1. **Review accuracy metrics for that session and date** — navigate to the [Accuracy tab in the dashboard](/guides/using-the-dashboard#accuracy-tab) or query `/metrics/accuracy` for the affected period. A spike in RMSE for that date confirms the model missed broadly, not just for one hour.

  2. **Examine ENTSO-E fundamentals** — open the [Market Data tab in the dashboard](/guides/using-the-dashboard#market-data-tab) for the delivery date. Look for anomalies in the generation mix (e.g., unexpected nuclear outage, hydro constraint, or wind collapse) or a demand surge that would not have been predictable from the prior day's data.

  3. **Check `data_as_of`** — if the `data_as_of` timestamp is significantly earlier than expected, the model may have run on stale inputs due to an upstream data feed delay. In this case the wider confidence band is the signal to act on, not the point estimate.

  4. **Contact support** — if anomalies persist across multiple sessions or dates, or if you believe a data feed issue has gone undetected, reach out to the Nexenergie support team with the affected `date`, `session`, and `model_version` values so the team can investigate promptly.
</Accordion>

<CardGroup cols={2}>
  <Card title="Accuracy Metrics Concepts" icon="chart-line" href="/concepts/accuracy-metrics">
    Understand how MAE, RMSE, and MAPE are calculated for Nexenergie forecasts and what drives changes in model performance.
  </Card>

  <Card title="Accuracy Metrics API Reference" icon="code" href="/api-reference/metrics/accuracy">
    Full parameter reference and response schema for the `/metrics/accuracy` endpoint.
  </Card>
</CardGroup>
