Scentree builds scenario trees from historical data for stochastic planning

Scentree: a framework for generating scenario trees for multistage stochastic programming

Software Engineering

Summary

Planning for uncertain future events can be tricky, especially when many steps are involved. The authors present scentree, a tool that uses past data and clever math models to create detailed maps of possible future scenarios. These maps help decision-makers prepare for different outcomes without needing deep expertise in statistics. The tool works with many types of planning problems and automates the whole process from data to scenario tree.

What this means in practice

  • For energy system planners: Generate scenario trees from historical weather and demand data to improve multistage energy scheduling decisions under uncertainty.
  • For financial risk managers: Create scenario trees capturing time-dependent market uncertainties to support robust portfolio optimization over multiple time periods.

Authors

Cristian Pachón-García, Albert Solà Vilalta, F-. Javier Heredia

Abstract

We present scentree, an open-source Python package for constructing a scenario fan and a scenario tree for multistage stochastic programming from historical data. It combines machine learning and multivariate time series models to obtain a scenario fan that captures inter-stage dependencies in the stochastic processes. This scenario fan is subsequently transformed into a scenario tree suitable for multistage stochastic optimization, providing a flexible and extensible framework for uncertainty modeling. A key contribution is the automation of the complete workflow, including model selection, parameter estimation, scenario fan generation, and scenario tree construction. Scentree does not rely on assumptions about the underlying data distribution, reducing the statistical expertise required to produce a scenario tree. Furthermore, it is agnostic to the specific multistage stochastic problem to be solved.