Logistic PD Model
Install and import#
npm install fintech-algorithmsimport { logisticPdModel } from "fintech-algorithms/credit-risk-and-default/probability-of-default/logistic-pd-model";Signature#
logisticPdModel(intercept, coefficients, features, alert_threshold)Worked example#
verified This is the worked example published in the article, replayed by the test suite on every run. The output cannot drift.
Input#
-2.4[0.8, -0.6, 1.1][0.5, -0.4, 0.2]0.2Call#
logisticPdModel(intercept, coefficients, features, alert_threshold)Returns#
object with 8 fields: linear_score, feature_contributions, probability_of_default, survival_probability, odds_of_default, alert_threshold, state, reason
{
"linear_score": -1.54,
"feature_contributions": [0.4, 0.24, 0.22],
"probability_of_default": 0.176535274779,
"survival_probability": 0.823464725221,
"odds_of_default": 0.214381101427,
"alert_threshold": 0.2,
"state": "below-alert",
"reason": "supplied-logit-score-transformed"
}Other exports#
This module also exports
probitPdModel, throughTheCyclePd, pointInTimePd, mertonDistanceToDefault, campbellHilscherSzilagyiDistressProbability, bharathShumwayNaiveDistanceToDefault, calculate. Every module additionally exports run as an alias of its
primary function, and a meta object carrying its catalog id, domain, family,
shape and article URL.
Diagrams#
How it works#
This page states the contract — how to call it correctly. The article explains the concept: why it works, and where it breaks.
References#
- NIST/SEMATECH glossary: logistic function — National Institute of Standards and Technology
- Financial Ratios and the Probabilistic Prediction of Bankruptcy — James A. Ohlson
- IRB approach: minimum requirements to use IRB approach — Basel Committee on Banking Supervision
- Supervisory Guidance on Model Risk Management — OCC, Board of Governors of the Federal Reserve System, and FDIC
- Evidence boundary