Technology
Scentree: New Python Tool Automates Scenario Tree Generation for Stochastic Optimization
A flexible open-source framework uses machine learning to build realistic uncertainty models from historical data or probability distributions.
Researchers have introduced scentree, an open-source Python package that streamlines the construction of scenario trees—essential models for solving multistage stochastic programming problems where uncertainty evolves over time.
What the Tool Does#
Scentree combines machine learning with multivariate time series forecasting to generate what researchers call a "scenario fan" capturing the dependencies embedded in stochastic processes. The framework then distills this fan into a compact scenario tree that preserves the statistical properties of the underlying uncertainty, making it practical for real-world optimization problems.
The package works with both historical data and synthetic samples drawn from probability distributions, offering flexibility for different problem domains.
Key Capabilities#
The framework automates several labor-intensive steps:
- Automatic selection of forecasting models and parameter estimation
- Scenario fan generation and subsequent tree construction
- Joint modeling of correlated random variables, preserving interdependencies across the stochastic process
- Support for both multistage and two-stage stochastic programming applications
A significant advantage is that scentree does not require assumptions about underlying data distributions, reducing the statistical expertise needed to produce usable scenario trees. The modular design also allows users to supply external forecasts or execute only portions of the workflow.
Why It Matters#
Scenario trees are crucial for uncertainty modeling in stochastic programming, but building them traditionally requires specialized knowledge. By automating the entire workflow and maintaining correlations between random variables, scentree makes sophisticated uncertainty quantification more accessible to practitioners across industries.
The source paper was submitted to arXiv in September 2026 and revised in November 2026.

