{"id":39225223,"url":"https://github.com/simon-hirsch/online-mv-distreg","last_synced_at":"2026-01-17T23:34:29.358Z","repository":{"id":286081127,"uuid":"945871451","full_name":"simon-hirsch/online-mv-distreg","owner":"simon-hirsch","description":"Reproduction code for the paper on online multivariate distributional regression for electricity price forecasting","archived":false,"fork":false,"pushed_at":"2025-10-02T07:50:39.000Z","size":21509,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-02T09:28:01.690Z","etag":null,"topics":["data-science","distributional-regression","electricity-price-forecasting","machine-learning","online-learning","probabilistic-forecasting","reproducible-research","statistics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simon-hirsch.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-10T09:02:19.000Z","updated_at":"2025-10-02T07:50:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"6929d9c2-6e28-4798-9f0f-e6bd46bb9e62","html_url":"https://github.com/simon-hirsch/online-mv-distreg","commit_stats":null,"previous_names":["simon-hirsch/online-mv-distreg"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simon-hirsch/online-mv-distreg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-hirsch%2Fonline-mv-distreg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-hirsch%2Fonline-mv-distreg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-hirsch%2Fonline-mv-distreg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-hirsch%2Fonline-mv-distreg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simon-hirsch","download_url":"https://codeload.github.com/simon-hirsch/online-mv-distreg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon-hirsch%2Fonline-mv-distreg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28522310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T22:11:28.393Z","status":"ssl_error","status_checked_at":"2026-01-17T22:11:27.841Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","distributional-regression","electricity-price-forecasting","machine-learning","online-learning","probabilistic-forecasting","reproducible-research","statistics"],"created_at":"2026-01-17T23:34:28.820Z","updated_at":"2026-01-17T23:34:29.353Z","avatar_url":"https://github.com/simon-hirsch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Regularized Online Multivariate Distributional Regression\n\nThis repo holds the experiments for the Paper _[Online Multivariate Regularized Distributional Regression for High-dimensional Probabilistic Electricity Price Forecasting\n(Link to Arxiv)](https://arxiv.org/abs/2504.02518)_.\n\n## The Paper Summarized in 2 Plots\n\nThe day-ahead electricity market is the main venue for trading electricity in Germany. A lot of work is done on forecasting the prices, however, many papers treat the 24 hourly day-ahead prices as 24 independent univariate time series. However, the prices are strongly correlated across hours of the day. If you want to optimize a portfolio / a battery / a power plant, you need to take these dependencies into account. Hence, you want your simulations to reflect these dependencies, that is, you want the predictions to look like the right figure, and not like the left:\n\n![Exemplary scenarios](experiments/epf_germany/figures/simulations_comp.png)\n\nTo achieve this, we use a multivariate distributional regression model that models the full joint distribution of the 24 prices. This allows us to capture the dependencies between the prices, also conditional on covariates like renewable energy forecasts or daily seasonality.\n\nHowever, distributional regression models are pretty slow to fit. Therefore, we develop an online algorithm that is much faster to fit, while achieving similar predictive performance. The following figure shows the trade-off between computation time and predictive performance (log-score). The proposed online algorithm (blue) achieves similar performance as the batch algorithm (orange), but is much faster to fit.\n\n![Efficient frontier of computation time against predictive accuracy](experiments/epf_germany/figures/eff_frontier.png)\n\n## Data\n\nThe data used in the revised version of the paper is not included in this repository as it cannot be shared publicly. The author gratefully acknowedges Arkadiusz Lipiecki, Bartosz Uniejewski, Rafał Weron for sharing the data and allowing its use in this research. Please contact the authors of [Lipiecki et al. \"Postprocessing of point predictions for probabilistic forecasting of day-ahead electricity prices: The benefits of using isotonic distributional regression\". Energy Economics 139 (2024)](https://www.sciencedirect.com/science/article/pii/S014098832400642X) for access to the data.\n\nA similar, but shorter dataset can be taken from [Marcjasz, Grzegorz, et al. \"Distributional neural networks for electricity price forecasting.\" Energy Economics 125 (2023)](https://www.sciencedirect.com/science/article/pii/S0140988323003419?casa_token=l42k_WCgotYAAAAA:ee4hs1n7VyZDJlczYjv9Ja86pdcpZJ19K-tToJc7WEX-KxNOmk3GS_gG2qfmOrlk7h2vQAx2uf1R) and the according [Github repository](https://github.com/gmarcjasz/distributionalnn). The differences between both data sets are discussed in Lipiecki et al. (2024). The initial version of this paper was based on this data set and the results qualitatively hold for both data sets.\n\nPlease name the data set and place it in this folder:\n\n```bash\n/experiments/epf_germany/de_price_long.csv\n```\n\nand ensure it has the following columns:\n\n- [empty]\n- Price\n- Load_DA_Forecast\n- Renewables_DA_Forecast\n- EUA\n- API2_Coal\n- TTF_Gas\n- Brent_oil\n\nso that the data preprocessing script works without changes.\n\n## Requirements\n\nThe following packages are needed to run the experiments\n\n- scipy\n- numba\n- numpy\n- pandas\n- scikit-learn\n- ondil\n- scoringrules\n- matplotlib\n- seaborn\n- arch\n- tqdm\n\n## Reproduction steps\n\nThe file `run_study.sh` contains a bash script that creates a conda environment, installs the requirements and runs the experiments. Please adjust the name of the conda environment as needed. Please ensure that you have the data file available!\n\n- Clone the repo.\n- Download the data as described above and place it in the folder `data` (create it if necessary).\n- Create a virtual environment and install the requirements.\n- From the top-level folder, run `python experiments/epf_germany/00_run_study.py`.\n\n## Code in `\\src`\n\nIf you want to run individual files as notebooks, please ensure you can import the code from `/src`. This is done in the experiment code by the following line:\n\n```python\nsys.path.append(os.path.abspath(os.path.dirname(__file__)))\n```\n\nwhich appends the working directory to the `PATH`. If you're on a Windows machine, you might need to adjust this code.\n\n## Acknowledgements\n\nSimon Hirsch is employed as an industrial PhD student by Statkraft Trading GmbH and gratefully acknowledges the support and funding received. This work contains the author’s opinions and does not necessarily reflect Statkraft’s position.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-hirsch%2Fonline-mv-distreg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon-hirsch%2Fonline-mv-distreg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon-hirsch%2Fonline-mv-distreg/lists"}