Yonsei University · for 3rd- and 4th-year undergraduates, beginners welcome · 16 units
Browse and download → https://keerhee.github.io/financial-machine-learning/
Sixteen units, four optional special sessions beyond them, and a supplementary packages on linear and logistic regression with KOSPI data, outlier detection, meta-labeling and a map of the algorithm families. The sessions: S1 and S2 on recommenders, S3 and S4 on the AI-native firm.
From what machine learning is, through the algorithms, to the parts that only matter in finance: bars and the CUSUM filter instead of the calendar, the triple barrier instead of "will it go up tomorrow", purged cross-validation instead of a naive backtest, and a Deflated Sharpe Ratio to tell you when the result was luck.
Built on Hull's Machine Learning in Business, López de Prado's Advances in Financial Machine Learning, and Causal Factor Investing — and carried through three industrial applications: product recommendation, fraud detection, and an AI chatbot.
70 PDFs · 1,944 slides · 45 practice data files. For each of the sixteen units a
primer, a lecture deck and a problem set; plus the syllabus, a midterm practice set with its answer key and cheat sheet, the final project brief and pre-study,
four special sessions, five supplementary packages in English and Korean, and the
companion Colab notebook the labs run from. Only
PDFs, CSVs, Markdown and the notebook are tracked — the editable PPTX and DOCX
sources are excluded by .gitignore.
| Path | Contents |
|---|---|
U01_ML_and_the_Finance_Problem/ … U16_Integration_and_Capstone/ |
Per unit: the primer, the lecture deck, the problem set, and a data/ directory with the CSVs its three problems use. Each has a README naming the special sessions it leads to |
course/ |
Syllabus, the curriculum map, and the data setup notebook the labs use |
special_sessions/ |
Four optional sessions outside the sixteen units, each a deck and a companion note |
supplementary/ |
Supplementary packages beside the units — a deck (with its data and notebook for the KOSPI labs), in English and Korean |
lecture_sd/ |
In-class decks — the decks and workbooks used in the face-to-face class (Weeks 7–16 and special topics), in English and Korean |
midterm/ |
Midterm practice set (units 1–7, 48 questions), its answer key, and a cheat sheet |
final_project/ |
Final project — the brief for the eight team projects and a pre-study to read before choosing one, in English and Korean |
site/ |
The GitHub Pages listing page (index.html, one file) |
Page counts match the source slide counts one for one. GitHub renders both PDFs and CSVs in the browser, so nothing needs cloning to read.
| Form | Example |
|---|---|
| Primer | U07_Primer_Trees_and_Ensembles.pdf |
| Lecture deck | U07_Lecture_Trees_and_Ensembles.pdf |
| Problem set | U07_ProblemSet_Trees_and_Ensembles.pdf |
| Practice data | U07_Trees_and_Ensembles/data/fml_w7_p1_loans.csv |
| Special session | special_sessions/S3_AI_Native_Asset_Manager.pdf |
| Supplementary package | supplementary/SUP01_Linear_Regression_KOSPI_EN.pdf (_KR for Korean) |
| In-class deck | lecture_sd/W07_Classification_Metrics_EN.pdf (_KR for Korean) |
U07 is unit 7 — the seventh block of material, not the seventh week of term. The
data files keep their original w7 naming from when the course was written; unit 7
and its data are the same thing.
| Part | Units | Topic |
|---|---|---|
| I · Foundations | 1–3 | ML paradigms · bars and CUSUM · triple barrier and meta-labeling |
| II · Core Algorithms | 4–9 | Linear · logistic, KNN, NB · SVM · trees and ensembles · deep learning · unsupervised |
| III · Financial ML in Depth | 10–13 | Purged CV, DSR and PBO · HRP and NCO · NLP, LLMs and RAG · reinforcement learning |
| IV · Frontier and Causality | 14–16 | Causal inference · SHAP and fairness · TFT, GNN and agents · integration |
Anomaly detection runs as its own thread across the algorithms — LOF in unit 5, OCSVM in unit 6, Isolation Forest in unit 7, the autoencoder in unit 8 — because in production no single detector is enough.
Week 8 is the midterm and week 16 is the final, so the sixteen units are taught in fourteen weeks. Two weeks carry two units: week 5 takes the three simple classifiers together with the support vector machine, and week 14 takes causality and fairness together with the frontier.
The exam scopes fix where the line falls — the midterm covers units 1–8 and the
final covers units 9–16 — so the split is even, eight units either side. The
full table and the rejected pairings are in
course/curriculum_map.md.
A practice set for the midterm, its answer key, and a cheat sheet to review from — all
in midterm/.
| File | What it is |
|---|---|
Midterm_Practice_U01-07.pdf |
48 basic multiple-choice questions on units 1–7, about 50 minutes |
Midterm_Practice_U01-07_Answer_Key.pdf |
Answer grid, formula sheet, and a worked explanation for every question — why the right option is right and why each other option is wrong |
Midterm_Cheat_Sheet.pdf |
The rule behind every question, one topic per page: data and splits, the triple barrier, regularisation, precision–recall–F1, logistic regression, SVM, anomaly detection, trees, bagging, boosting, Isolation Forest |
Try the questions before opening the key. The key is published because this is a
practice set; .gitignore still refuses every other answer key by name.
A team project, 20% of the course grade — eight projects, one pipeline, from a financial ML model to a multi-agent app. Claude Code builds; the team decides, checks and explains. All in final_project/.
| Deck | Slides | |
|---|---|---|
| Final Project Brief — the eight projects, milestones, grading and how to build with Claude Code | EN · KR | 59 |
| Eight Problems, One Pipeline — pre-study: for each problem, the classical method, what machine learning adds, and the trap that can erase the gain | EN · KR | 43 |
Every unit opens with a seventeen-slide primer that assumes nothing. It is where the arithmetic goes, so the lecture does not have to stop for it: what a dot product is before the support vector machine, what a centroid is before k-means, what discounting is before reinforcement learning.
| Unit | Primer | Unit | Primer |
|---|---|---|---|
| 1 | What a Model Is | 9 | No Answer Key This Time |
| 2 | How Data Becomes a Bar | 10 | How to Fool Yourself |
| 3 | What Are We Predicting? | 11 | Why Two Is Safer Than One |
| 4 | The Straight Line | 12 | Turning Words Into Numbers |
| 5 | From a Number to a Verdict | 13 | Learning by Doing |
| 6 | What Makes a Line Safe | 14 | Correlation Is Not Enough |
| 7 | Asking the Right Question | 15 | Attention and Neighbours |
| 8 | One Neuron at a Time | 16 | The Whole Pipeline |
Twenty minutes each. If none of it is new, treat it as revision and skip to the lecture.
Four optional sessions that sit outside the sixteen units. Each is a deck with a companion note in Markdown, so it reads on GitHub without downloading anything.
| # | Session | Slides | What it covers |
|---|---|---|---|
| S1 | Recommender Systems | 23 | The third running app of the course. Content-based and collaborative filtering, matrix factorization — built from cosine similarity (unit 12) and hidden factors (unit 9). |
| S2 | Recommender Systems · Part 2 | 30 | Deep-learning recommenders, from factorization machines as the bridge up to graph- and language-based models. |
| S3 | The AI-Native Asset Manager | 26 | The capstone view: the investment process as a team of cooperating agents — analysts, traders, risk — with humans overseeing. Pulls units 10–15 together. |
| S4 | AI-Native Asset Manager · Part 2 | 28 | The implementation half — building that agent firm in LangGraph as an explicit state machine, with checkpointing and human-in-the-loop. |
Each unit's README points forward to the sessions that pick it up: unit 9 and unit 12
lead to S1, unit 8 and unit 15 to S2, units 10, 11, 14 and 15 to S3, and units 12, 13
and 15 to S4.
S1→S2 and S3→S4 are pairs; the second of each assumes the first. Notes: S1 · S2 · S3 · S4
Decks used in the face-to-face class (lecture_sd/), each in English and Korean. Here W07 is the teaching week, not a unit number; Special_ decks sit outside the weekly plan.
| Deck | Week | Slides | |
|---|---|---|---|
| Classification Models — The Basics | Week 7 | EN · KR | 6 |
| Classification Metrics | Week 7 | EN · KR | 5 |
| Anomaly Detection — Fraud and Unusual Transactions | Week 7 | EN · KR | 9 |
| SVM — Distance and Margin Width | Week 7 | EN · KR | 15 |
| SVM — Margin and Objective | Week 7 | EN · KR | 18 |
| Decision Trees and Ensembles | Week 7 | EN · KR | 149 |
| Advanced Tree Models | Week 7 | EN · KR | 86 |
| Advanced Gradient Boosting | Week 7 | EN · KR | 86 |
| Neural Network Foundations | Week 8 | EN · KR | 35 |
| Trees, Neural Networks and Unsupervised Learning — Cheat Sheet | Weeks 7–9 | EN · KR | 38 |
| Unsupervised Learning — Group, Compress, Clean | Week 9 | EN · KR (figure labels in English) | 44 |
| Honest Backtesting | Week 10 | EN · KR | 21 |
| Honest Backtesting — Workbook | Week 10 | EN · KR | 5 |
| Honest Backtesting (Extended) | Week 10 | EN · KR | 34 |
| Honest Backtesting (Extended) — Workbook | Week 10 | EN · KR | 9 |
| Meta-Labeling | Week 10 | EN · KR | 46 |
| Model Validation and Ensembles | Week 10 | EN · KR | 48 |
| Portfolio Construction | Week 11 | EN · KR | 22 |
| Portfolio Construction — Workbook | Week 11 | EN · KR | 6 |
| NLP · LLM · RAG | Week 12 | EN · KR | 22 |
| NLP · LLM · RAG — Workbook | Week 12 | EN · KR | 5 |
| Reinforcement Learning | Week 13 | EN · KR | 21 |
| Reinforcement Learning — Workbook | Week 13 | EN · KR | 6 |
| Causality · XAI · Fairness | Week 14 | EN · KR | 21 |
| Causality · XAI · Fairness — Workbook | Week 14 | EN · KR | 5 |
| SHAP and Shapley Values | Week 14 | EN · KR | 19 |
| Explainable ML — SHAP, LIME, Counterfactuals and Regulation | Week 14 | EN · KR | 65 |
| Explainable ML — Workbook | Week 14 | EN · KR | 18 |
| Explainable ML — Shapley Values and SHAP | Week 14 | EN · KR | 62 |
| Explainable ML — Shapley Values and SHAP (Short Lecture) | Week 14 | EN · KR | 24 |
| Fairness in Financial AI | Week 14 | EN · KR | 58 |
| Fairness in Financial AI — Workbook | Week 14 | EN · KR | 14 |
| TFT · GNN · Agents | Week 15 | EN · KR | 21 |
| TFT · GNN · Agents — Workbook | Week 15 | EN · KR | 6 |
| Integration and Final Project | Week 16 | EN · KR | 20 |
| Integration and Final Project — Workbook | Week 16 | EN · KR | 5 |
| Privacy-Preserving Machine Learning (PPML) | Special | EN · KR | 64 |
| PPML — Workbook | Special | EN · KR | 11 |
| Adversarial Attacks and Defenses in Financial AI | Special | EN · KR | 44 |
Short videos — watch on YouTube (not stored in the repository).
| Video | Week | Link | Notes |
|---|---|---|---|
| Support Vector Machines in 3D — The Corridor | Week 7 | YouTube | 80 s · no narration · English captions |
| Unsupervised Learning in 70 Seconds (Short) | Week 9 | YouTube | 70 s · vertical |
Beside the units and the special sessions, self-contained packages: a deck, and for the KOSPI labs its data and notebook. Unlike the rest of the repository they ship in Korean as well as English.
| # | Package | Slides | What it covers |
|---|---|---|---|
| SUP01 | Linear Regression on the KOSPI · 한국어 | 51 · 49 | Least squares, gradient descent, metrics, Ridge / Lasso / ElasticNet and polynomial features — then a KOSPI lab (29 indicators, 160 months) that walks the Colab notebook cell by cell and reproduces its 0.95 R² on a random 80/20 split. Data and notebook in supplementary/SUP01_Linear_Regression_KOSPI/. Pairs with unit 4. |
| SUP02 | Logistic Regression on the KOSPI · 한국어 | 58 · 58 | Sigmoid, odds and maximum likelihood, the confusion matrix and its metrics, ROC / AUC and precision–recall — then a lab on the same KOSPI data that classifies next month's direction, compares the model with an always-up baseline and repeats the random split 100 times (mean accuracy 0.545 against 0.570). Data and notebook in supplementary/SUP02_Logistic_Regression_KOSPI/. Pairs with unit 5. |
| SUP03 | Anomaly Detection · 한국어 | 30 · 24 | Unsupervised detectors that learn what normal looks like: the One-Class SVM and SVDD (a boundary or hypersphere around normal data), Isolation Forest (outliers isolate in few random splits), the Local Outlier Factor (density relative to neighbours) and autoencoders (outliers reconstruct badly), each with its formula and a scikit-learn example. Pairs with unit 5. |
| SUP04 | Meta-Labeling · 한국어 | 10 · 13 | Meta-labeling in three stages: stage 1 picks the side and is tuned for recall, stage 2 — a classifier trained on triple-barrier labels — decides whether to trade or pass and raises precision, stage 3 sizes the bet with the Kelly criterion. A trading example: cumulative return 19.7% → 39.6%, maximum drawdown −61.9% → −36.8%. Pairs with unit 3. |
| SUP05 | ML Algorithm Family Tree · 한국어 | 21 · 21 | A one-deck map of the main algorithm families — supervised (regression and classification), unsupervised (clustering and dimensionality reduction), ensembles (bagging and boosting) and reinforcement learning — each shown with the objective it optimises, from least squares to the Bellman equation. An overview across the units. |
Details in supplementary/README.md.
Twelve of the sixteen lecture decks send you to the same companion notebook, so it
lives once in course/ rather than inside any one unit:
course/FML_Data_Setup_Guide.ipynb —
open it in Colab
Run section 0 once, then jump to the section for the unit you are on. Section 10 is a map from lab to section:
| Unit | Lab topic | Run section |
|---|---|---|
| 1 | Returns and normality; the overfitting demo | 2 |
| 2 | Dollar bars; CUSUM events | 3 (a) |
| 3 | Triple-barrier labeling | 3 (b) |
| 4 | Linear models; index tracking | 3 (b) |
| 5–8 | Fraud and default classification | 4, or 5 offline |
| 9 | PCA, denoising, clustering | 3 (b) |
| 10 | Leakage and multiple testing | 2 |
| 11 | HRP weights; comparing portfolios | 3 (b) |
| 12 | Similar sentences; a tiny RAG | 6 |
| 13 | Q-learning; all-at-once vs sliced execution | 7 |
| 14 | SHAP-style explanation; fairness across groups | 5 |
| 15 | Attention forecast; a graph update | 8 |
| 16 | The capstone pipeline | 9 |
| any | No internet available | 5 — offline fallback |
Prices come from yfinance (free, no signup); the fraud and default sets come from
Kaggle; and section 5 simulates every one of them if both are blocked. Units 12, 13,
15 and 16 need no download at all — their data is a few sentences or a few arrays,
built in the notebook. Nothing needs a paid account.
Sections 0 to 5 keep the numbers the lecture decks cite, so a deck that says "run §3 (b)" still means the multi-stock panel.
Every problem ships the data it needs. The files are small, synthetic or derived, and sit beside the deck that uses them:
U05_Classification_and_Anomalies/data/
README_W5.txt
fml_w5_p2_applicants.csv
fml_w5_p3_likelihoods.csv
No download step, no API key, no vendor account — the numbers are chosen so the hand-calculation in the problem set and the code you write afterwards agree exactly.
Python — pandas, numpy, matplotlib, scikit-learn; XGBoost for the ensembles; PyTorch for the neural network and autoencoder units.
Prerequisites are deliberately light: pandas and numpy basics, conditional probability and Bayes, matrix multiplication and eigendecomposition, and returns and risk. None of it is graded, and the syllabus lists a self-study resource for each.
Course materials and practice data under CC BY-NC-SA 4.0. Textbook content referenced in the slides belongs to its authors and is cited, not reproduced.