# georgeqanfin-stack/gb-power-market-microstructure architecture

> Architecture diagram of the GitHub repository georgeqanfin-stack/gb-power-market-microstructure, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/georgeqanfin-stack/gb-power-market-microstructure
- Repository: https://github.com/georgeqanfin-stack/gb-power-market-microstructure

## Overview

This repository is a quantitative research project for testing B6 boundary stress as a predictor of Scottish wind curtailment and GB Day-Ahead price direction, then evaluating a systematic trading strategy. The documented workflow collects NESO and Elexon data, explores it, classifies constraint regimes, derives directional signals, and evaluates evolving backtests. V4 adds macro filtering, rolling calibration, Wilson-score validation, and half-Kelly sizing. NIV analysis is a separate research branch. Source excerpts were unavailable, so links reflect README descriptions and notebook names; exact internal calls and data handoffs cannot be confirmed.

Main entry points: [`data/processed`](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/tree/main/data/processed) (Processed data), [`notebooks/01_data_collection.ipynb`](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/01_data_collection.ipynb) (Data collection), [`notebooks/05_backtest.ipynb`](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/05_backtest.ipynb) (Strategy backtest), [`notebooks/03_regime_classifier.ipynb`](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/03_regime_classifier.ipynb) (B6 classifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_research["Data research"]
  node_collection["Data collection"]
  node_processed["Processed data"]
  node_eda["Exploratory analysis<br/>[02_eda.ipynb]"]
end

subgraph group_signals["Signal research"]
  node_classifier["B6 classifier"]
  node_niv["NIV analysis"]
  node_directional["DA direction signal<br/>[05_backtest.ipynb]"]
end

subgraph group_strategy["Strategy evaluation"]
  node_backtest["Strategy backtest<br/>[05_backtest.ipynb]"]
  node_calibration["Rolling calibration"]
  node_macro["Macro filter"]
end

node_researcher(("Researcher"))
node_neso["NESO data"]
node_elexon["Elexon data"]
node_ttf["TTF prices"]

node_researcher -->|"initiates"| node_collection
node_neso -->|"provides data"| node_collection
node_elexon -->|"provides data"| node_collection
node_collection -->|"writes data"| node_processed
node_processed -->|"analyzed by"| node_eda
node_processed -->|"trains on"| node_classifier
node_processed -->|"analyzed by"| node_niv
node_classifier -->|"provides probability"| node_directional
node_directional -->|"evaluated in"| node_backtest
node_calibration -->|"recalibrates sizing"| node_backtest
node_ttf -->|"provides prices"| node_macro
node_macro -->|"filters signals"| node_backtest

click node_collection "https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/01_data_collection.ipynb"
click node_processed "https://github.com/georgeqanfin-stack/gb-power-market-microstructure/tree/main/data/processed"
click node_eda "https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/02_eda.ipynb"
click node_classifier "https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/03_regime_classifier.ipynb"
click node_niv "https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/04_niv_analysis.ipynb"
click node_directional "https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/05_backtest.ipynb"
click node_backtest "https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/05_backtest.ipynb"
click node_calibration "https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/06_rolling_window_recalibration.ipynb"
click node_macro "https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/07_macro_filter_backtest.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_collection,node_processed,node_eda toneBlue
class node_classifier,node_niv,node_directional toneAmber
class node_backtest,node_calibration,node_macro toneMint
class node_researcher,node_neso,node_elexon,node_ttf toneIndigo
```

## Components

### Data research

- [Data collection](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/01_data_collection.ipynb): `notebooks/01_data_collection.ipynb`
- [Processed data](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/tree/main/data/processed): `data/processed`
- [Exploratory analysis](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/02_eda.ipynb): `notebooks/02_eda.ipynb`

### Signal research

- [B6 classifier](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/03_regime_classifier.ipynb): `notebooks/03_regime_classifier.ipynb`
- [NIV analysis](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/04_niv_analysis.ipynb): `notebooks/04_niv_analysis.ipynb`
- [DA direction signal](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/05_backtest.ipynb): `notebooks/05_backtest.ipynb`

### Strategy evaluation

- [Strategy backtest](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/05_backtest.ipynb): `notebooks/05_backtest.ipynb`
- [Rolling calibration](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/06_rolling_window_recalibration.ipynb): `notebooks/06_rolling_window_recalibration.ipynb`
- [Macro filter](https://github.com/georgeqanfin-stack/gb-power-market-microstructure/blob/main/notebooks/07_macro_filter_backtest.ipynb): `notebooks/07_macro_filter_backtest.ipynb`

### Other components

- **Researcher**
- **NESO data**
- **Elexon data**
- **TTF prices**

## Connections

- Researcher → Data collection: initiates
- NESO data → Data collection: provides data
- Elexon data → Data collection: provides data
- Data collection → Processed data: writes data
- Processed data → Exploratory analysis: analyzed by
- Processed data → B6 classifier: trains on
- Processed data → NIV analysis: analyzed by
- B6 classifier → DA direction signal: provides probability
- DA direction signal → Strategy backtest: evaluated in
- Rolling calibration → Strategy backtest: recalibrates sizing
- TTF prices → Macro filter: provides prices
- Macro filter → Strategy backtest: filters signals
