Shannon's demonic spell applied to digital currency

Author: Goodness, Created: 2019-06-28 10:22:21, Updated: 2023-10-30 20:29:25

img

Is there a free lunch on the cryptocurrency market?

In-depth study of a quantitative trading strategy

Hello! This is an article focused on testing digital currency trading strategies. As our community and platform develop, we plan to create more articles like this one. Please leave your feedback and remember to try our inventor quantification platform and join our community!

See also:

Claude Shannon, often referred to as the father of the digital age, is known primarily for his major contributions to information theory. However, he also made important contributions to the fields of cryptography and finance. Since digital currencies are the intersection of these three fields, if he were still alive, I think he would find this to be another of his new interests.

Shannon's famous financial experiment, known as Shannon's Demon; its findings can be applied to investment strategies for digital currencies.

Fortunately, there is now a platform dedicated to testing trading strategies for digital currency asset algorithms.

The Demon of Shannon

Shannon's demon is an experiment designed by Claude Shannon that demonstrates that it is possible to make a profit on an investment asset even if there is no positive expected return.

The investment asset in the experiment is a hypothetical stock with a random walk-through behaviour. It has a 50% chance of doubling its price and a 50% chance of halving it every day. The investment plan is simple: invest 50% of the asset and keep the remaining 50% cash, rebalancing the process daily.

William Poundstone provides an example of this investment plan that yields a return in his book The Formula of Wealth:

Let's imagine that you start with $1,000, invest $500 in stocks and then hold $500 in cash. Suppose the stock price halves on the first day. This gives you a $750 portfolio: $250 worth of stocks, $500 in cash.

In short:

If you're going to invest $200, Shannon's secret is, you buy 100 stocks, and you have 100 stocks that are vacant, and then all you have to do is keep the market value and the total amount of cash equal, so for example, you have 200 stocks plus 100 cash, 300 total assets, you sell 50 stocks, and you have 150 stocks, 150 stocks, and when the stock drops by one, the market value is only 75 stocks, but you have 225 stocks.

In this way, Shannon's demon can capitalize on fluctuations in asset prices (i.e., volatile yields) rather than through asset appreciation. A rebalanced portfolio is also more stable than a plan to buy the same asset and hold it. These findings provide insight into the benefits of diversification and portfolio rebalancing.

However, due to the limitations of the financial markets at the time, Shannon never put this strategy into practice. In fact, the transaction costs required to rebalance the portfolio would have a significant negative impact on its performance. However, the main limitation was that the strategy required extremely volatile investment benchmarks to make a substantial profit (remember, the stock in the experiment rose or fell by 100% daily).

However, the financial markets have changed significantly since then, so it is worth testing the strategy again.

Is digital currency a suitable asset for Shannon's demon?

At first glance, it seems that digital currencies are an excellent candidate for this investment scheme: they are known to be highly volatile, extremely difficult to value, and their prices seem to be driven mainly by speculative trading.

Algorithmic regression testing and results

I did my first test of Shannon's Demon on the most popular currency: Bitcoin (BTC). However, instead of rebalancing my portfolio every day (as I did in the original experiment), I programmed the algorithm to wait for the asset price to rebalance to two or half times its previous price. I used data from the Polonix exchange. The test took place from February 21, 2015 to August 7, 2017, for a total of 899 days.

In this test, the trading algorithm rebalanced the portfolio three times after the initial portfolio was built; this means a rebalancing rate of 1.21 times per year; this is not enough speed to reap attractive profits from the volatility.

In addition, the price of Bitcoin has soared by 1,266% during this period, and the overall trend is upwards. Therefore, it does not seem to follow a randomly-floating bullish pattern. Unsurprisingly, the trading algorithm is 901% behind the buy-hold strategy.

The following graph provides a timeline of the algorithm's performance:

img

* The green triangle in the first figure indicates that the algorithm rebalances the portfolio by buying bitcoins, while the red indicates the opposite.

Now, the fact that Shannon's Demon didn't go beyond the buy-and-hold strategy during this period doesn't mean we should abandon it, at least not yet. In fact, the reason Bitcoin is the most popular currency has a lot to do with its appreciation, so they are what Soros refers to as a "mutually reinforcing" relationship. In addition, early volatility of assets is usually high.

For this reason, I decided to do a second test of a newer and less well-known currency: Augur (REP).

I ran the test again using historical prices for all dates: from 4 October 2016 to 7 August 2017 ((a total of 308 days) ‒ during which time the trading algorithm rebalanced the portfolio 5 times after the portfolio was built. This means a rebalancing rate of 5.93 times per year. This should be enough to generate sufficient volatility returns.

In terms of returns, Shannon's demon still lags behind the buy-and-hold strategy; it produces a cumulative return of 103% versus the 126% return of the buy-and-hold strategy. However, the individual return is not the most important indicator of portfolio performance. The strategy is much less risky than the buy-and-hold strategy. In the worst case scenario, the buy-and-hold portfolio loses 68% of its initial value.

In terms of risk-adjusted returns, I compared the Sharpe ratio (SR) of the two strategies. This indicator tells us the premium of returns generated per risk unit (higher than risk-free Treasuries). The annual SR of purchasing and holding the strategy is 1.15, while Shannon's demon is 1.21. This means that the latter generates an additional gain of 6 basis points per unit of volatility (i.e. standard deviation).

img

Investor recommendations based on survey results

Based on these preliminary findings, we can draw two conclusions about Shannon's demon: for assets with strong upward price trends, it will yield less returns than the buy-and-hold strategy; and, second, it significantly reduces portfolio risk.

If I were to invest a lot of money in digital currencies today, I would definitely choose Shannon's demon investment plan over buying holdings.

However, there are many other trading algorithms worth testing. With the inventor quantification platform, you have the opportunity to be one of the first investors to write your own trading algorithms and retrospectively test their performance. Data-driven investments can give you an edge in the market.

The information in this article is for reference only. It does not recommend buying or selling any securities or implementing any investment strategy.


Related

More

smalloneI've been analyzing for half a day, and I haven't said anything about the idea. If it has a 50% chance of doubling its price, a 50% chance of halving it every day, say, if the initial asset is 1, the total investment, a day later, the asset is either 2, or 0.5, take the average, that's 1.25. The correct assumption should be that there is a 50% chance of doubling the price, and a 50% chance of going to zero every day, in which case, ((2 + 0 / 2), the expected net is 1, which is worth discussing.

GoodnessI don't think this strategy works well in a trending market.

wxmsummerThe Devil's Claw of Shannon - the essence of a dynamic balancing strategy