Cryptoassets and Investments: Online Portfolio Selection

AlexTavgen
9 min readFeb 10, 2018

--

Portfolio selection, aiming to optimize the allocation of wealth across a set of assets, is a fundamental research problem in computational finance and a practical engineering task in financial engineering.

There are two major schools for investigating this problem, that is, the

Mean Variance Theory [Markowitz 1952; Markowitz 1959; Markowitz et al. 2000] mainly from the finance community

Capital Growth Theory [Kelly 1956; Hakansson and Ziemba 1995] primarily originated from information theory.

The Mean Variance Theory, widely known in asset management industry, focuses on a single-period (batch) portfolio selection to trade off a portfolio’s expected return (mean) and risk (variance), which typically determines the optimal portfolios subject to the investor’s risk-return profile.

On the other hand, Capital Growth Theory focuses on multiple-period or sequential portfolio selection, aiming to maximize the portfolio’s expected growth rate, or expected log return. While both theories solve the task of portfolio selection, the latter is fitted to the “online” scenario, which naturally consists of multiple periods.

But let’s take a closer look at it.

Building and running a Markowitz portfolio optimization model is an essential part of the portfolio construction process for most traditional assets managers (i.e. other central banks, pension funds, sovereign wealth funds, etc.) also.

It is impossible for the human being to choose best return vs lower risk from 50 000 different crypto assets at the market, while using a program based on that algorithms it can be feasible for everyone.

But as I said Markowitz theory is suitable for a single period portfolio selection. Investor chooses once and surveys how the portfolio acts.

Online portfolio selection is a fundamental problem in computational finance, which has been extensively studied across several research communities, including finance, statistics, artificial intelligence, machine learning, and data mining, etc.

Actually this problem is quite related to game theory and optimisational problems. Game theory is the study of human conflict and cooperation within a competitive situation. In some respects, game theory is the science of strategy, or at least the optimal decision-making of independent and competing actors in a strategic setting. The key pioneers of game theory were mathematicians John von Neumann and John Nash, as well as economist Oskar Morgenstern.

At financial markets, or cryptomarkets and assets, investor must make decisions under condition of uncertanty.

Game theorists called it — Games with Nature.

Move by Nature is an interesting concept which means a decision or move in an extensive form game made by a player who has no strategic interests in the outcome. The effect is to add a player, ‘Nature’, whose practical role is to act as a random number generator. For instance, if a game of Poker requires a dealer to choose which cards a player is dealt, the dealer plays the role of the Nature player.

We may argue, every investor on the financial market has his own strategic interests. But at financial markets we assume a lot of different actors, everybody with their own agenda and strategy form some kind of stochastic process with constantly changing parameters.

Because of those processes we can say nobody can predict market. Actually there is an interesting bias related to our psychology.

Now, look at the pattern in the charts in Figure A, which shows the stock prices of three major manufacturers over a 10-month interval ending in October 2005. Consider the charts and decide on an answer before reading the next paragraph: based on the given pattern, which one of the three stocks do you expect to increase in value over the subsequent year?

Figure A

Did you pick the third chart? It looks as if it is headed up at the end. Well, you’re wrong. In fact, if you picked the first or second chart, you’re also, equally, wrong. Not one of the stocks is upward bound, and none is trending down. Actually, the charts don’t even represent stock prices. They were randomly generated: data gibberish, one might say. But the implanted belief that they belong to a specific company (in this case, in the manufacturing sector) can generate all kinds of speculation. Even with real charts, unless you had specific knowledge about a company or industry, it would be difficult to predict the future direction of a stock based on 10 months of past performance.

The tendency to create a story out of noise is sometimes dubbed the narrative fallacy. Even if you were suspicious of the question — or read ahead too quickly — when we asked top MBA students — some of them applying for jobs in finance — the same question, they expressed a good deal of certainty about the direction in which such “stocks” were headed. Some said up, some said down. When the charts were supplemented with “news clips” randomly generated and placed in random order along the length of the chart, students claimed a still greater certainty about their predictions — showing, perhaps, the power of telling oneself a good story about data (Krumme [to appear]). (Consider, also, the loose causal quips thrown around by financial journalists: “the Dow dropped 100 points on fear of rising unemployment.”)

If human beings are adept at spotting patterns, we’re masters at making up stories about statistics. This is less problematic when we know where data comes from and what it means; it can be disastrous when we’re faced with a lot of evidence from different sources and high-stakes outcomes. Beautiful Data

So how can we make right decisions under uncertainty conditions with our narrative fallacy and confirmation bias?

Why we chose cryptoassets for this research?

Two natures of cryptocurrencies differentiate them from traditional financial assets, making their market the best test-ground for algorithmic portfolio management experiments. These natures are decentralization and openness and the former implies the latter. Without a central regulating party, anyone can participate in cryptocurrency trading with low entrance requirements. One direct consequence is abundance of small-volume currencies. Affecting the prices of these penny-markets will require smaller amount of investment, compared to traditional markets. This will eventually allow trading machines to learn and take advantage of the impacts by their own market actions. Openness also means the markets are more accessible. Most cryptocurrency exchanges have application programming interface for obtaining market data and carrying out trading actions, and most exchanges are open 24/7 without restricting frequency of tradings. These non-stop markets are ideal for machines to learn in the real world in shorter time-frames.

We can compare how different approaches act on different markets conditions.

The following two hypothesis are imposed:

  1. Zero slippage: The liquidity of all market assets is high enough that each trade can be carried out immediately at the last price when order is placed.
  2. Zero market impact: The capital invested by the software trading agent is so insignificant that is has no influence on the market.

In the real-world trading environment, if the trading volume at the market is high enough, these two assumptions are near to reality.

One reason for selecting top-volumed cryptocurrencies (simply called coins below) is that bigger volume implies better market liquidity of an asset. In turn it means the market condition is closer to Hypothesis 1. Higher volumes also suggest that the investment can have less influence on the market, establishing an environment closer to the Hypothesis 2.

In the experiments, the 11 most-volumed non-cash assets are preselected for the portfolio.

And BTC serves as a cash, or all top volumed currencies are computed as a BTC pairs.

Used approaches:

CRP — Constant rebalanced portfolio = use fixed weights all the time. Uniform weights are commonly used as a benchmark. As you selected in the beggining Markowitz portfolio and not rebalanced it. http://www-isl.stanford.edu/~cover/papers/paper93.pdf

M0 — Another benchmark portfolio, with constant weight.

BEST — Best Stock Strategy, where in every rebalancing period, best performance stock is chosen.

PAMR — Passive aggressive mean reversion strategy for portfolio selection. Reference:B. Li, P. Zhao, S. C.H. Hoi, and V. Gopalkrishnan. Pamr: Passive aggressive mean reversion strategy for portfolio selection, 2012.http://www.cais.ntu.edu.sg/~chhoi/paper_pdf/PAMR_ML_final.pdf

OLMAR — On-Line Portfolio Selection with Moving Average Reversion Shortly, this approach finds best momentum(MAR) strategies among all possibilities by applying powerful online learning techniques. 2012 academic publication https://icml.cc/2012/papers/168.pdf.

WMAMR — Weighted Moving Average Passive Aggressive Algorithm for Online Portfolio Selection. It is just a combination of OLMAR and PAMR, where we use mean of past returns to predict next day’s return. Reference: Li Gao, Weiguo Zhang Weighted Moving Averag Passive Aggressive Algorithm for Online Portfolio Selection, 2013. http://ieeexplore.ieee.org/xpl/login.jsp?tp=&arnumber=6643896

ANTICOR — Anticorrelation Description “Anticorrelation” (Anticor) (Borodin et al. 2004) transfers the wealth from the outperforming stocks to the underperforming stocks via their cross-correlation and autocorrelation.

NB! All data is gathered with 30 min granularity as a pairs to BTC (ETH/BTC, LTC/BTC, USDT/BTC) . All rebalancing decicions are made every 30 minutes and transactions costs are set to zero which is considered as ideal conditions. But if we can prove by math, some portfolio outperforms market in ideal conditions, then it is possible to find optimal rebalancing periods until transactions fee are lower than cummulative returns. Cummulative return means return from one BTC invested in ideal conditions.

Let’s first analyse period from 01.05.2017 to 01.07.2017

If we take as a comparison BTC/USD movements we can see growth from avg 1400 USD to 2533 USD, we can see some decreasing waves, but still we had bullish market within this time range.

Let’s see if we try to optimise portfolios fully in crypto using BTC as a cash (asset with a high liquidity) and USDT cryptoasset as related to the USD.

We use in our simulation different algorithmic approaches listed above.

On the graph we can see CRP(blue) and M0(dark blue) are moving with the market which sounds logical because we do not rebalance portfolios but recalculate cummulative profit with each step.

We can notice rebalancing every 30 minutes to the BEST acts like a magnifier of the overall market, which is logical behaviour because crypto assets are very correlated with each other.

We can see that PAMR performance was not good at all.

But OLMAR and ANTICOR showed the best results, outperformed market 4–5 times.

But these were results from the time-range of bull’s market with a low volatility.

Let’s take a more interesting period from 01.12.2017 to 31.12.2017

It was mostly bullish market against fiat currency, with some drops as well.

Could we have good performance of portfolios staying fully on cryptomarkets.

We can see again that CRP and M0 are following the rhytm of the market(top 11 against BTC) as ANTICOR. PAMR is not performing well again. OLMAR performs well, but within some range BEST outperforms it which is also logical when on rapidly growing market you can always find asset which moves faster and constantly doing that you will always get best performance as well.

Let’s take period from 01.01.2018–08.02.2018, where we can see this picture

It was a bear market for crypto vs. fiat. But for cryptomarkets mostly it was a turbulence period. Yellow is LTC/BTC.

And our portfolios are:

OLMAR which showed good performance on the bullish market earlier, is much worse than a constant portfolio CRP, M0 (again this is not related to USD, but correlation with BTC) and WMAMR as well. Benchmark portfolios (CRP, M0) and ANTICOR showed very close results but BEST strategy has the best performance again.

This results show very clearly that “no free lunch theorem (https://en.wikipedia.org/wiki/No_free_lunch_in_search_and_optimization)" applies here as well. There is no “short-cut” method which is applicable for the all use cases. But bringing in our domain knowledge we can choose best methods for every market condition of course with some uncertainty as well.

OLMAR is good for the stable periods of the markets. Does BEST works always better in times of high market turbulence? We will see later.

In the next article we will talk about application of the Deep Learning technics related to the problems of portfolio optimisation for achieving best financial results.

--

--