How it works › Technical Background

How do Barudion's model portfolios know when to, for example, sell the stock index ETF and buy the gold ETF? Does Barudion employ a team of market analysts who know market insights before others do? No, we don't. At Barudion, we believe that large pension funds and hedge funds will always have better analysts who have access to better information than we could ever get our hands onto. However, since those large, well-informed market participants buy and sell according to the information that they obtain, they leave a trace in the price fluctuations of stocks, gold, and bonds. We have designed an algorithm based on Bayesian statistics that picks up these systematic shifts hidden behind the random fluctuations to decide when to rotate capital from one market to the others. It is important to note that we do not directly try to predict future prices, we simply try to quantify the current market conditions as accurately as possible.

How to compare asset performance

To know whether to shift capital from, for example, stocks to gold, we need to know whether gold is currently expected to outperform stocks, that means whether we expect the gold price to climb faster than the price of a stock index. To quantify the performance of two financial assets in relation to each other, we use a Capital Asset Pricing Model (CAPM), in our case also called Single Index Model (SIM). This mathematical model essentially describes the relationship of the price fluctuations (minus the risk free rate) by a straight line. Below, you see a hypothetical plot that describes the concept of the CAPM model:

Illustration of the CAPM model using simulated data.

Each point corresponds to the price change of a stock index (on the x axis) and the corresponding price change (within the same time period) of gold. Each point thus represents one example of "if the stock index does this, then the gold price does that." There are 52 points in total, so these simulated price changes could be weekly annualized returns going back the last year. You can see that the points are fairly randomly dispersed (in reality they are even more dispersed), but still adhere to a pattern, they seem to cluster around a negatively sloped line that is shifted upwards (shown in red). The CAPM model now interprets the two parameters of the best-fit line through our data points:

  • Beta: the slope of the line is called the Beta parameter. The sign of Beta tells us whether gold tends to move in the same direction as the stock market (positive sign), or whether it tends to move in the opposite direction (negative sign). In our hypothetical example, gold tends to move against the stock market, so it represents a hedge against market crashes. This has been true during real market crashes in the past, but it is not always true. The magnitude (or absolute value) of the Beta parameter tells us what fraction of the stock market price fluctuations are mirrored in the gold price fluctuations. A magnitude smaller than one indicates that the gold fluctuations tend to be smaller than those of the stock market, while a magnitude greater than one indicates that the gold price fluctuates stronger than the stock prices.
  • Alpha: The intercept of the fitted red line indicates the Alpha parameter. Alpha tells us what return we can expect from gold in a period in which stocks achieve zero return - at least to the extent that the CAPM model accurately describes the world. Alpha thus represents a metric that tells us whether gold is expected to outperform stocks (positive Alpha) or whether it it is expected to underperform stocks (negative Alpha). If we can get a reliable estimate of Alpha, we know whether it is a good idea to reallocate capital from stocks to gold, and we can do the same analysis for other assets, to optimize our portfolio!

The problem with obtaining a reliable estimate of the Alpha parameter is that financial price data is inherently noisy, the random fluctuations are always larger than the signal/pattern that is hidden in them. Note that the hypothetical plot shown above only understates the magnitude of this random noise to allow for a better illustration. Furthermore, financial markets change over time, sometimes gradually, and sometimes abruptly due to policy changes or unforeseen events. How do we know how many data points we should include in our estimation of Alpha? Always the last year? Or going back to the last meeting of the Federal Reserve Bank? Ideally, we want an algorithm that uses as many data points as possible, as long as our series of past prices does not show a systematic regime switch. This would allow us to get Alpha estimates that are as accurate as possible, but also react fast to systematic changes in market conditions. As we will see in the next section, Barudion's custom-made Bayesian algorithm achieves just that.

How to embrace uncertainty

Many statistical models take measured data (in our case price series) as input, and reduce these data points to one single value per parameter of the model (in our case Alpha and Beta). However, this reduction often results in an underestimation of uncertainty. The value of the Alpha parameter that we are so interested in will never be completely certain; but if it is uncertain today, shouldn't this uncertainty also carry on to tomorrow's update of our estimate? Barudion's algorithm for estimating Alpha takes an alternative approach that is well-known in a sub-field of statistics called Bayesian statistics: rather than immediately reducing the estimated parameter to a single value, we want to keep track of the likelihood of all possible values of Alpha. Our algorithm always keeps track of the complete probability distribution of Alpha (and Beta).

When we get a new data point, i.e. a new set of prices, we want to see how that new information changes the current probability distribution of our parameters. If the new price changes stand in contrast to past market dynamics, the probability distribution will become wider as uncertainty grows and more diverse Alpha values become probable. Whereas if the new price changes confirm the current market dynamics, the probability distribution becomes more narrow, as we can be more certain of our current estimate and far off Alpha estimates become less probable. This way, Bayesian statistics does not view uncertainty as a problem, it rather keeps track of all uncertainty that it encounters, and looks for changes in parameters that are truly systematic, that overcome all the uncertainty. Below, you can see an example of our algorithm working. You see a two-dimensional probability distribution (Alpha along one side, Beta along the other), and the height illustrates the likelihood of different Alpha- and Beta-values. Over time, the peak of the distribution wanders, but also abruptly jumps, becomes broader and contracts again, as we lose and gain confidence in how different markets currently behave in relation to another.

Barudion's algorithm was originally developed by our co-founder Christoph Mark as part of his PhD in biophysics. The algorithm has been published in the scientific journal Nature Communications, and has been applied to better understand the movements of metastatic cancer cells, price fluctuations in financial markets, the effects of policy changes, and for comparing different climate models. As Barudion is committed to the Open Source community and to provide full transparency to our customers, the code behind our algorithm can be freely accessed on the Github platform for independent review. With the implementation of our algorithm in the context of long-term ETF model portfolios, Barudion aims to provide an easy way for retail investors to benefit from state-of-the-art market analytics while retaining full control over their investments.