Skip to main content

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).

Watch this lecture for a detailed presentation of Sequential Entropy Pooling (SeqEP).

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 and check out the Applied Quantitative Investment Management course

Metadata

Release files for entropy-pooling 1.0.11

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

Source distribution (sdist)

Source distribution for entropy-pooling 1.0.11
File Size Uploaded
entropy_pooling-1.0.11.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for entropy-pooling 1.0.11
File Interpreter ABI Platform
entropy_pooling-1.0.11-py3-none-any.whl Python 3 none any Details

Total release size: 10.8 kB

Release files / entropy_pooling-1.0.11.tar.gz

Download URL entropy_pooling-1.0.11.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c42c0464eb8539a14d55ca1ff5ef0b38595e6249803a987a9c1cacb1b4301e17
BLAKE2b-256 checksum
How to use checksums
1d71a5cbbe476f7472256b50624ab7d13689cfab688dcdb7572cf4c453ae8563
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.8.10 Linux/5.15.167.4-microsoft-standard-WSL2

Release files / entropy_pooling-1.0.11-py3-none-any.whl

Download URL entropy_pooling-1.0.11-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9853ec438122d408e67f17d34f7410c85a0aca44f9526d719774c0d75a230773
BLAKE2b-256 checksum
How to use checksums
ab6981e8296543e4ebd0678fb30fa28531dab8a0258b3b9ffcdc74916607f624
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.8.10 Linux/5.15.167.4-microsoft-standard-WSL2

Release history Release notifications | RSS feed

This release

1.0.11 This release

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0

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