octoanalytics 📊⚡
Energy consumption forecasting & risk premium analysis for the French electricity market
Description
octoanalytics is a Python toolkit for:
- Retrieving and smoothing weather data via Open-Meteo API.
- Training and evaluating load forecasting models (MW) using Random Forest.
- Generating interactive visualizations comparing actual vs. forecasted values.
- Accessing spot and forward price data (annual, monthly, PFC) from Databricks SQL.
- Computing volume and shape risk premiums, key for energy portfolio management.
Installation
pip install octoanalytics
⚠️ You need a valid Databricks access token to retrieve market data.
Dependencies
pandasnumpyscikit-learnplotlymatplotlibtqdmrequeststentaclioyaspinholidaysdotenvdatabricks-sql-connector
Main Features
🔁 Weather data retrieval and smoothing
from octoanalytics import get_temp_smoothed_fr
temp_df = get_temp_smoothed_fr(start_date="2024-01-01", end_date="2024-12-31")
⚡ Load forecasting
from octoanalytics import eval_forecast
forecast_df = eval_forecast(df=load_df(), temp_df=temp_df, cal_year=2024)
💰 Risk premium calculation
Volume Risk
from octoanalytics import calculate_prem_risk_vol
premium = calculate_prem_risk_vol(forecast_df, spot_df, forward_df)
Shape Risk
from octoanalytics import calculate_prem_risk_shape
shape_risk = calculate_prem_risk_shape(forecast_df, pfc_df, spot_df)
🔌 Databricks SQL connections
from octoanalytics import get_spot_price_fr, get_forward_price_fr_annual
spot_df = get_spot_price_fr(token=DB_TOKEN, start_date="2024-01-01", end_date="2024-12-31")
forward_df = get_forward_price_fr_annual(token=DB_TOKEN, cal_year=2025)
Package Structure
octoanalytics/
│
├── __init__.py
├── core.py # Main logic
├── ...
Authors
Jean Bertin
📧 jean.bertin@octopusenergy.fr
Thomas Maaza
📧 thomas.maaza@octoenergy.com
License
MIT – free to use, modify, and distribute.
Roadmap
- Add XGBoost model
- Load anomaly detection
- Flask REST API deployment
- Automatic PDF report generation
Full Demo
To be included in examples/forecast_demo.ipynb.
Metadata
Release files for octoanalytics 0.3.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| octoanalytics-0.3.6.tar.gz | 32.9 kB | Without provenance | Details for octoanalytics-0.3.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| octoanalytics-0.3.6-py3-none-any.whl | Python 3 | none | any | Details for octoanalytics-0.3.6-py3-none-any.whl |
Total release size: 71.0 kB
Release files / octoanalytics-0.3.6.tar.gz
| Download URL | octoanalytics-0.3.6.tar.gz |
|---|---|
| Size | 32.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f8b2659a1ffc77f651bdaca33fefb1f0791b1e2b16eccc4260c2eeeee79d411
|
|
BLAKE2b-256 checksum How to use checksums |
962aba56699280864b7a557c685dcb6d9acb4bf0aeb6251116976849a81ae3fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.6
|
Release files / octoanalytics-0.3.6-py3-none-any.whl
| Download URL | octoanalytics-0.3.6-py3-none-any.whl |
|---|---|
| Size | 38.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fadc713e32a23e8684cf8c697ec4bbc1db7ab62e527433ad654ae382d851a0c2
|
|
BLAKE2b-256 checksum How to use checksums |
554ce5f7899cba3798d9304293605080795735f6a086022f4289e6e6d1f7e437
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.6
|
Security for octoanalytics 0.3.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.