# Germany GridFlex annual counterfactual study

This package downloads hourly Germany (DE) electricity-market series from Bundesnetzagentur | SMARD.de and runs a one-year, same-local-day demand-shifting sensitivity analysis.

## Reproduce
```bash
python3 -m unittest -v test_run_study.py
python3 run_study.py --output-dir ./output
```

Python standard library only. Network access is required to retrieve the SMARD index and hourly blocks.

## Data attribution and licence
Bundesnetzagentur | SMARD.de — Creative Commons Attribution 4.0 International (CC BY 4.0): https://www.smard.de/en/datennutzung

The included hourly CSV is shared under the SMARD data licence with the required attribution. Derived analysis and code are separate works. Changes: five hourly series were joined and a counterfactual demand-shifting heuristic was applied.

## Files
- run_study.py — downloader, data-quality checks, model and output writer
- test_run_study.py — eight unit tests
- smard_hourly_2025-11-02_to-2026-11-02.csv — raw hourly series
- results.json — observed baseline, validation and nine scenarios
- results.json.sha256 — checksum for results.json
- report.md / report.html — study report

## Evidence boundary
This is a deterministic hourly counterfactual sensitivity analysis. It does not estimate actual demand-response participation, prices, system cost, local congestion, emissions or field performance. Do not use for live dispatch, engineering design or investment decisions.
