Builds points scorecards for binary targets (credit risk, fraud,
propensity) on the optimal binning and weight of evidence engine of
'OptimalBinningWoE', and takes them to the risk parameters of the internal
ratings-based (IRB) approach. Variables are selected through optimal
binning, eight admission rules, hold-out revalidation with frozen bins and
a consensus of 'glmnet', 'xgboost', 'lightgbm' and 'ranger' models weighted
by out-of-sample performance; the audit funnel never drops a candidate
from the report. The scorecard is fitted with an explicit, auditable scale
alignment (a log-odds regression on the raw score composed with the
points-to-double-the-odds map); cut-offs are swept with frozen cuts;
reject inference is reported as a sensitivity band; the population and
characteristic stability indices (PSI and CSI) are monitored with both the
fixed and the sample-size-adjusted threshold; and production SQL is
generated in fourteen dialects, with the agreement between R and SQL
verified by test. The IRB layer builds the default flag; calibrates the
scorecard to a long-run default rate with rating grades, margins of
conservatism and floors to give the probability of default (PD); models
workout loss given default (LGD) in two stages with downturn and
in-default estimates; models credit conversion factors from facility
snapshots to give the exposure at default (EAD); and computes expected
loss, risk weights, regulatory capital and expected credit loss from
parameter tables selected by framework preset. The heavy numeric kernels
(rank correlation of wide weight of evidence tables, exact concordance
counts for Somers' D, streamed expected credit loss paths) are compiled
with 'RcppArmadillo'. The scorecard methodology follows Siddiqi (2017)