A complete implementation of Riccardo Rebonato and Alexander Denev's Bayesian network methodology for modeling "black swan" financial events - specifically, the Eurozone breakup scenario.
| File | Purpose | Size |
|---|---|---|
rebonato_denev_eurozone_crisis.py |
Main implementation | 22 KB |
rebonato_denev_tutorial.ipynb |
Interactive notebook | 11 KB |
README.md |
Comprehensive documentation | 8 KB |
PROJECT_SUMMARY.md |
Executive summary | 8 KB |
eurozone_crisis_network.png |
Network structure | 334 KB |
scenario_comparison.png |
Results visualization | 383 KB |
causal_flow.png |
Probability flow diagram | 303 KB |
requirements.txt |
Dependencies | <1 KB |
python rebonato_denev_eurozone_crisis.pyThis runs the complete analysis and shows:
- 4 stress scenarios
- Portfolio implications
- Monte Carlo simulation results
jupyter notebook rebonato_denev_tutorial.ipynbStep-by-step tutorial with:
- Custom scenario analysis
- Interactive visualizations
- Portfolio allocation examples
Open these files:
eurozone_crisis_network.png- The causal structurescenario_comparison.png- All results in one viewcausal_flow.png- How probabilities propagate
❌ Historical correlations break down during crises
❌ Can't model events that haven't happened
❌ No understanding of causality
✅ Explicit causal modeling
✅ Forward-looking scenarios
✅ Expert judgment + data
✅ Bayesian updating
Normal Times → 7% breakup risk, 22% equity decline
Black Swan (High politics + econ crisis) → 76% breakup risk, 62% equity decline
If Breakup Occurs → 88% flight to quality, 76% equity decline
Market Signals (Spreads widening + flight) → 96% inferred breakup risk
| Scenario | Recommendation |
|---|---|
| Normal | 60% equities, 30% corp bonds, 10% gov bonds |
| Elevated Risk | 40% equities, 20% corp bonds, 40% gov bonds |
| High Stress | 20% equities, 10% corp bonds, 70% gov bonds |
- Rare: Eurozone breakup unprecedented in modern finance
- High Impact: Affects ~20% of global GDP, €20 trillion contracts
- Retrospectively Predictable: We can reason about causality
Traditional models say: "It hasn't happened, so we can't model it"
Rebonato-Denev says: "We understand the causal mechanisms, so we CAN model it"
This is the difference between correlation and causation.
ROOT CAUSES
Political_Instability (EU tensions)
Economic_Weakness (GDP, unemployment)
↓
CRISIS EVENT
Eurozone_Breakup (THE BLACK SWAN)
↓
MARKET MECHANISMS
Credit_Spreads (widen during stress)
Flight_to_Quality (rush to safety)
↓
ASSET IMPACTS
Corporate_Bonds (credit sensitive)
Government_Bonds (safe haven)
Equities (most vulnerable)
- Political_Instability → Increases breakup risk (sovereignty concerns)
- Economic_Weakness → Increases breakup risk (costs of membership)
- Eurozone_Breakup → Causes market disruption
- Credit_Spreads → Corporate bonds become risky
- Flight_to_Quality → Investors seek safety
- Asset Classes → React based on their characteristics
- Monitor leading indicators (politics, economics)
- Calculate scenario probabilities using the network
- Adjust allocations dynamically
- Stress test portfolios under extreme scenarios
- Model tail risks beyond VaR
- Early warning system via probability updates
- Scenario planning for crisis response
- Regulatory compliance (Basel III stress tests)
- Extend to other black swans (pandemic, cyber attack)
- Add more variables (central bank policy, contagion)
- Learn from data (estimate probabilities empirically)
- Integrate with ML (hybrid models)
- Run the demo script
- Look at the visualizations
- Read the README for details
- Modify probabilities to reflect your views
- Add new variables to the network
- Try different scenarios
- Compare with your current portfolio
- Apply to other crisis scenarios
- Integrate with real market data
- Build production-grade system
- Validate with historical crises
Q: Why not just use correlations?
A: Correlations break down during crises. Causal relationships are more stable.
Q: Aren't the probabilities subjective?
A: Yes, that's the point. Expert judgment is necessary for unprecedented events. But the logic is rigorous.
Q: Can this predict the future?
A: No model predicts the future. But it helps you reason systematically about possibilities.
Q: What about other black swans?
A: The methodology applies to any scenario you can model causally (pandemic, climate, cyber).
Q: Is this better than traditional VaR?
A: It's complementary. VaR handles normal times. This handles tail events.
- Rebonato & Denev (2014) - The original book
- Pearl (2009) "Causality" - The foundations
- Taleb (2007) "The Black Swan" - The problem this solves
- Bayesian networks: Pearl, Koller & Friedman
- Portfolio theory: Markowitz, Black-Litterman
- Stress testing: Basel Committee guidelines
All in this package - it's complete and self-contained!
This is an educational implementation. For production use:
- Consult the original book for full methodology
- Validate probabilities with domain experts
- Consider established libraries (pgmpy, PyMC)
- Add comprehensive testing
- Integrate real market data
"The core of the problem is that past data is not necessarily indicative of future performance, especially during periods of stress."
— Riccardo Rebonato
This implementation shows how to move beyond that limitation by modeling causality, not just correlation.
Enjoy exploring!