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.

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
Sadly, we live in a world with many major ongoing wars, and the risk of additional wars breaking out is nonnegligible.
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.
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.


