fintech-algorithms
Using a coding agent? Give it the skill: npx skills add IslamBaraka90/Fintech-Algorithms-Library What it does →

Point-in-Time PD

Install and import#

bash
npm install fintech-algorithms
ts
import { pointInTimePd } from "fintech-algorithms/credit-risk-and-default/probability-of-default/point-in-time-pd";

Signature#

pointInTimePd(through_the_cycle_pd_value, borrower_log_odds_shift, macro_factor_z, macro_sensitivity, 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#

through_the_cycle_pd_value
0.03
borrower_log_odds_shift
0.25
macro_factor_z
0.8
macro_sensitivity
0.55
alert_threshold
0.06

Call#

pointInTimePd(through_the_cycle_pd_value, borrower_log_odds_shift, macro_factor_z, macro_sensitivity, alert_threshold)

Returns#

object with 9 fields: through_the_cycle_pd, baseline_log_odds, borrower_log_odds_shift, macro_log_odds_shift, point_in_time_pd, cycle_uplift, alert_threshold, state, …

{
  "through_the_cycle_pd": 0.03,
  "baseline_log_odds": -3.476098689835,
  "borrower_log_odds_shift": 0.25,
  "macro_log_odds_shift": 0.44,
  "point_in_time_pd": 0.058080015587,
  "cycle_uplift": 0.028080015587,
  "alert_threshold": 0.06,
  "state": "below-alert",
  "reason": "declared-log-odds-overlay-not-universal-ifrs-or-regulatory-formula"
}

Other exports#

This module also exports logisticPdModel, probitPdModel, throughTheCyclePd, 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#

Point-in-Time PD — article hero
Point-in-Time PD — evidence clock
Point-in-Time PD — formula anatomy
Point-in-Time PD — method comparison
Point-in-Time PD — system map
Point-in-Time PD — validation layers

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.

Read the article →

References#

The rest of the Probability of Default family#