Fairness Metrics In Credit Risk Algorithms .
FAIRNESS METRICS IN CREDIT RISK ALGORITHMS
Detailed Explanation with Seven Case Laws – Spain and European Union Legal Framework
1. INTRODUCTION
Fairness Metrics in Credit Risk Algorithms refer to the statistical, mathematical and legal standards used to determine whether automated credit assessment systems treat borrowers fairly and equally when evaluating their creditworthiness.
Banks and financial institutions increasingly use Artificial Intelligence (AI), Machine Learning (ML), predictive analytics and automated decision-making systems to determine whether an individual qualifies for a loan, credit card, mortgage or other financial facility.
These systems analyse various factors, including:
Income and employment history.
Previous loan repayment records.
Credit scores and outstanding debts.
Banking and transaction history.
Financial stability and repayment capacity.
Previous defaults and insolvency records.
Other personal and financial characteristics.
Although algorithmic systems improve efficiency and reduce operational costs, they may produce discriminatory outcomes if their training data, variables or decision-making processes contain historical biases.
For example, an algorithm may systematically assign lower credit scores to individuals from particular geographical areas or socioeconomic groups, even when their actual repayment capacity is similar to that of other borrowers.
Therefore, fairness metrics are essential to ensure transparency, accountability, non-discrimination and equal access to financial services.
In Spain, this subject is governed primarily by European Union legislation, particularly the General Data Protection Regulation (GDPR), the EU Artificial Intelligence Act, equality legislation and banking supervisory requirements.
2. MEANING AND CONCEPT OF FAIRNESS METRICS
Fairness metrics are measurable indicators used to identify, evaluate and reduce discrimination in automated credit decisions.
They help financial institutions determine whether an algorithm treats different categories of borrowers consistently and whether its decisions are based on legitimate financial considerations rather than discriminatory characteristics.
The principal objectives are:
To prevent discrimination in lending decisions.
To ensure equal treatment of borrowers.
To improve the accuracy of credit assessments.
To identify hidden algorithmic biases.
To promote transparency in automated decisions.
To establish accountability for financial institutions.
To protect consumers against unfair lending practices.
Fairness does not necessarily mean that every borrower must receive the same credit score. Rather, it requires that differences in treatment are based on legitimate, relevant and proportionate credit-risk considerations.
3. IMPORTANT FAIRNESS METRICS IN CREDIT RISK ALGORITHMS
A. Demographic Parity
Demographic parity measures whether different demographic groups receive positive credit decisions at approximately equal rates.
For example, if 60% of applicants in Group A receive loan approval, the algorithm is examined to determine whether applicants in Group B receive comparable approval rates.
Formula:
Demographic Parity Difference = P(Approval | Group A) – P(Approval | Group B)
A substantial difference may indicate possible discrimination.
However, demographic parity does not necessarily establish fairness because different groups may have different legitimate financial circumstances.
B. Equal Opportunity
Equal opportunity examines whether qualified borrowers belonging to different demographic groups have equal chances of receiving loan approval.
It focuses on the True Positive Rate (TPR).
For example, if two groups contain borrowers who are genuinely capable of repaying loans, the algorithm should not systematically approve one group at a lower rate than the other.
This metric is particularly important because it focuses on applicants who actually satisfy the relevant creditworthiness requirements.
C. Equalized Odds
Equalized odds requires that the algorithm maintains comparable error rates across different groups.
It considers:
True Positive Rate.
False Positive Rate.
For example, an algorithm should not incorrectly classify financially reliable borrowers as high-risk significantly more often in one demographic group than in another.
This metric helps identify unequal treatment arising from automated credit assessments.
D. Predictive Parity
Predictive parity examines whether borrowers receiving the same predicted risk classification have comparable actual repayment outcomes across different groups.
For example, if applicants classified as having a 10% probability of default belong to different demographic groups, their actual default rates should be reasonably comparable.
Predictive parity is important for maintaining the reliability of credit scoring systems.
E. Calibration
Calibration measures whether the predicted probability of default corresponds to the actual probability of default.
For example, if an algorithm assigns a 20% default probability to a group of borrowers, approximately 20% of comparable borrowers should default over the relevant prediction period.
Proper calibration improves the reliability of lending decisions and reduces unjustified differences in risk assessment.
F. Disparate Impact Ratio
The disparate impact ratio compares the approval rates of different groups.
Formula:
Disparate Impact Ratio = Approval Rate of Protected Group / Approval Rate of Reference Group
A ratio significantly below 1 may indicate that a particular group experiences an adverse lending outcome.
The frequently discussed 80% rule is a screening benchmark originating in United States employment discrimination guidance. It is not a universal legal test for credit discrimination in Spain or the European Union.
G. Individual Fairness
Individual fairness requires that individuals with substantially similar relevant financial characteristics should receive similar treatment.
For example, two borrowers having comparable income, repayment history and existing liabilities should not receive substantially different credit assessments without a legitimate explanation.
This principle is important in preventing arbitrary algorithmic decisions.
4. LEGAL FRAMEWORK GOVERNING FAIRNESS METRICS IN SPAIN
A. Spanish Constitution, 1978
Article 14 guarantees equality before the law and prohibits discrimination on specified grounds.
Article 9(2) requires public authorities to promote conditions ensuring that equality is real and effective.
These constitutional principles provide an important foundation for addressing discriminatory financial practices.
B. General Data Protection Regulation (GDPR)
Regulation (EU) 2016/679 is particularly important for algorithmic credit assessments.
Relevant provisions include:
Article 5 – Principles Relating to Processing of Personal Data
Personal data must be processed lawfully, fairly and transparently.
Article 6 – Lawfulness of Processing
Financial institutions must establish a lawful basis for processing personal information.
Article 9 – Special Categories of Personal Data
The processing of sensitive personal information is generally prohibited unless an applicable legal exception exists.
Article 13 and Article 14 – Transparency
Individuals must receive relevant information concerning the processing of their personal data, including information about automated decision-making where applicable.
Article 15 – Right of Access
Individuals have the right to obtain information about relevant automated decision-making and meaningful information about the logic involved, as provided by the Regulation.
Article 22 – Automated Individual Decision-Making
Individuals have the right not to be subject to decisions based solely on automated processing, including profiling, where the decision produces legal effects concerning them or similarly significantly affects them, subject to the exceptions and safeguards established by the provision.
Article 35 – Data Protection Impact Assessment
A Data Protection Impact Assessment may be required where processing is likely to result in a high risk to individuals' rights and freedoms.
C. EU Artificial Intelligence Act
Regulation (EU) 2024/1689 establishes a risk-based regulatory framework for artificial intelligence.
Under Annex III, point 5(b), AI systems intended to evaluate the creditworthiness of natural persons or establish their credit score are generally classified as high-risk AI systems.
An important exception applies to AI systems used to detect financial fraud.
High-risk AI requirements include:
Risk management systems.
Data governance and data quality.
Technical documentation.
Record-keeping.
Transparency and provision of information.
Human oversight.
Accuracy, robustness and cybersecurity.
The Act's applicable requirements must be considered according to its phased implementation timetable.
D. Spanish Law 15/2022 on Equal Treatment and Non-Discrimination
This legislation establishes a comprehensive framework against discrimination.
It is relevant to automated decision-making where algorithms produce discriminatory outcomes affecting access to financial services.
Financial institutions must ensure that their credit assessment practices comply with applicable equality and non-discrimination obligations.
E. Spanish Banking Regulatory Framework
Spanish financial institutions are subject to supervision by the Bank of Spain and other competent European supervisory authorities.
Relevant regulatory considerations include:
Responsible lending practices.
Consumer protection.
Internal risk management.
Governance of automated systems.
Data protection.
Fair treatment of customers.
Appropriate management of model risk.
5. APPLICATION OF FAIRNESS METRICS IN CREDIT RISK ASSESSMENT
Fairness metrics can be applied throughout the entire credit decision-making process.
Stage 1: Data Collection
Banks collect borrowers' financial information, including income, liabilities, repayment history and employment information.
The collected data must be relevant, accurate and lawfully processed.
Stage 2: Data Preparation
Financial institutions examine datasets for missing information, inaccurate records and historical discrimination.
Stage 3: Algorithm Development
Machine learning models are developed using relevant financial variables.
Developers must assess whether variables or proxy variables produce discriminatory outcomes.
Stage 4: Fairness Testing
The algorithm is evaluated through demographic parity, equal opportunity, equalized odds, calibration and other appropriate metrics.
Stage 5: Credit Decision
The system generates a credit-risk assessment or recommendation.
Where applicable, significant automated decisions must comply with GDPR Article 22.
Stage 6: Human Oversight
Qualified personnel should be able to examine the decision, identify errors and intervene where required by applicable law.
Stage 7: Continuous Monitoring
Banks should periodically evaluate model performance and fairness because economic conditions, customer behaviour and datasets change over time.
6. SEVEN IMPORTANT CASE LAWS
The following judicial decisions provide important legal principles for understanding fairness, discrimination, automated decision-making, transparency and accountability in credit risk algorithms.
Some decisions directly concern credit scoring and automated decision-making, while others establish broader equality and data protection principles applicable by analogy.
CASE 1: SCHUFA HOLDING (SCORING), C-634/21 (2023)
Court: Court of Justice of the European Union (CJEU).
Subject: Automated credit scoring and GDPR Article 22.
Facts:
SCHUFA, a German credit reference agency, calculated credit scores using personal information relating to individuals.
These scores were supplied to financial institutions and other organisations to assist them in assessing the creditworthiness of applicants.
The dispute concerned whether generating a credit score could constitute automated individual decision-making under Article 22 GDPR.
Legal Issues:
Whether automated credit scoring falls within Article 22 GDPR.
Whether a credit score can significantly influence a lending decision.
Whether organisations can avoid automated decision-making safeguards by separating score generation from the final decision.
Judgment:
The CJEU held that automated production of a probability value concerning an individual's ability to meet future payment commitments may constitute automated individual decision-making within Article 22 where a third party receiving that score draws strongly on it when establishing, implementing or terminating a contractual relationship.
Legal Principles:
Automated credit scoring may fall within Article 22 GDPR.
Credit reference agencies cannot automatically escape responsibility merely because another organisation formally makes the final lending decision.
The actual influence of the score on the final decision is legally significant.
Relevance to Fairness Metrics:
This case is highly important because it demonstrates that credit scoring systems must be assessed according to their actual impact on individuals.
Fairness testing should therefore examine both the algorithm producing the score and the institution using it.
CASE 2: DUN & BRADSTREET AUSTRIA, C-203/22 (2025)
Court: Court of Justice of the European Union.
Subject: Automated decision-making, credit scoring and meaningful information.
Facts:
The case concerned an individual whose creditworthiness was assessed through automated scoring.
The individual sought information about the logic underlying the automated decision and challenged the adequacy of the explanation provided.
Legal Issues:
What constitutes meaningful information about automated decision-making?
How should the logic of an algorithm be explained?
Can commercial confidentiality prevent individuals from understanding automated decisions?
Judgment:
The CJEU clarified that meaningful information about the logic involved must explain the procedure and principles actually applied in a sufficiently intelligible form.
A controller should provide information enabling the individual to understand which personal data were used and how they influenced the decision.
Merely providing a complex algorithm or a general technical description is insufficient.
Where trade secrets are involved, the applicable protection must be balanced with the individual's rights, including through the procedures available to competent supervisory or judicial authorities.
Legal Principles:
Algorithmic transparency is an important data protection requirement.
Individuals must be able to understand the principal factors influencing automated decisions.
Commercial confidentiality does not automatically eliminate data subjects' rights.
Relevance to Fairness Metrics:
Fairness metrics are meaningful only when institutions can explain how their credit algorithms operate.
This judgment supports the need for understandable explanations, auditability and accountability in automated credit assessments.
CASE 3: OQ v LAND HESSEN (SCHUFA DATA RETENTION), JOINED CASES C-26/22 AND C-64/22 (2023)
Court: Court of Justice of the European Union.
Subject: Creditworthiness data, insolvency information and data protection.
Facts:
The dispute involved SCHUFA's retention of information relating to the discharge of residual debts following insolvency proceedings.
The information was retained in a private credit information database beyond the period during which the information was publicly available in the official insolvency register.
Legal Issues:
Whether private credit agencies may retain insolvency-related information independently of public registers.
Whether such retention complies with GDPR principles.
Whether prolonged storage unfairly affects an individual's financial opportunities.
Judgment:
The CJEU examined the compatibility of such retention practices with GDPR principles.
It held that the GDPR does not permit private credit information agencies to retain personal data relating to the discharge of residual debts for longer than the period during which the corresponding information is available in the public insolvency register, under the circumstances addressed by the judgment.
The Court also examined the lawfulness of processing and the relevant rights of individuals.
Legal Principles:
Credit information must comply with data protection principles.
Retention periods must be justified.
Outdated financial information may unfairly affect individuals' credit opportunities.
Relevance to Fairness Metrics:
Credit algorithms must use accurate and appropriately updated information.
Fairness assessments should examine whether historical insolvency records unfairly disadvantage borrowers even after their financial circumstances have materially changed.
CASE 4: CHEZ RAZPREDELENIE BULGARIA, C-83/14 (2015)
Court: Court of Justice of the European Union.
Subject: Indirect discrimination and equal treatment.
Facts:
The case concerned electricity meters installed at an inaccessible height in a predominantly Roma neighbourhood.
The claimant challenged the practice, arguing that it created unequal treatment based on ethnic origin.
Legal Issues:
Whether a practice that appears neutral can produce discriminatory effects.
Whether indirect discrimination may exist without explicit discriminatory intent.
Whether apparently technical or administrative practices can violate equality principles.
Judgment:
The CJEU explained that indirect discrimination may arise where an apparently neutral practice places persons belonging to a protected group at a particular disadvantage compared with others, unless the practice is objectively justified by a legitimate aim and the means of achieving that aim are appropriate and necessary.
Legal Principles:
Discrimination does not always require explicit discriminatory intention.
Neutral practices can produce discriminatory consequences.
Objective justification and proportionality are important.
Relevance to Fairness Metrics:
A credit algorithm may not expressly use ethnicity, sex or another protected characteristic but may rely on proxy variables that create unequal outcomes.
Fairness metrics can identify these indirect discriminatory effects.
CASE 5: ASSOCIATION BELGE DES CONSOMMATEURS TEST-ACHATS, C-236/09 (2011)
Court: Court of Justice of the European Union.
Subject: Gender equality and discriminatory insurance risk assessments.
Facts:
The case concerned the use of sex-based actuarial factors in determining insurance premiums and benefits.
The legal dispute arose from an exception permitting differences in insurance treatment based on sex where actuarial and statistical data supported those differences.
Legal Issues:
Whether sex-based differences in insurance premiums were compatible with equality principles.
Whether actuarial calculations could justify unequal treatment.
Whether statistical differences should automatically permit discriminatory financial treatment.
Judgment:
The CJEU declared the derogation allowing sex-based differences in individual insurance premiums and benefits invalid from 21 December 2012.
Legal Principles:
Statistical differences do not automatically justify discriminatory treatment.
Financial calculations must comply with applicable equality requirements.
Actuarial accuracy does not, by itself, override fundamental equality principles.
Relevance to Fairness Metrics:
Credit risk algorithms may use statistical characteristics that correlate with protected attributes.
This case demonstrates that statistical predictive accuracy and legal fairness are separate considerations.
A mathematically accurate model is not necessarily legally permissible.
CASE 6: D.H. AND OTHERS v. THE CZECH REPUBLIC (2007)
Court: European Court of Human Rights.
Subject: Indirect discrimination and statistical evidence.
Facts:
The applicants challenged the placement of Roma children in special schools.
They argued that the educational testing and placement system disproportionately disadvantaged Roma children.
Legal Issues:
Whether apparently neutral assessment systems could produce indirect discrimination.
Whether statistical evidence could establish discriminatory effects.
Whether discriminatory outcomes could violate Article 14 of the European Convention on Human Rights.
Judgment:
The Grand Chamber found a violation of Article 14 in conjunction with Article 2 of Protocol No. 1.
The Court recognised the importance of statistical evidence in establishing a prima facie case of indirect discrimination.
Legal Principles:
Statistical evidence can reveal structural discrimination.
Neutral assessment systems may produce discriminatory results.
States must provide adequate justification for significant discriminatory effects.
Relevance to Fairness Metrics:
This judgment provides an important comparative principle for algorithmic credit assessments.
Financial institutions can use statistical fairness testing to identify whether automated lending systems systematically disadvantage particular groups.
CASE 7: TEXAS DEPARTMENT OF HOUSING AND COMMUNITY AFFAIRS v. THE INCLUSIVE COMMUNITIES PROJECT, INC. (2015)
Court: Supreme Court of the United States.
Subject: Disparate impact discrimination and statistical analysis.
Facts:
The dispute concerned the allocation of housing tax credits and their effects on racial integration.
The claimant argued that the allocation system produced discriminatory consequences even without proof of intentional discrimination.
Legal Issues:
Whether disparate-impact discrimination is legally recognised.
Whether statistical evidence can establish discriminatory effects.
Whether apparently neutral allocation policies require objective justification.
Judgment:
The US Supreme Court recognised that disparate-impact claims are available under the Fair Housing Act.
However, it emphasised that such claims require a sufficiently robust causal connection between the challenged practice and the alleged discriminatory effect.
Legal Principles:
Discriminatory effects can be legally relevant even without discriminatory intent.
Statistical evidence plays an important role.
A causal relationship between the challenged policy and discriminatory outcome must be established.
Relevance to Fairness Metrics:
This case offers a useful comparative framework for evaluating algorithms that allocate credit or financial opportunities.
It demonstrates why institutions should examine approval rates, error rates and other statistical outcomes across relevant groups.
This is a United States decision and does not constitute binding authority in Spain.
7. COMPARATIVE ANALYSIS OF THE SEVEN CASE LAWS
| Case Law | Main Legal Principle | Relevance |
|---|---|---|
| SCHUFA, C-634/21 | Automated credit scoring under GDPR Article 22 | Direct |
| Dun & Bradstreet, C-203/22 | Transparency and explanation of automated decisions | Direct |
| SCHUFA, C-26/22 and C-64/22 | Lawful retention of credit information | Direct |
| CHEZ, C-83/14 | Indirect discrimination | Analogous |
| Test-Achats, C-236/09 | Equality in actuarial risk assessments | Analogous |
| D.H. v Czech Republic | Statistical evidence of discrimination | Analogous |
| Inclusive Communities (2015) | Disparate-impact discrimination | Comparative |
8. CHALLENGES IN IMPLEMENTING FAIRNESS METRICS
Despite their importance, fairness metrics face several practical and legal difficulties.
A. Historical Bias
Historical banking data may contain discriminatory lending practices. Training algorithms on such data can reproduce earlier inequalities.
B. Proxy Discrimination
Variables such as residential location, occupation and purchasing behaviour may indirectly reveal protected characteristics.
C. Conflicting Fairness Metrics
Different fairness metrics may produce conflicting results. For example, demographic parity and predictive parity may not simultaneously be achievable when underlying default rates differ between groups.
D. Lack of Transparency
Complex machine learning models may make it difficult for customers and regulators to understand the reasons behind lending decisions.
E. Data Quality Problems
Incorrect, incomplete or outdated financial information can lead to unfair credit assessments.
F. Commercial Confidentiality
Banks may seek to protect their proprietary algorithms, creating difficulties in providing meaningful explanations to customers.
G. Human Oversight
Human reviewers may simply accept algorithmic recommendations without independently examining their accuracy or fairness.
9. RESPONSIBILITIES OF BANKS AND FINANCIAL INSTITUTIONS
Banks operating in Spain should adopt a comprehensive fairness governance framework.
Their responsibilities include:
Conducting regular algorithmic fairness audits.
Ensuring accurate and relevant training data.
Identifying discriminatory proxy variables.
Monitoring demographic disparities where lawful and appropriate.
Providing meaningful explanations of automated decisions.
Establishing effective complaint and review procedures.
Maintaining appropriate human oversight.
Documenting algorithmic risk assessments.
Complying with GDPR and applicable AI Act requirements.
Reviewing algorithms whenever significant performance or fairness problems arise.
Financial institutions should also establish internal accountability mechanisms involving compliance officers, data protection officers, risk management teams and model validation specialists.
10. ROLE OF THE BANK OF SPAIN AND EUROPEAN SUPERVISORY AUTHORITIES
The Bank of Spain plays an important role in supervising banking activities within its legal competence.
At the European level, the European Banking Authority (EBA) and the European Central Bank (ECB), within their respective mandates, contribute to regulatory standards and supervisory expectations concerning banking governance, risk management and consumer protection.
The European Data Protection Board and national data protection authorities also play important roles in interpreting and enforcing data protection requirements.
The Spanish Data Protection Agency (AEPD) is particularly relevant to complaints involving unlawful personal data processing and automated decision-making.
These authorities contribute to ensuring that automated financial systems operate consistently with applicable legal obligations.
11. RECOMMENDATIONS FOR IMPROVING FAIRNESS IN CREDIT RISK ALGORITHMS
The following measures can strengthen fairness in automated lending:
1. Regular Fairness Audits: Banks should evaluate algorithmic outcomes at regular intervals.
2. Representative Training Data: Training datasets should adequately represent the relevant population and avoid unjustified historical bias.
3. Explainable Artificial Intelligence: Institutions should develop systems that allow understandable explanations of credit decisions.
4. Human Review: Customers should have access to meaningful review procedures where applicable.
5. Data Minimisation: Only necessary and relevant personal information should be processed.
6. Bias Detection: Statistical tools should be used to identify unequal approval rates and error rates.
7. Regulatory Compliance: Banks should comply with GDPR, the AI Act and applicable Spanish financial and equality legislation.
8. Independent Model Validation: Credit-risk algorithms should undergo independent technical and legal assessments.
12. CONCLUSION
Fairness Metrics in Credit Risk Algorithms are essential for ensuring that artificial intelligence and automated decision-making systems operate fairly, transparently and responsibly within the banking sector.
In Spain, the subject is closely connected with constitutional equality principles, the GDPR, the EU Artificial Intelligence Act and Spanish anti-discrimination legislation.
The seven judicial decisions discussed above establish important principles concerning automated credit scoring, transparency, data retention, indirect discrimination, statistical evidence and equal treatment.
The SCHUFA judgment (C-634/21) is particularly significant because it establishes that automated credit scoring may fall within GDPR Article 22 when the score strongly influences a third party's contractual decision.
Similarly, Dun & Bradstreet (C-203/22) strengthens the requirement that individuals receive meaningful and understandable information about automated decision-making.
The remaining decisions provide important supporting principles for examining discriminatory effects, statistical fairness and the lawful use of financial information.
Ultimately, fairness metrics should not be treated merely as technical measurements. They are important instruments for protecting borrowers' rights, strengthening public confidence in financial institutions and ensuring that technological innovation does not undermine equality and justice.
Therefore, an effective credit risk algorithm must be not only financially accurate but also legally compliant, transparent, accountable and non-discriminatory.
13. LIST OF SEVEN CASE LAWS
SCHUFA Holding (Scoring), Case C-634/21 (2023), Court of Justice of the European Union.
Dun & Bradstreet Austria, Case C-203/22 (2025), Court of Justice of the European Union.
SCHUFA Data Retention, Joined Cases C-26/22 and C-64/22 (2023), Court of Justice of the European Union.
CHEZ Razpredelenie Bulgaria, Case C-83/14 (2015), Court of Justice of the European Union.
Association Belge des Consommateurs Test-Achats, Case C-236/09 (2011), Court of Justice of the European Union.
D.H. and Others v. The Czech Republic, Application No. 57325/00 (2007), European Court of Human Rights.
Texas Department of Housing and Community Affairs v. The Inclusive Communities Project, Inc., 576 U.S. 519 (2015), Supreme Court of the United States.
Academic Note: The first three decisions directly concern credit scoring or credit information. The remaining four provide broader equality and non-discrimination principles relevant by analogy or comparative analysis. The US Supreme Court decision is persuasive comparative material only, not binding Spanish or EU law.

comments