Skip to content

naenumtou/pd_emm_cci_model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IFRS 9 PD Modeling Framework via Empirical Migration Matrix and Credit Cycle Index Approach

Python Pandas NumPy SciPy statsmodels Matplotlib Seaborn MIT

การพัฒนาแบบจำลอง IFRS 9 PD Model ด้วย transition matrix แบบ credit cycle index ตั้งแต่ต้นจนจบ

Overview

Project Structure

pd_emm_cci_model/
├── model/                                        #Trainned model and parameters (pkl.)
│   ├── rho.pkl
│   ├── fwl_model.pkl
│   └── lifetime_pd_term_structure.pkl  
├── notebooks/
│   ├── 01_data_preparation.ipynb
│   ├── 02_credit_cycle_index.ipynb
│   ├── 03_fwl_model.ipynb
│   └── 04_markov_liftetime.ipynb
├── src/
│   ├── data_prep.py
│   ├── migration_matrix_cci.py
│   ├── regression_model.py
│   ├── lifetime_model.py
│   ├── stats_testing.py
│   └── plot_function.py
├── data/          
│   ├── processed/
|   |   ├── train_data.parquet                    #Not tracked by git
|   |   ├── migration_count.parquet
|   |   ├── average_matrix.parquet
|   |   ├── monthly_cci.parquet
|   |   ├── mev_transformed.parquet
|   |   └── mev_sign_transformed.parquet
│   └── raw/
|   |   ├── usedcar_transaction_score.parquet     #Not tracked by git
|   └── └── mev_data.csv
├── requirements.txt
└── README.md

Project Details

0. Model Segmentation

1. Unbias Model

1.1 Empirical Migration Matrix

การพัฒนาแบบจำลอง IFRS 9 PD Model ด้วย transition matrix แบบ credit cycle index ตั้งแต่ต้นจนจบ

1.2 Credit Cycle Index

การพัฒนาแบบจำลอง IFRS 9 PD Model ด้วย transition matrix แบบ credit cycle index ตั้งแต่ต้นจนจบ

$$ P_t(ij) = \Phi\left(\frac{x_{i+1}^{,j} - \sqrt{\rho}, z_t}{\sqrt{1 - \rho}}\right) - \Phi\left(\frac{x_i^{,j} - \sqrt{\rho}, z_t}{\sqrt{1 - \rho}}\right) $$

$$ \min_{z_t} \sum_j \sum_i n_{t,G} \frac{\left[P_t(i,j) - \Delta\left(x_{i+1}^j, x_i^j, z_t\right)\right]^2}{\Delta\left(x_{i+1}^j, x_i^j, z_t\right)\left[1 - \Delta\left(x_{i+1}^j, x_i^j, z_t\right)\right]} $$

การพัฒนาแบบจำลอง IFRS 9 PD Model ด้วย transition matrix แบบ credit cycle index ตั้งแต่ต้นจนจบ

2. Forward-looking Model

The forward-looking model processes are finding the relationship between Credit Cycle Index (CCI, Z-Index) with macroeconomics varialbes (MEV). The processes are similar to others ODR Model but changed the dependence variabale from ODR to CCI. In this repository is not covered the forward-looking model but it can refer to this repository for the forward-looking model consideration.

2.1 Model Back-testing

The model back-testing of actual CCI and predicted CCI from the regression model have been displayed in the following section. The visualisation of model back-testing in the following:

การพัฒนาแบบจำลอง IFRS 9 PD Model ด้วย transition matrix แบบ credit cycle index ตั้งแต่ต้นจนจบ

Note: It is a ramdom selection model. No expert input in this model.

3. Lifetime Model

การพัฒนาแบบจำลอง IFRS 9 PD Model ด้วย transition matrix แบบ credit cycle index ตั้งแต่ต้นจนจบ

$$ P_t(i,j) = \Phi\left(\frac{x_{i+1}^j - \sqrt{\rho}, \hat{z_t}}{\sqrt{1 - \rho}}\right) - \Phi\left(\frac{x_i^j - \sqrt{\rho}, \hat{z_t}}{\sqrt{1 - \rho}}\right) $$

License

MIT · Built for learning purposes

About

End-to-End IFRS 9 PD Model development by Empirical Migration Matrix and Credit Cycle Index Models.

Topics

Resources

License

Stars

Watchers

Forks

Contributors