BMRS Dataset
Description
This repository contains the data and methods used to build and analyse a half-hourly Great Britain balancing-market dataset derived from the Elexon BMRS portal. The workflow begins with programmatic extraction of demand, renewable forecasts and actuals, generation by type, margin, imbalance, NETBSAD, system prices, and frequency data from BMRS, which are then consolidated into a structured source panel. This panel is transformed through the UK Grid Analysis workbook layer, where the BMRS_Base query engineers the main analytical variables, including renewable generation, renewable share, gas share, forecast errors, imbalance and price measures, frequency deviations, bins, and lag/delta terms. The resulting export tables feed Python-based econometric analysis covering descriptives, correlations, OLS, robust and HAC inference, diagnostics, fixed effects, quantile models, event models, influence tests, and related robustness checks. In a second analytical branch, daily UK and EU gas market data are merged into the BMRS panel to create patched datasets used for gas-control specifications and extended testing. Final curated manuscript figures are then generated from the statistical result workbooks. The package is intended to support transparency, reproducibility, and reuse of the study’s data construction and empirical workflow.
Files
Steps to reproduce
Step 1. Run the BMRS extraction script for the required date span and selected source sections, and save the consolidated output as ELEXON FULL.xlsx or an equivalent frozen source workbook. Step 2. Refresh the UK Grid Analysis workbook(s) using the required BMRS_StartDate and BMRS_EndDate values. This populates BMRS_Base and all derived workbook outputs, including BMRS_SPSS_Export. Step 3. Run bmrs_stats_runner_ultrastack.py on the workbook export tables to generate the Elexon-only descriptive, econometric, diagnostic, and chart outputs. Step 4. Run bmrs_gas_patch_runner 1.py with the BMRS workbook(s) and the UK/EU gas CSVs to produce patched datasets and merged-gas analytical outputs. Where patched files already exist, bmrs_stats_engine_mobile_gui_v2.py can be used instead for stats-only execution. Step 5. Run bmrs_curated_figure_builder.py on the relevant results workbooks to produce the final curated figure package.