AQIF study materials
AQIF study resources

AQIF: Data Science and Machine Learning for Investments

AQIF · Work through your exam, one topic at a time.

All guide sections

Data Science and Machine Learning for Investments

Learning problem types

Supervised regression and classification, unsupervised clustering and dimensionality reduction, and reinforcement learning. Understand the bias-variance trade-off, regularisation (ridge, lasso, elastic net), tree ensembles, kernel methods and neural networks conceptually, and the role of hyperparameters in controlling model complexity.

Validation discipline

Split data into training, validation and test sets; for time series use walk-forward or purged and embargoed cross-validation. Fit scalers, imputers and feature selectors inside each fold to prevent leakage, and standardise using training data only. Select metrics that match the decision: precision, recall and AUC for imbalanced classification; MSE or MAE for regression; and economic metrics such as net Sharpe after costs for investment problems.

Traps

  • Random k-fold cross-validation on time series leaks future information into training.
  • Scaling or imputing before the split leaks test-set statistics.
  • Features built from the target, or from subsequently revised data, are look-ahead leakage.
  • Accuracy looks excellent on a 1% event rate by always predicting "no event".
  • Adding features improves in-sample fit while degrading out-of-sample error.

Worked example

A classifier flags crises on 1% of days. A model that always predicts "no crisis" is 99% accurate but has zero recall. Report precision and recall, and set the decision threshold on validation data from the relative cost of false positives versus false negatives rather than defaulting to 0.5.