← Back to all products

Balance Settlement Analytics Accelerator

$1990

Internal balance settlement for BRPs at 15-min resolution: imbalance volumes/costs, volume fees, and production-unit attribution. Ships a dependency-free settlement library + offline tests. Fully generic, currency-neutral Databricks Asset Bundle.

📁 16 files🏷 v1.0.0
Production-readyUnit-testedDatabricks Asset Bundle
✓ Instant download✓ Lifetime updates✓ MIT licensed✓ Secure checkout (Stripe)

⚙ Try the Live Demo interactive

Enter a settlement period (production, consumption, trades) and compute internal imbalance, imbalance cost and volume fees — the shipped settlement logic.

⚡ Open Imbalance Calculator

📋 What's Inside 16 files

  • README.md
  • LICENSE
  • manifest.json
  • databricks.yml
  • resources/jobs.yml
  • src/01_balance_settlement.sql
  • src/02_volume_fees.sql
  • src/03_energy_metering_split.sql
  • lib/settlement.py
  • tests/test_settlement.py
  • conftest.py
  • guide/01_what-you-get.md
  • guide/02_getting-started.md
  • guide/03_architecture.md
  • guide/04_support.md
  • guides/balance-settlement-methodology.md

📁 File Structure 16 files

balance-settlement-accelerator/
├── README.md
├── LICENSE
├── manifest.json
├── databricks.yml
├── resources/
│   ├── jobs.yml
├── src/
│   ├── 01_balance_settlement.sql
│   ├── 02_volume_fees.sql
│   ├── 03_energy_metering_split.sql
├── lib/
│   ├── settlement.py
├── tests/
│   ├── test_settlement.py
├── conftest.py
├── guide/
│   ├── 01_what-you-get.md
│   ├── 02_getting-started.md
│   ├── 03_architecture.md
│   ├── 04_support.md
├── guides/
│   ├── balance-settlement-methodology.md

📖 Documentation Preview README excerpt

Balance Settlement Analytics Accelerator

Internal balance settlement for **Balance Responsible Parties (BRPs)** at

15-minute resolution: imbalance volumes and costs, volume fees, and

production-unit attribution with hierarchical drill-down. Replaces

Excel-based settlement with a deploy-ready Databricks Asset Bundle.

Fully generic and **currency-neutral**: configure your own catalog/schema, map

your metering and trade sources, and point at your imbalance-price series.

What it computes

- **Internal balance** per business unit: production + purchases − consumption −

sales, at 15-min resolution.

- **Imbalance cost** at the TSO imbalance price.

- **Volume fees**: imbalance (on absolute imbalance), production, and

consumption fees.

- **Energy split**: metered energy attributed across production units by weight,

with spot-value attribution.

What's inside

- **Databricks Asset Bundle** — daily settlement job (3 dependent SQL tasks).

- **Three parameterized SQL steps** — settlement, volume fees, energy split.

- **A dependency-free settlement library** (`lib/settlement.py`) mirroring the

SQL, with an offline test suite (5 tests).

Quickstart

```bash

pip install pytest && pytest tests/ -v # validate settlement logic offline

databricks bundle deploy -t dev -p <profile>

```

Provide `settlement_entries`, `fee_rates`, `production_unit_shares`, and the

imbalance/spot price series (schemas in `guide/03_architecture.md`).

License

MIT — see `LICENSE`.

... preview truncated, see full README in product download.

📄 Code Sample .sql preview

src/01_balance_settlement.sql-- Balance Settlement: Core calculation at 15-min resolution. -- Internal balance per business unit = production + purchases - consumption - sales. -- Priced at the TSO imbalance price. Currency-neutral (imbalance_price column). CREATE OR REPLACE TABLE IDENTIFIER(:catalog || '.' || :schema || '.f_balance_settlement') AS WITH balance AS ( SELECT business_unit, start_time, SUM(CASE WHEN direction = 'production' THEN value ELSE 0 END) + SUM(CASE WHEN direction = 'purchase' THEN value ELSE 0 END) - SUM(CASE WHEN direction = 'consumption' THEN value ELSE 0 END) - SUM(CASE WHEN direction = 'sale' THEN value ELSE 0 END) AS imbalance_mwh FROM IDENTIFIER(:catalog || '.' || :schema || '.settlement_entries') GROUP BY business_unit, start_time ) SELECT b.business_unit, b.start_time, b.imbalance_mwh AS value, b.imbalance_mwh * COALESCE(p.imbalance_price, 0) AS imbalance_cost FROM balance b LEFT JOIN IDENTIFIER(:market_data_catalog || '.market_series.imbalance_prices') p ON b.start_time = p.start_time;