Machine learning models applied to financial portfolio analysis

How well do you know ML for portfolios?

Knowledge assessment

Eight questions across core concepts

In mean-variance optimisation, what does the covariance matrix primarily capture?

The covariance matrix records pairwise relationships between asset returns. A high positive covariance means two assets tend to rise and fall together, which reduces diversification benefit. ML methods like shrinkage estimators or factor models help produce more stable covariance estimates from noisy historical data.

Which regularisation technique is most commonly applied to prevent overfitting when training a return-prediction model on financial time series?

L2 regularisation penalises large coefficient values, which is especially useful when financial features are noisy or correlated. It shrinks weights toward zero without eliminating them entirely, reducing variance without introducing too much bias - a common trade-off in return-prediction tasks.

Reinforcement learning applied to portfolio rebalancing treats the problem as which type of decision process?

In an MDP framing, the state is the current portfolio and market conditions, the action is the rebalancing decision, and the reward is typically a risk-adjusted return metric. The agent learns a policy by interacting with a market simulator rather than from pre-labelled data.

Walk-forward validation is preferred over standard k-fold cross-validation for financial models primarily because it:

Standard k-fold randomly shuffles data, which means the model can train on future observations and test on past ones - a form of look-ahead bias. Walk-forward validation always trains on earlier periods and tests on later ones, mimicking how a model would actually be deployed.

Hierarchical Risk Parity (HRP) differs from classical mean-variance optimisation mainly in that it:

HRP applies hierarchical clustering to group correlated assets, then distributes risk contributions across those groups. Because it avoids matrix inversion, it is numerically more stable than Markowitz optimisation when the covariance matrix is ill-conditioned or estimated from limited data.

When using an LSTM network to model asset returns, which of the following is a genuine limitation specific to this architecture?

LSTMs are powerful for sequential data but require significant compute for training and are notoriously hard to interpret - a real concern in regulated financial contexts where model explainability matters. They also need careful hyperparameter tuning and are prone to overfitting on small financial datasets.

Conditional Value at Risk (CVaR) is preferred over Value at Risk (VaR) as a loss function in ML-based portfolio models because:

VaR only tells you that losses will exceed a threshold with a given probability - it says nothing about how severe those losses might be. CVaR averages the losses in the worst tail scenarios, making it a more informative and coherent risk measure for optimisation objectives.

Transaction cost modelling is important in ML portfolio optimisation because ignoring it tends to:

Models that ignore transaction costs tend to rebalance aggressively whenever a small signal appears. In live trading, bid-ask spreads, market impact, and brokerage fees erode returns quickly. Including a realistic cost model in the objective function encourages the model to trade only when the expected gain justifies the friction.

Select an answer for each question, then check your results below.

Concepts tested in this assessment

Each question targets a specific skill area that practitioners encounter when building ML-driven portfolio systems. The explanations are starting points - the real depth comes from working through each concept in code and data.

If several answers surprised you, that is useful information. It points to the areas where focused study will have the most practical impact.

  • Covariance estimation

    Stable covariance matrices are the foundation of most portfolio models. Shrinkage and factor-based methods address the instability of sample estimates.

  • Risk-adjusted objectives

    Choosing between VaR, CVaR, or Sharpe-based objectives shapes what the model actually optimises for - and what it ignores.

  • Temporal validation

    Walk-forward testing is not optional for time-series models. Any validation method that shuffles data introduces bias that inflates apparent performance.

  • Transaction cost modelling

    Ignoring friction is one of the most common gaps between backtested and live results. Cost-aware objectives produce more realistic allocation behaviour.