Case studies

Recent examples of how applied machine learning can inform, guide and improve portfolio management

1 Stock and option pricing using Monte Carlo simulation

Objectives

To forecast an option price – a regular non-linear problem.

Approach

Using the Black-Scholes option pricing formula, using historic market data as the model inputs.  These input series were the stock price, the strike price, time to expiration, volatility, interest rate and dividend yield. 

Machine learning algorithms help to deal with the limiting assumptions in traditional derivative pricing models, particularly Geometric Brownian Motion and constraints like a compulsory conditional payment at maturity and no arbitrage.

Method

A range of candidate machine learning models were tested by performance, including k-nearest neighbours, decision tree regressors, support vector machines, adaboost regressors, gradient boosting regressors, random forest regressors, extra trees regressors and artificial neural networks.  Linear regression was also tested, but was eliminated early with its failure to accommodate the non-linearities in the model formulation.  The ANN performed best.

Results

The ANN successfully reproduced the Black-Scholes option price formula with a very high degree of accuracy, while bypassing some of the limiting assumptions of traditional pricing models.

2 Portfolio optimisation using nested clusters

Objectives

To calculate the portfolio component weights that maximise returns while minimising volatility or risk.

Approach

Nested clusters optimisation organises assets hierarchically into clusters to increase portfolio stability and variance in high-dimensional datasets.  The ‘Markovitz curse’ of extreme or unstable portfolio allocations from Mean-Variance Optimisation that under-perform is avoided by dividing the large, unstable covariance matrix required by traditional techniques into smaller, more manageable clusters.  NCO calculates more stable, portfolio weights with less noise with a ‘divide-and-conquer’ approach.  First, it splits the portfolio components into clusters.  It then computes the inner-cluster weights.  And finally it calculates the inter-cluster weights.

Method

Hierarchical tree clustering was used to group the assets into smaller clusters.  This isolated highly correlated assets, reducing high-dimensional noise.  For each cluster, the intra-cluster weights were calculated to maximise the cluster Sharpe ratio.  The inter-cluster weights were calculated to minimise the overall conditional value at risk (or expected shortfall).  The final portfolio weights are the dot-product of the intra-cluster and inter-cluster weights.

Results

The nested cluster portfolios significantly out-performed MVO portfolio and equal-weighted portfolios on test data samples.

3 Portfolio optimisation using hierarchical risk parity

Objectives

This is portfolio optimisation with the explicit aim of finding clusters of similar assets and reducing the need for potentially unstable covariance matrix inversion. Like nested clusters, this approach bypasses the problems of Markovitz’s curse.  The hierarchical clustering ensures that capital is diversified across risk factors rather than concentrating on specific asset variance.  In theory, this should produce superior out-of-sample performance.

Approach

Hierarchical risk parity uses a tree-like structure (a dendrogram) to group similar assets based on their correlations.  This ensures that they only compete for capital allocation within their own clusters rather than against every other asset in the portfolio.  This creates a ‘natural hierarchy’ among the assets.  So, the energy stocks should be grouped together in a cluster, the tech and banking stocks in other clusters.  Capital is allocated top-down through the dendrogram.  The algorithm divides clusters into two and assigns weights inversely proportional to the variance of each cluster, and repeats the process until each asset has been allocated its particular weight.

Method

With the natural hierarchy established, the covariance matrix is reordered, with the largest values (the most closely correlated assets) concentrated along the matrix diagonal. This reveals the clear blocks of related assets.

Capital is then allocated top-down through the dendrogram.  The algorithm divides clusters into two and assigns weights inversely proportional to the variance of each cluster.  This process is repeated until each asset has been allocated its particular weight.

Results

This tends to work.  Compared to more traditional methods, like mean-variance optimisation, hierarchical risk parity does produce more diversified portfolio for each level of risk.  It also tends to deliver higher out of sample Sharpe ratios.

4 Yield curve level, slope and curvature simulation and prediction using neural networks

Objectives

Short- and long-term yield curve forecasting using artificial neural networks as the basis for predicting economic growth, inflation and investment strategy.

Approach

Comparison of traditional econometric techniques with ANNs (long-short term models) to replicate the movement of the yield curve, using determining factors like previous curve values for different tenors, national debt held by the public, foreign governments and the state, and spreads on corporate debt.

Method

The determining factors were lagged appropriately and fed to the linear regression and ANN models.  Some test models (regularised regression, k-nearest neighbours and classification and regression trees) were added for completeness.

Results

The linear regression and ANN models performed best.  In terms of prediction, the linear regression model worked best for one-year bonds while the ANN worked best for five-year and ten-year bonds, reflecting its superior ability to adapt to changing market conditions.

5 Portfolio optimisation using genetic or evolutionary selection

Objectives

To identify the optimal portfolio by Sharpe ratio.  This approach is particularly useful for data that is non-linear and non-convex with non-differentiable objective functions.  It also avoids the problem of getting stuck in local optima.

Approach

Genetic algorithms mimic the process of natural selection.  They start with a large number of randomly selected populations of portfolios and iteratively whittles them down by keeping only the best performers, ‘breeding’ them and introducing ‘genetic’ diversity through mutation.

The genetic algorithm looks for the optimal combination of portfolio weights that maximise the Sharpe ratio.

Method

Ten million candidate portfolios were created for each stock exchange.  Sharpe ratios for each candidate were used to assess their fitness, with the elite candidates put forward for the parenting phase.  New ‘offspring’ were created, taking the best characteristics from the parent candidates.  With weights normalised, the process is repeated until a single winner is produced.

Results

The process successfully produced clear winners, although the process was computationally expensive, and problems arose when multiple objectives were specified.  Nonetheless, genetic algorithms offer a viable alternative deep learning approaches to portfolio optimisation.

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

You can find more detail at our Privacy Policy