Advanced time-series analytics and forecasting toolkit for commodity / power trading (5-year bands, ML, regime switching, hierarchical utilities).
Project description
EIA Band Plot & Time Series Forecasting
This package provides two primary utilities:
-
five_year_plot– Generate interactive 5‑year band plots using Plotly. These plots mirror the charts used by the U.S. Energy Information Administration (EIA) to contextualize recent values against the range, minimum, maximum and average of the last five years. Multiple numeric columns within a DataFrame can be plotted simultaneously as separate subplots. -
ml_forecast– Train individual AutoGluon time series models for each numeric column in a DataFrame and forecast future values. The function returns a DataFrame with point forecasts and, if requested, prediction intervals. Each series is trained independently using the specified presets (default:best_quality).
Installation
Install the package with:
pip install analysis3054
To enable the optional machine‑learning forecasting features, also install the AutoGluon time series dependency:
pip install analysis3054[ml]
Usage
Five‑Year Band Plot
import pandas as pd
from analysis3054 import five_year_plot
# Example DataFrame with a 'date' column and one or more numeric columns
df = pd.read_csv("my_timeseries_data.csv")
# Create the plot
fig = five_year_plot(date='date', df=df, prior_year_lines=1)
fig.show()
Machine Learning Forecasting
import pandas as pd
from analysis3054 import ml_forecast
df = pd.read_csv("my_timeseries_data.csv")
# Forecast the next 12 periods for each numeric column
result = ml_forecast(date='date', df=df, periods=12)
# Access point forecasts
forecasts = result.forecasts
# Access confidence intervals (if requested)
conf_ints = result.conf_intervals
See the docstrings of each function for detailed parameter descriptions.
User Guide
For a complete overview of all available functions, advanced forecasting methods, statistical analyses and plotting utilities, consult the USER_GUIDE.md file included with the package. It provides step‑by‑step examples, explains optional parameters such as confidence interval computation and plotting, and offers best practices for combining models and interpreting results.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file analysis3054-0.2.0.tar.gz.
File metadata
- Download URL: analysis3054-0.2.0.tar.gz
- Upload date:
- Size: 78.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1dfa93fd9feacae41218e78e7591bfa5f305268ab08383b792ec925dcdfac18
|
|
| MD5 |
97985c2915301e0525448525fcc0bd14
|
|
| BLAKE2b-256 |
1e33e69260163ce107df38f3661e84ccc62a974ae25e30c525bc62c5d1f0f2ab
|
File details
Details for the file analysis3054-0.2.0-py3-none-any.whl.
File metadata
- Download URL: analysis3054-0.2.0-py3-none-any.whl
- Upload date:
- Size: 85.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6a92ce3a92f753d71cb205fe41d5badde205b08f8a2cf008e202c29fda466ec
|
|
| MD5 |
86be708c1bd1298808a1a09974b9b73b
|
|
| BLAKE2b-256 |
c0868c88969182f129dc4cb733053693c8436c615c283908096a66ac2e98a651
|