Metadata-Version: 2.1
Name: meliora
Version: 0.1.1rc21.post1
Summary: Credit risk validation and development tools
Author-email: Anton Treialt <anton.treialt@aistat.com>
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: scipy>=1.9.3
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: sklearn
Requires-Dist: pyspark>=3.0.0 ; extra == "spark"
Requires-Dist: bandit[toml]==1.7.4 ; extra == "test"
Requires-Dist: black==22.1.0 ; extra == "test"
Requires-Dist: check-manifest==0.48 ; extra == "test"
Requires-Dist: flake8-bugbear==22.1.11 ; extra == "test"
Requires-Dist: flake8-docstrings ; extra == "test"
Requires-Dist: flake8-formatter_junit_xml ; extra == "test"
Requires-Dist: flake8==4.0.1 ; extra == "test"
Requires-Dist: pre-commit==2.17.0 ; extra == "test"
Requires-Dist: pylint==2.12.2 ; extra == "test"
Requires-Dist: pylint_junit ; extra == "test"
Requires-Dist: pytest-cov==3.0.0 ; extra == "test"
Requires-Dist: pytest-mock<3.7.1 ; extra == "test"
Requires-Dist: pytest-runner ; extra == "test"
Requires-Dist: pytest==7.1.0 ; extra == "test"
Requires-Dist: pytest-github-actions-annotate-failures ; extra == "test"
Requires-Dist: shellcheck-py==0.8.0.4 ; extra == "test"
Provides-Extra: spark
Provides-Extra: test

[![PyPI version](https://badge.fury.io/py/meliora.svg)](https://badge.fury.io/py/vangap-meliora) ![CI Build](https://github.com/at621/meliora/actions/workflows/CI.yml/badge.svg?event=push)

About the package
------------------

**meliora** is a Python package that provides a set of statistical tests and tools to assess the performance of the credit risk models. All tests are covered with unit tests and algorithms have been replicated in other tools like R, MATLAB and SAS to avoid errors. Whenever possible, the definition of the test was retrieved from the authoritive source like the EBA, the ECB or the Basel Committee.

The main contributors started building their first statistical credit models back in 2003. Over the years, we have impemented similar set of tests in several different financial institutions. 

This package is standing on the shoulders of giants as it makes heavy use of the Python
ecosystem and especially Scikit-learn, Scipy and Statsmodels. Several functions are straightforward
wrappers using these resources and are provided to the user for convenience purposes. The authors
have taken great care to ensure that no part of this package contains proprietary code. 

Main aim
-----------------
The aim of the package is to provide all common tests used by today's modellers when developing, maintaining and validating their PD, LGD, EAD and prepayment models. The aim of this package is to provide credit risk practioners with the tools to develop their credit risk models without reinventing the wheel. 

Main Features
-----------------
  - tests cover both IFRS 9 and IRB models as well as non-regulatory models
  - the tool contains more than 30 tests
  - all test have been covered with unit tests 
  - the tests have been documented in detail
  - commonly accepted tresholds have been provided for convenience purposes

  For the list of all tests, see Overview > List of tests

Tests that are currently included in the package
--------------------------------------------------

| #  | Name                                               | Area             | Estimate |
|----|----------------------------------------------------|------------------|----------|
| 1  | Binomial test                                      | Calibration      | PD       |
| 2  | Chi-Square test (Hoshmer-Lemeshow test)            | Calibration      | PD       |
| 3  | Normal test                                        | Calibration      | PD       |
| 4  | Spiegehalter test                                  | Calibration      | PD       |
| 5  | Redelmeier test                                    | Calibration      | PD       |
| 6  | Herfhindahl index / Concentration of rating grades | Concentration    | PD       |
| 7  | Brier score                                        | Discrimination   | PD       |
| 8  | Receiver Operating Characteristic                  | Discrimination   | PD       |
| 9 | Accuracy Ratio                                     | Discrimination   | PD       |
| 10 | Kendall’s τ                                        | Discrimination   | PD       |
| 11 | Somers’ D                                          | Discrimination   | PD       |
| 12 | Conditional Information Entropy Ratio              | Discrimination   | PD       |
| 13 | Kullback-Leibler distance                          | Discrimination   | PD       |
| 14 | Information value                                  | Discrimination   | PD       |
| 15 | Bayesian error rate                                | Discrimination   | PD       |
| 16 | Cumulative LGD accuracy ratio                      | Discrimination   | LGD      |
| 17 | Loss Capture Ratio                                 | Discrimination   | LGD      |
| 18 | Kolmogorov-Smirnov test                            | Discrimination   | PD       |
| 19 | Spearman’s rank correlation                        | Discrimination   | LGD      |
| 20 | Jeffrey's test                                     | Discrimination   | PD       |
| 21 | ELBE back-test using a t-test                      | Discrimination   | LGD      |
| 22 | Migration matrices test                            | Discrimination   | PD       |
| 23 | Loss Shortfall                                     | Predictive power | LGD      |
| 24 | Mean Absolute Deviation                            | Predictive power | LGD      |
| 25 | Population Stability Index                         | Stability        | PD       |
| 26 | Stability of transition matrices                   | Stability        | PD       |

Full list of dependencies
---------------------------
- NumPy (https://www.numpy.org)
- Pandas (https://pandas.pydata.org/)
- Statsmodels (https://www.statsmodels.org/)
- Scikit-learn (https://scikit-learn.org/)
- Scipy (https://scipy.org/)


Getting Help
------------------

For usage questions, send an email to anton.treialt@aistat.com

License
----------------------
MIT License
