  In this work we build a stack of machine learning models aimed at composing a
state-of-the-art credit rating and default prediction system, obtaining
excellent out-of-sample performances. Our approach is an excursion through the
most recent ML / AI concepts, starting from natural language processes (NLP)
applied to economic sectors' (textual) descriptions using embedding and
autoencoders (AE), going through the classification of defaultable firms on the
base of a wide range of economic features using gradient boosting machines
(GBM) and calibrating their probabilities paying due attention to the treatment
of unbalanced samples. Finally we assign credit ratings through genetic
algorithms (differential evolution, DE). Model interpretability is achieved by
implementing recent techniques such as SHAP and LIME, which explain predictions
locally in features' space.
