Abstract: | Machine learning methods used in finance for corporate credit rating lack transparency as to which accounting features are important for the respective rating. A counterfactual explanation is a methodology that attempts to find the smallest modification of the input values which changes the prediction of a learned algorithm to a new output, other than the original one. We propose a “sparsity algorithm” which finds a counterfactual explanation to find the most important features for obtaining a higher credit score. We validate the novel algorithm with synthetically generated data and we apply it to quarterly financial statements from companies in the US market. We provide evidence that the counterfactual explanation can capture the majority of features that change between two quarters when corporate ratings improve. The results obtained show that the higher the rating of a company, the greater the “effort” required to further improve credit rating. |