Lesson 1
Machine Learning Types in Finance
Machine learning falls into supervised, unsupervised and reinforcement learning, with deep learning as a powerful neural-network approach. Each type suits different finance problems, from credit scoring to fraud detection and trading.
Supervised Learning
- The model learns from labelled data (inputs paired with known outputs).
- Classification predicts categories, such as loan default (yes/no) or fraud.
- Regression predicts numbers, such as stock returns or house prices.
- Common algorithms: linear and logistic regression, decision trees, random forests, SVM.
Unsupervised Learning
- The model finds patterns in unlabelled data.
- Clustering (e.g. k-means) is used for customer segmentation and grouping stocks.
- Dimensionality reduction (PCA) is used for risk factors.
- Anomaly detection is used for fraud and money laundering.
Reinforcement and Deep Learning
- In reinforcement learning, an agent learns by trial and error to maximise rewards, as in algorithmic trading and portfolio rebalancing.
- Deep learning uses multi-layer neural networks for NLP sentiment analysis and time series.
- Key concerns: overfitting, explainability (black box) and data quality.
Key terms
- Supervised learning
- Learning from labelled examples to predict outputs.
- Unsupervised learning
- Finding structure in unlabelled data.
- Reinforcement learning
- An agent learning actions that maximise cumulative reward.
- Classification
- Predicting a discrete category.
- Overfitting
- A model fits training noise and generalises poorly.
Lesson 2
AI Credit Scoring and Default Prediction
AI credit scoring estimates the probability that a borrower will default, using statistical and machine learning models trained on historical loan outcomes. Modern approaches add alternative data and nonlinear models to traditional scorecards, but they must stay accurate, explainable and fair under regulation.
Credit Scoring Basics
- Goal: rank borrowers by risk and estimate Probability of Default (PD), usually over a 12-month horizon.
- Expected Loss = PD x LGD x EAD (loss given default x exposure at default).
- Traditional scorecards use logistic regression on variables such as payment history, utilization, income and debt-to-income ratio.
- Default prediction is a binary classification problem, and the classes are usually imbalanced because few borrowers default.
Machine Learning Models
- Gradient boosting (XGBoost, LightGBM), random forests and neural networks capture nonlinear effects and interactions between variables.
- Alternative data such as rent and utility payments, cash-flow data and mobile data can help score 'thin-file' borrowers who have little credit history.
- Imbalanced classes are handled with resampling, class weights and suitable evaluation metrics.
Evaluation
- AUC-ROC and the Gini coefficient (Gini = 2 x AUC - 1) measure how well a model ranks borrowers.
- The KS statistic measures the maximum separation between the score distributions of good and bad borrowers.
- Calibration checks whether predicted PDs match the default rates actually observed.
- Use out-of-time validation and monitor models for drift once deployed.
Explainability, Fairness and Regulation
- Lenders must give adverse action reasons when they decline an applicant (ECOA/FCRA in the US; GDPR in the EU).
- SHAP and LIME explain individual predictions from complex models.
- Proxy variables such as ZIP code can introduce discrimination even when protected attributes are excluded, so test for disparate impact.
- Model risk management (e.g., SR 11-7) requires validation, documentation and governance.
Key terms
- Probability of Default (PD)
- The likelihood that a borrower fails to meet obligations within a given horizon.
- LGD
- Loss Given Default: the share of the exposure lost if default occurs.
- EAD
- Exposure at Default: the amount owed at the time of default.
- AUC-ROC
- Probability that the model ranks a randomly chosen defaulter above a randomly chosen non-defaulter.
- Alternative data
- Non-traditional data, such as utility or cash-flow records, used to assess creditworthiness.
- SHAP
- A method that attributes a model's prediction to its input features using Shapley values.
- Disparate impact
- Disproportionately adverse outcomes for a protected group, even without intent.
Lesson 3
AI for Fraud and AML Detection
AI detects payment fraud and money laundering by learning patterns of normal and suspicious behavior from transactions, customers and their networks. Effective systems combine supervised models, anomaly detection and graph analytics, and are tuned to reduce false positives while meeting regulatory requirements.
Fraud vs AML
- Fraud: deception for direct gain, such as card fraud, account takeover or application fraud. It often requires real-time decisions in milliseconds.
- AML (anti-money laundering): detecting the placement, layering and integration of illicit funds. Analysis usually spans longer periods and networks of accounts.
- Suspicious activity found through AML monitoring leads to Suspicious Activity Reports (SARs) filed with regulators.
Techniques
- Supervised classifiers (gradient boosting, neural networks) learn from labeled fraud cases.
- Unsupervised anomaly detection (isolation forests, autoencoders, clustering) catches new patterns that have no labels yet.
- Graph analytics and graph neural networks reveal fraud rings, mule accounts and circular flows of money.
- Feature engineering is central: transaction velocity, deviation from the customer's usual behavior, device and geolocation, and time features.
- Fraudsters adapt their methods, so models must be retrained to handle concept drift.
Challenges and Metrics
- Extreme class imbalance: fraud is often less than 0.1% of transactions, so accuracy is misleading.
- Use precision, recall, PR-AUC and cost-based metrics instead.
- Rule-based AML systems generate very high false-positive rates (often above 90%). ML can prioritize alerts and reduce analyst workload.
- Labels are delayed and noisy because chargebacks and investigations take time.
- Investigators and regulators need explainable decisions.
Key terms
- AML
- Anti-money laundering: controls that detect and prevent the disguising of illicit funds.
- Layering
- The money-laundering stage that obscures where funds came from through complex transfers.
- Anomaly detection
- Identifying observations that deviate significantly from normal patterns.
- SAR
- Suspicious Activity Report filed with regulators about potentially illicit activity.
- Concept drift
- A change over time in the patterns a model learned, which reduces its accuracy.
- Money mule
- An account holder who moves illicit funds on behalf of criminals.
Lesson 4
Algorithmic Trading, NLP Sentiment and Robo-Advisors
AI supports investing through algorithmic trading strategies, natural language processing that turns text into sentiment signals, and robo-advisors that automate portfolio management. Each relies on data-driven models but faces risks such as overfitting, noisy signals and the need for suitability and oversight.
Algorithmic Trading
- Computers execute trades according to rules or models, for example execution algorithms (VWAP, TWAP), market making, statistical arbitrage and momentum strategies.
- ML predicts returns or price direction from features; reinforcement learning can optimize execution.
- Backtest on historical data, then validate out-of-sample or with walk-forward testing.
- Risks include overfitting, look-ahead bias, survivorship bias, transaction costs and slippage, and flash-crash dynamics.
NLP Sentiment Analysis
- Converts news, earnings calls, filings and social media into sentiment scores that can serve as trading signals.
- Methods range from lexicons such as Loughran-McDonald, a finance-specific dictionary, to transformer models such as FinBERT and LLMs.
- General-purpose lexicons misread finance words: 'liability' or 'tax' are not negative in a financial context.
- Signals are noisy and decay quickly, so speed, careful labeling and avoiding look-ahead in timestamps all matter.
Robo-Advisors
- Automated platforms profile a client's goals and risk tolerance with questionnaires, then build diversified portfolios, often of ETFs.
- They are typically based on Modern Portfolio Theory and mean-variance optimization.
- Features include automatic rebalancing, tax-loss harvesting and low fees.
- Limitations: simplistic risk profiling, limited personalization and behavior in crises. Hybrid models add human advisors.
- They must meet suitability and fiduciary obligations.
Key terms
- Algorithmic trading
- Using computer programs to generate or execute trades automatically.
- Backtesting
- Testing a strategy on historical data to estimate how it would have performed.
- Look-ahead bias
- Using information in a backtest that would not have been available at the time of the trade.
- VWAP
- Volume-weighted average price, a common execution benchmark and algorithm.
- Sentiment analysis
- NLP that measures positive or negative tone in text.
- FinBERT
- A BERT language model fine-tuned on financial text for sentiment.
- Robo-advisor
- An automated service that builds and manages portfolios using algorithms.
- Tax-loss harvesting
- Selling losing positions to realize losses that offset taxable gains.
Lesson 5
Explainable AI, Model Risk and the DPDP Act
AI models used in finance must be explainable so that decisions such as credit approvals can be justified to customers, auditors and regulators. Model risk is the potential for loss from models that are wrong or misused, and it needs governance across the whole model lifecycle. India's Digital Personal Data Protection (DPDP) Act, 2023 sets the rules for how personal data used by these models may be collected and processed.
Explainable AI (XAI)
- Complex models such as deep learning and gradient boosting are often 'black boxes' whose reasoning is hard to see.
- Explainability lets a lender justify a decision, for example giving the reasons for rejecting a loan.
- It also helps detect bias and supports regulatory and audit review.
- Global explanations describe how the model behaves overall; local explanations account for a single prediction.
- Common techniques: SHAP (Shapley values), LIME, feature importance, partial dependence plots, and interpretable surrogate models.
- There is often a trade-off between a model's accuracy and how interpretable it is.
Model Risk
- Model risk is the risk of loss from incorrect models, flawed data or assumptions, or a model being misused.
- AI-specific risks: overfitting, data drift and concept drift, biased training data, and adversarial manipulation.
- Governance follows the model lifecycle: development, independent validation, approval, ongoing monitoring, periodic review and retirement.
- Firms should keep a model inventory, clear documentation, back-testing and benchmarking results, and human oversight.
- Reference frameworks include the US Federal Reserve's SR 11-7 and the RBI's guidance on model risk and governance for regulated entities.
DPDP Act, 2023
- It is India's law governing the processing of digital personal data.
- Key roles: the Data Principal (the individual), the Data Fiduciary (decides why and how data is processed) and the Data Processor (processes data on the fiduciary's behalf).
- Consent must be free, specific, informed, unconditional and unambiguous, given through a clear affirmative action, and it can be withdrawn.
- Supporting principles include purpose limitation, data minimisation, accuracy, storage limitation and reasonable security safeguards.
- Data Principals have rights to access information about their data, to correction and erasure, to grievance redressal, and to nominate another person.
- Significant Data Fiduciaries carry extra duties: appointing a Data Protection Officer, conducting a DPIA and arranging independent audits.
- The Data Protection Board of India enforces the Act; penalties can reach Rs 250 crore per instance.
Key terms
- Explainable AI
- Methods that make the outputs of an AI model understandable to humans.
- SHAP
- A game-theory-based method that attributes a prediction to the contribution of each input feature.
- Model risk
- The potential for loss arising from models that are erroneous or misused.
- Data drift
- A change in the distribution of input data over time that degrades model performance.
- Data Fiduciary
- The entity that determines the purpose and means of processing personal data.
- Data Principal
- The individual to whom the personal data relates.
