Quantamental Investing

Quantamental Investing

Inverse Bayesian Inference

This Python case study illustrates how we can use Bayesian networks in an inverse way to, for example, determine the macro conditions for rate hikes.

Anton Vorobets's avatar
Anton Vorobets
Jun 25, 2026
∙ Paid
Macro Bayesian network including some marginal probabilities conditional on the central bank hiking interest rates.

As briefly mentioned in Section 3.4 of the Causal and Predictive Market Views and Stress Testing article, Bayesian networks can also be used in an inverse direction to, for example, determine the necessary macro conditions for an interest rate hike.

The Python case study in this article proceeds with a practical example of such an analysis using the Investment Analysis module and the top-down asset allocation Bayesian network from Figure 4 in the Causal and Predictive Market Views and Stress Testing article.

For a case study of how the Causal and Predictive Market Views and Stress Testing framework can be used for analyzing the effect of geopolitical risk, see the case study below:

Geopolitical Investment Risk Analysis

Anton Vorobets
·
Mar 26
Geopolitical Investment Risk Analysis

Sadly, we live in a world with many major ongoing wars, and the risk of additional wars breaking out is nonnegligible.

Read full story

For a detailed presentation of Bayesian networks and how they fit into the broader Fully General Investment Framework (FGIF), see the Portfolio Construction and Risk Management book as well as Lecture 8 from the Applied Quantitative Investment Management course.

Thank you for reading Quantamental Investing. Subscribe to stay updated on new and exclusive content.

Python case study

The Python case study below uses the Bayesian network functionality from the Investment Analysis module.

Keep in mind that the Bayesian network from Figure 4 in the Causal and Predictive Market Views and Stress Testing article is mainly intended for illustration and testing purposes. Hence, for real-world applications, you have to adjust the code to specify your own causal hypotheses and probabilities. Nonetheless, the example code should make it easy for you to get started.

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2026 Anton Vorobets · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture