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 the examples for how you can import and use the ep function.

You can explore the examples 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).

You can loosely think about Entropy Pooling as a generalization of the Black-Litterman model without all the oversimplifying assumptions. Entropy Pooling operates directly on the next generation market representation defined by the simulation matrix $R\in \mathbb{R}^{S\times I}$ and associated joint scenario probability vector $p\in \mathbb{R}^{S}$.

For a quick introduction to Entropy Pooling intuition, watch this YouTube video. For a collection of Entropy Pooling resources, see this Substack post.

The original Entropy Pooling approach solves the minimum relative entropy problem

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

subject to linear constraints on the posterior probabilities

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

The constraints matrices $A$ and $G$ contain functions of the Monte Carlo simulation $R$ 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 network overlay on top of Entropy Pooling, see Vorobets (2023).

Video walkthroughs

Video walkthroughs of the two notebook examples are available here and here. The videos give additional insights into Entropy Pooling theory and its sequential refinements. It is highly recommended to watch these videos to quickly increase your understanding.

Portfolio Construction and Risk Management Book

Entropy Pooling is a core part of the next generation investment framework that also utilizes fully general Monte Carlo distributions and CVaR analysis, see this YouTube video for an introduction. To get a pedagogical and deep presentation of all the possibilities Entropy Pooling offers, see the Portfolio Construction and Risk Management Book.

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.8.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

entropy_pooling-1.0.8-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file entropy_pooling-1.0.8.tar.gz.

File metadata

  • Download URL: entropy_pooling-1.0.8.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2

File hashes

Hashes for entropy_pooling-1.0.8.tar.gz
Algorithm Hash digest
SHA256 041b52a13c001fa7a5d3fde84cd9b3abdc31d231313a574463322a020103a1b2
MD5 a875983948f18a12559bd1c6a2fe743f
BLAKE2b-256 957f622abb0b223879a7f960008bb2e70b00c0d3cd94e2289b69cbfd6b2ecf87

See more details on using hashes here.

File details

Details for the file entropy_pooling-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: entropy_pooling-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2

File hashes

Hashes for entropy_pooling-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 4d9afd4fc7ed90c37070ae789e9cbfd1cd13c5f850964bd342201573445f44fc
MD5 68738f195457b56f533fdf6230e7e5c8
BLAKE2b-256 b8e95031963e2dde81d9ef1961fb92a7723a90dda9d8a26656cf0b0cac29c9c7

See more details on using hashes here.

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