Skip to main content

Entropy Pooling in Python with a BSD 3-Clause license.

Project description

pytest codecov Binder

Entropy Pooling in Python

Due to popular demand from developers, this package contains the Entropy Pooling implementation from the fortitudo.tech Python package with a more permissive BSD 3-Clause license.

This package contains only one function called ep and has minimal dependencies with just scipy. See this example for how you can import and use the ep function.

You can explore the example without local installations using Binder.

Installation instructions

Installation can be done via pip:

pip install entropy-pooling

Theory

Entropy Pooling is a powerful method for implementing subjective views and performing stress-tests for fully general Monte Carlo distributions. It was first introduced by Meucci (2008) and refined with sequential algorithms by Vorobets (2021).

The original Entropy Pooling approach solves the minimum relative entropy problem

$$q=\text{argmin}\lbrace x'\left(\ln x-\ln p\right)\rbrace$$

subject to the constraints

$$Ax=b \quad \text{and} \quad Gx\leq h.$$

The constraints matrices $A$ and $G$ contain transformations of the Monte Carlo simulation that allow you to implement subjective views and stress-tests by changing the joint scenario probabilities from a prior probability vector $p$ to a posterior probability vector $q$.

A useful statistic when working with Entropy Pooling is the effective number of scenarios introduced by Meucci (2012). For a causal Bayesian nets overlay on top of Entropy Pooling, see Vorobets (2023).

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

entropy_pooling-1.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

entropy_pooling-1.0-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

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