Data 622 Discussion Week 11 - Unsupervised Learning with Minimum Spanning Trees in Finance

Alexander Ng

04/13/2021

Introduction

One unsupervised learning method used in machine learning is minimum spanning trees (MST). In the financial industries, practitioners have attempted to apply these methods in various applications. This discussion will describe briefly how MSTs are constructed in finance, show a sample MST for an investment related application and assess the industry readiness to apply this method more broadly.

The opinions on this discussion are my own and distinct from those of cited sources.

The Setup

The seminal paper in finance for the use of MST was published in 1999 by Rosario Mantegna. An early draft can be found here. The paper was cited over 1550 times according to a review of this subject by Marti, Nielson, et. al. 2020.

The algorithm to build an MST from time series of financial returns works as follows. My exposition follows Marti, et. al. , 2020. Each of \(N\) time series of the prices of assets \(P_i(t), \text{ where } 1 \leq i \leq N\) is converted to log returns:

\[ r_i(t)= log P_i(t) - log P_i(t-1)\]

Next, form the \(\binom{N}{2}\) pairwise correlations between log returns series. Call them: \(\rho(i,j)\)

Define a distance metric \(d(i,j)\) to be inversely proportional to the correlation between time series \(s\) and \(t\).

\[d(i,j) = \sqrt{ 2(1-\rho(i,j))}\]

Now we have a list \(V\) of vertices \[V = \{ r_i(t) \vert 1 \leq i \leq N \}\] and a set \(E\) of weighted edges \[E=\{ d(i,j) | 1 \leq i, j \leq N, i \neq j \}\].

Kruskal’s minimum spanning tree algorithm is very famous and involves starting with adding all the vertices, then putting in initially the lowest weight edge. At each step, as long as the graph is now already connected, we add one more weighted edge of the next lowest weight. In the event of ties in weight, we choose any edge that does not add a cycle to the subgraph.

This algorithm is guaranteed to produce a minimum spanning tree. One video is here.

A Sample Application of MST

JPMorgan Chase has a large research team devoted to Machine Learning methods. In 2017, they published a massive report on the use of AI methods in Finance called “Big Data and AI Strategies”. A screenshot from that report below shows the MST for risk premia.

MST of Risk Premia

A copy of their research report can be found here
I highly recommend reading it because it is a landmark publication in the industry.

The risk premia indices are constructed using proprietary methods by JPMorgan using publically available financial time series. They are intended to represent the long run rates of returns of investing in financial strategies which target specific sources of investment risk.

Challenges of Using MST

In their review paper on clustering methods, Marti, et. al., 2020 argue that MST is not part of the “standard toolbox of the practitioner” because:

  1. A lack of reproducibility for some of the studies
  2. Difficulty to compare methods and studies
  3. No widely accepted benchmarks or tasks
  4. Lack of data sharing and confidentiality of sources

I have a different objection. The MST may not produce useful insights above and beyond that information available in simpler existing tools. In the case of the JPMorgan risk premia MST, the linkages between the observed variables make sense and are well understand. For example: volatilities are known to be correlated across asset classes. Also, some premia represent variables linked by standard economic or financial theories. Currency carry trade risk premia, equity momentum, equity mean reversion are all investment ideas that have been explained by deep financial theories.

Of course, if a killer application of MST exists in the financial industry, it may well be kept secret until its economic advantage dissipates. But for now, I am not quite sold on the idea.