Skip to content

Official PyTorch implementation of the VAE-SDE model for endogenizing climate transition risk in banking portfolios and analyzing the sovereign-corporate doom loop.

Notifications You must be signed in to change notification settings

Nube1/VAE-SDE-Climate-Risk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

The Sovereign-Corporate Doom Loop: Endogenizing Climate Transition Risk

License: MIT PyTorch Reproducibility

This repository contains the official PyTorch implementation of the Variational Autoencoder - Stochastic Differential Equation (VAE-SDE) model presented in the manuscript: "The Sovereign-Corporate Doom Loop: Endogenizing Climate Transition Risk in Banking Portfolios".

πŸ“‰ Overview

This project introduces a novel deep learning framework to model the endogenous transmission of climate transition risk into banking portfolios. Unlike traditional structural models (e.g., Merton), this approach utilizes a VAE to capture latent financial states and a Neural SDE to simulate continuous-time probability of default (PD) dynamics under climate stress scenarios.

Key Capabilities

  1. Latent State Extraction: Uses a GRU-based Encoder to map high-dimensional financial ratios into latent stochastic processes.
  2. Continuous-Time Modeling: Solves a Neural SDE to simulate firm asset value paths between discrete observation points.
  3. Climate Stress Testing: Calculates "Climate Deltas" ($\Delta PD / \Delta \lambda$) to quantify the sensitivity of high-carbon sectors to transition shocks.
  4. Robust Validation: Includes bootstrapped confidence intervals and stratified cross-validation.

πŸ› οΈ Installation & Requirements

The code is designed to run in a standalone environment (e.g., Google Colab) or a local Python environment.

pip install torch torchsde yfinance pandas scikit-learn matplotlib seaborn tqdm

πŸ“ˆ Figures & Results
Running the notebook generates the following validation figures:
Figure 1: ELBO Loss Dynamics (Training vs. Validation).
Figure 2: ROC Curves for Default Prediction.
Figure 3: Sector-specific Climate Deltas (Sensitivity Analysis).
Figure 4-8: Comprehensive validation metrics (Bootstrap CI, Precision-Recall, Cross-Validation).
πŸ“„ Citation
If you use this code in your research, please cite the working paper:
code
Bibtex
@article{Mahomane2025DoomLoop,
  title={The Sovereign-Corporate Doom Loop: Endogenizing Climate Transition Risk in Banking Portfolios},
  author={Mahomane, Ronald},
  journal={Working Paper},
  year={2025}
}
πŸ“œ License
This project is licensed under the MIT License - see the LICENSE file for details.
code
Code
### Why this setup works for your resubmission:

1.  **"Reproducibility" Badge:** Editors love this. It signals that you aren't hiding data. By explicitly mentioning the "Synthetic Data Generator," you solve the problem of reviewers not having your private dataset.
2.  **Focus on Method (VAE-SDE):** The README highlights the *technical novelty* (Neural SDEs). This positions the paper as a methodological contribution, which is highly valued by journals like *JBF* and *Energy Economics*.
3.  **Clean & Professional:** It creates a psychological anchor that "this is a finished, high-quality project," not just a rough draft.

About

Official PyTorch implementation of the VAE-SDE model for endogenizing climate transition risk in banking portfolios and analyzing the sovereign-corporate doom loop.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published