← Back to all products

Flexibility Asset Trading Analytics Accelerator

$1990

Reserve-market trading analytics for flexibility assets (BESS, demand response, thermal) across FCR-N/D, aFRR, mFRR. Modular TVFs for asset metadata, offers, results, and per-market performance, plus a dependency-free KPI library + offline tests. Fully generic and currency-neutral.

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

⚙ Try the Live Demo interactive

Set offered MW, acceptance rates and prices across reserve markets and see revenue and acceptance KPIs — the same aggregation as the trades_sum TVF.

⚡ Open Revenue Simulator

📋 What's Inside 17 files

  • README.md
  • LICENSE
  • manifest.json
  • databricks.yml
  • resources/jobs.yml
  • src/tvfs/asset_metadata.sql
  • src/tvfs/market_offer.sql
  • src/tvfs/market_result.sql
  • src/tvfs/trades_sum.sql
  • lib/trading_kpis.py
  • tests/test_trading_kpis.py
  • conftest.py
  • guide/01_what-you-get.md
  • guide/02_getting-started.md
  • guide/03_architecture.md
  • guide/04_support.md
  • guides/flexibility-trading-methodology.md

📁 File Structure 17 files

flexibility-trading-accelerator/
├── README.md
├── LICENSE
├── manifest.json
├── databricks.yml
├── resources/
│   ├── jobs.yml
├── src/
│   ├── tvfs/
│   │   ├── asset_metadata.sql
│   │   ├── market_offer.sql
│   │   ├── market_result.sql
│   │   ├── trades_sum.sql
├── lib/
│   ├── trading_kpis.py
├── tests/
│   ├── test_trading_kpis.py
├── conftest.py
├── guide/
│   ├── 01_what-you-get.md
│   ├── 02_getting-started.md
│   ├── 03_architecture.md
│   ├── 04_support.md
├── guides/
│   ├── flexibility-trading-methodology.md

📖 Documentation Preview README excerpt

Flexibility Asset Trading Analytics Accelerator

A complete trading-analytics platform for **flexibility assets** — batteries

(BESS), demand response, and thermal flexibility — participating in reserve

markets (**FCR-N, FCR-D, aFRR, mFRR**). Built on modular **table-valued

functions** so every dashboard reads from a stable, composable interface.

Fully generic: configure your own catalog/schema, map your asset registry and

trading source tables, and set your TSO's market IDs. Currency-neutral.

What it answers

- What did each asset offer vs. what cleared each market? (**acceptance rate**)

- What revenue did each asset/market earn?

- How does the portfolio perform per market (FCR-N vs aFRR vs mFRR)?

- What would an alternative bidding strategy have earned? (**strategy uplift**)

Architecture

All analytics call TVFs parameterized by `(start_date, end_date)`:

- `asset_metadata()` — registry with power/energy capacity, SoH, efficiency

- `market_offer(start, end)` — submitted bid volumes + prices

- `market_result(start, end)` — accepted volumes + revenue

- `trades_sum(start, end)` — offered vs accepted, acceptance rate, revenue

The same aggregation is reproduced in `lib/trading_kpis.py` (pure Python), so you

can validate KPIs and run strategy comparisons offline.

What's inside

- **Databricks Asset Bundle** — daily job deploying the TVFs.

- **Four composable TVFs** — currency-neutral, timezone-configurable.

- **A dependency-free KPI library** (`lib/trading_kpis.py`): acceptance rate,

per-market summary, portfolio totals, and strategy comparison.

- **An offline test suite** (`tests/`, 6 passing tests).

Quickstart

```bash

pip install pytest && pytest tests/ -v # validate KPIs offline

databricks bundle deploy -t dev -p <profile>

```

Map your source tables (`market_offers`, `market_results`, and the registry

`asset_metadata`) to the schemas in `guide/03_architecture.md`, and set your

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

📄 Code Sample .sql preview

src/tvfs/asset_metadata.sql-- Flexibility Trading: Asset Metadata TVF -- Returns registry metadata for all flexibility assets (power/energy capacity, -- state of health, efficiency). Maps your asset registry to a stable schema. CREATE OR REPLACE FUNCTION IDENTIFIER(:catalog || '.' || :schema || '.asset_metadata')() RETURNS TABLE ( asset_id STRING, asset_type STRING, asset_name STRING, asset_display_name STRING, nominal_active_power_mw DOUBLE, energy_capacity_mwh DOUBLE, soh_initial DOUBLE, efficiency_charging DOUBLE ) RETURN SELECT asset_id, asset_type, asset_name, CONCAT(asset_type, ' - ', asset_name) AS asset_display_name, nominal_active_power_mw, energy_capacity_mwh, soh_initial, efficiency_charging FROM IDENTIFIER(:catalog || '.' || :registry_schema || '.asset_metadata');