Table of Contents
Fetching ...

A Fully Analog Pipeline for Portfolio Optimization

James S. Cummins, Natalia G. Berloff

TL;DR

An energy-efficient, fast, and fully analog pipeline for solving portfolio optimization problems that overcomes energy-intensive limitations and fundamental principles of physics to recover accurate optimal portfolios in a two-step process is presented.

Abstract

Portfolio optimization is a ubiquitous problem in financial mathematics that relies on accurate estimates of covariance matrices for asset returns. However, estimates of pairwise covariance could be better and calculating time-sensitive optimal portfolios is energy-intensive for digital computers. We present an energy-efficient, fast, and fully analog pipeline for solving portfolio optimization problems that overcomes these limitations. The analog paradigm leverages the fundamental principles of physics to recover accurate optimal portfolios in a two-step process. Firstly, we utilize equilibrium propagation, an analog alternative to backpropagation, to train linear autoencoder neural networks to calculate low-rank covariance matrices. Then, analog continuous Hopfield networks output the minimum variance portfolio for a given desired expected return. The entire efficient frontier may then be recovered, and an optimal portfolio selected based on risk appetite.

A Fully Analog Pipeline for Portfolio Optimization

TL;DR

An energy-efficient, fast, and fully analog pipeline for solving portfolio optimization problems that overcomes energy-intensive limitations and fundamental principles of physics to recover accurate optimal portfolios in a two-step process is presented.

Abstract

Portfolio optimization is a ubiquitous problem in financial mathematics that relies on accurate estimates of covariance matrices for asset returns. However, estimates of pairwise covariance could be better and calculating time-sensitive optimal portfolios is energy-intensive for digital computers. We present an energy-efficient, fast, and fully analog pipeline for solving portfolio optimization problems that overcomes these limitations. The analog paradigm leverages the fundamental principles of physics to recover accurate optimal portfolios in a two-step process. Firstly, we utilize equilibrium propagation, an analog alternative to backpropagation, to train linear autoencoder neural networks to calculate low-rank covariance matrices. Then, analog continuous Hopfield networks output the minimum variance portfolio for a given desired expected return. The entire efficient frontier may then be recovered, and an optimal portfolio selected based on risk appetite.

Paper Structure

This paper contains 8 sections, 19 equations, 4 figures.

Figures (4)

  • Figure 1: (a) The hyperbola in variance-return space for a portfolio of $n = 2$ assets $A$ and $B$. The positively sloped portion of this hyperbola is the efficient frontier. The expected returns are $\mu_{A} = 0.1$ and $\mu_{B} = 0.6$. The (co)variances are $\sigma_{AA} = 0.2$, $\sigma_{BB} = 0.4$, and $\sigma_{AB} = \sigma_{BA} = -0.1$. The blue circle represents the portfolio consisting only of asset $A$, and the corresponding investment weights are $\mathbf{w} = [1, 0]^{\rm T}$. Likewise, the red circle is the portfolio consisting only of asset $B$. The minimum variance portfolio, shown as a green circle, is the combination of weights $\mathbf{w}$ that minimizes the total variance $\mathbf{w}^{\rm T} \mathbf{\Sigma} \mathbf{w}$. The purple circle is the portfolio that maximizes the Sharpe ratio $S_{r}$. The Sharpe ratio is a measure of risk-adjusted return and is defined as $S_{r} = \boldsymbol{\mu}^{\rm T} \mathbf{w} / \sqrt{\mathbf{w}^{T} \mathbf{\Sigma} \mathbf{w}}$. (b) The Sharpe ratio $S_{r}$ for each portfolio in the efficient frontier. We now see that the purple circle is indeed the portfolio that maximizes the Sharpe ratio.
  • Figure 2: (a) Hopfield network dynamics for a portfolio of $n = 25$ assets with $R = \lambda_{1} = \lambda_{2} = 1$. The dynamical system evolves according to Eq. (\ref{['Hopfield']}), which in turn minimizes Eq. (\ref{['Equivalent']}). Each line represents one asset weight $w_{i}$. (b) The value of expression (\ref{['Equivalent']}) during the network dynamics. Covariance matrix $\mathbf{\Sigma}$ and expected return vector $\boldsymbol{\mu}$ are calculated from sampling $N = 10$ observations of returns $\mathbf{x}$ from IID random normal variables $x_{j} \sim N(1, 1)$, where $j = 1, 2, \ldots, N$. The low number of observations $N$ results in a noisy positive semidefinite covariance matrix $\mathbf{\Sigma}$ whose pairwise entries $\sigma_{ij}$ are nonzero. The externally controlled annealed parameter has form $p(t) = p_{0} ( 1 - t / T )$, where $T$ is the total annealing period. Here, $p_{0} = 0.01$ and $T = 100$.
  • Figure 3: Training a linear autoencoder via (a)-(c) backpropagation (BP), and (d)-(f) with equilibrium propagation (EP). Input and output layers have size $50$, while the single hidden layer has size $5$. The networks are trained on $50$ vectors $\mathbf{x}_{1}, \ldots, \mathbf{x}_{50}$ of size $50$ whose elements are randomly sampled from the normal distribution $N (0, 1)$. (a)-(f) illustrate the element-wise absolute difference between the $50 \times 50$ matrix $\mathbf{X} = [\mathbf{x}_{1}, \ldots, \mathbf{x}_{50}]$ and its reconstructed output $\mathbf{ABX}$ at different epochs. (g) An illustrative example of the encoder/decoder Hopfield network structure trained with EP. (h) The overall network loss for BP and EP over epoch time. The black horizontal dashed line corresponds to the loss of the equivalent SVD/PCA method described in Section \ref{['Low-Rank Approximation']}.
  • Figure 4: (a) The sample covariance matrix $\mathbf{S}$ for $n = 100$ financial stocks selected from the S&P 500 index. $\mathbf{S}$ is calculated from Eq. (\ref{['Sample Covariance']}), with $N = 50$ time series samples. (b) The $r = 10$ low-rank approximation $\mathbf{APA}^{\rm T}$ of the covariance matrix, as calculated by training a continuous Hopfield network via equilibrium propagation. (c) The element-wise absolute difference between the sample covariance matrix and its low-rank approximation. (d) The hyperbola in variance-return space for possible portfolios. Each point along the hyperbola is calculated by solving (\ref{['Portfolio Optimization']}) for a specific return value $R$ using Eq. (\ref{['Hopfield']}).