Skip to main content

demandplan

Production-grade demand planning library: classical forecasting, intermittent demand methods, hierarchical reconciliation, and probabilistic outputs designed to feed inventory decisions.

Scope

Shipped in v0.1:

  • Classical forecasting core — naive / seasonal-naive baselines, ETS, ARIMA/SARIMA behind one probabilistic protocol
  • Intermittent demand — Croston, SBA, TSB (vectorized, portfolio-scale)
  • Hierarchical reconciliation — bottom-up / top-down / middle-out, OLS / WLSv / MinT-shrink with coherence guarantees
  • Probabilistic forecasting — quantile outputs everywhere, calibration diagnostics, newsvendor order-up-to solver
  • Evaluation — rolling-origin backtesting with leakage guards; WAPE/MASE/RMSSE/WQL/bias; Forecast Value Add tables
  • Selection — champion-challenger per series from backtested performance (no hardcoded segmentation rules)
  • Knowledge base — method guides, evaluation handbook, selection framework, tiered industry notes (docs/)

Planned for later versions: ML/DL model families, foundation-model adapters, causal/driver-based methods, temporal reconciliation, demand sensing utilities.

Quickstart

pip install -e ".[dev]"
from demandplan.pipeline import champion_challenger

result = champion_challenger(df, horizon=13)  # df: unique_id, ds, y
result.champion  # winning model + backtested WAPE per series
result.forecasts  # quantile forecasts from full-history refit

Full walkthrough in docs/index.md; design rationale in the spec, research report, and ADR-0001.

Development

python -m pytest          # test suite (coverage gate ≥90% enforced)
python -m mypy            # strict typing
python -m ruff check .    # lint + format checks
mkdocs serve              # knowledge base site
python examples/run_battle_tests.py     # bundled real series + 25k-series scale test
python examples/client_simulation.py    # ground-truth decision validation
python examples/real_m5_validation.py   # real Walmart M5 end-to-end (auto-downloads)

Validated on Windows and Linux (Python 3.12); distribution artefacts pass twine check. Reproducibility locks: constraints/. Real-data evidence: benchmarks/.

License

Apache-2.0

Metadata

Release files for demandplan 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for demandplan 0.2.0
File Size Uploaded
demandplan-0.2.0.tar.gz 46.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for demandplan 0.2.0
File Interpreter ABI Platform
demandplan-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 87.0 kB

Release files / demandplan-0.2.0.tar.gz

Download URL demandplan-0.2.0.tar.gz
Size 46.5 kB
Tags Source
SHA-256 checksum
How to use checksums
615ae7b6c66589c375822b9a31b58f46601934f0c273fa0826196aba9efc793f
BLAKE2b-256 checksum
How to use checksums
c271b04f2a24247881ec7dbbd2e62814072f50c6028c742e4775340d609bcf12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / demandplan-0.2.0-py3-none-any.whl

Download URL demandplan-0.2.0-py3-none-any.whl
Size 40.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc598cc26ffc8ebd8410186938f63a356ce22b738b3f6a08a018af728ffc98ad
BLAKE2b-256 checksum
How to use checksums
6b12d31efed33551aed9009234dc013497b051341c391d942254086ebb1f752c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

2 release files

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page