Machine Learning
Classical ML in practice: credit scoring, fraud detection, feature engineering, and evaluation.
2026
Financial machine learning from zero, part 3: a probability-of-default baseline you can trust
The third post in the financial machine learning series turns part 2's tensors into a complete probability-of-default baseline. Two simple benchmarks, logistic regression in PyTorch, the probability trap inside class-weighted loss, calibration curves, and a review threshold frozen before the test period is scored. Every result comes from the runnable companion code, on the same synthetic mortgage panel.
20 min read
Financial machine learning from zero, part 2: tensors, time-ordered batching, and why leakage hides in .shift()
The second post in the financial machine learning series, and the first with code. It turns a Freddie Mac-style mortgage panel into PyTorch tensors one named step at a time, then breaks the pipeline on purpose with eight one-line mistakes and measures each one. Some push validation PR-AUC from 0.31 to 0.96. Others barely move it, which is worse, because nothing looks wrong. It ends with the checks that catch every one of them before a reviewer does.
27 min read
Financial machine learning from zero, part 1: the vocabulary, the traps, and the metrics that matter
The first post in a beginner-friendly series on machine learning in finance, built around the problems banks actually run models on: credit scoring, fraud detection, and anti-money-laundering analytics, with market prediction as a supporting track. No code yet. Instead, the things I wish every newcomer knew before training a model on financial data: why it breaks the textbook assumptions, the vocabulary in every model notebook, the mistakes that make models look brilliant in development and fail in production, and a reference table of the metrics that matter, with which direction is good for each.
22 min read