Skip to main content

Quantitative analysis for power markets

Project description

octoanalytics logo

License

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

  • pandas
  • numpy
  • scikit-learn
  • plotly
  • matplotlib
  • tqdm
  • requests
  • tentaclio
  • yaspin
  • holidays
  • dotenv
  • databricks-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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

octoanalytics-0.3.5.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

octoanalytics-0.3.5-py3-none-any.whl (35.0 kB view details)

Uploaded Python 3

File details

Details for the file octoanalytics-0.3.5.tar.gz.

File metadata

  • Download URL: octoanalytics-0.3.5.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for octoanalytics-0.3.5.tar.gz
Algorithm Hash digest
SHA256 0e30f6f9abb428d421eb59465a4a1610b4af1f722110704ca2e977ac471eac60
MD5 c83ea78e47ecd9916aac303d3809efe7
BLAKE2b-256 f54e007993a4133c0e3ca0cbb01d668c8821a33bdb3c4b9e807eaa35bec11fa4

See more details on using hashes here.

File details

Details for the file octoanalytics-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: octoanalytics-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 35.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.6

File hashes

Hashes for octoanalytics-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d9c9de3b39b466393da50b2b7655d46f6b76b7790fe3ae9b497dee34c684ab6e
MD5 6ad5c6cb9f1ec06d54c88ad07e4dfd8c
BLAKE2b-256 1b1710ad24b98ff90106f4b6f0d5e81ea88116bb09586b643af4fe3da1293b31

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page