Skip to content

Instantly share code, notes, and snippets.

@MisterTicot
Created June 21, 2019 05:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MisterTicot/6134b1e0ce7c85d2b79f3e3e755e810b to your computer and use it in GitHub Desktop.
Save MisterTicot/6134b1e0ce7c85d2b79f3e3e755e810b to your computer and use it in GitHub Desktop.

Equilibre.io: Performance Analysis After One Year of Rebalancing

Equilibre.io 0.10.0 came with a way to compute the full historical value of any Stellar account, in fiats. After entering using the account public key, it is under "Portfolio" => "History". In this article, I'll use this data to analyze the performance of an account that I rebalanced using Equilibre.io's algorithms since over a year.

Note: Most of the charts in this article use the aforementioned data but can't be found directly on Equilibre.io: I coded new tools especially for the present analysis. Eventually, they'll make their way into the publicly available interface.

Equilibre.io "demo" Account

The account analyzed here is "GAWO2C52D57XBT7SQL6YB3XPHFLFD2J4Z5RN7HPFZSHXJMXH72HRXNV3", shortened as "GAWO...XNV3".

I used it to test my algorithms & strategies since April 2018, and I rebalanced it nearly every day since then.

Its history is publicly available: simply go to Equilibre.io and click on "Demo" in the footer. Then go to "Portfolio" => "History".

If you need the daily data, you'll find it into the web console among other things.

Portfolio History

[Chart1]

This graph may seem a bit hard to read at first. It shows the asset distribution of the portfolio over time, as well as its total value.

Each color band represents an asset, and the whole stack represents the portfolio total value at any given time.

What we see at first glance is that I changed the portfolio composition a few times and that it recovered from the autumn 2018 crash. On average, it seems to sit to higher than mid-2018.

Relevant Facts:

The exposure always has been 50% fiats, 50% crypto.

  • 20 Jun 2018: The rebalance setup was 1/4 CNY, 1/4 USD, 1/4 BTC, 1/4 XLM.
  • 26 Jul 2018: Yearly high at $240.86.
  • Nov 2018: Developing Equilibre.io becomes my main activity and I started to improve rebalancing algorithm significantly from there.
  • 12-21 Nov 2018: Switch to 1/6 USD, 1/6 CNY, 1/6 EUR, 1/6 BTC, 1/6 ETH, 1/6 XLM.
  • 20 Nov 2018: Autumn 2018 crash starts.
  • 16 Dec 2018: Yearly low at $145.73, drawdown: 39,5%.
  • 12-14 Feb 2019: Switch to 1/6 USD, 1/6 CNY, 1/6 EUR, 1/8 BTC, 1/8 ETH, 1/8 XLM, 1/8 native tokens.
  • 3 Jun 2019: Latest high at $232.64, 96.5% of yearly high.

Note About the Benchmarks

All historical prices are from Coingecko open API.

In the charts below, I halved assets & indexes performances to scale with the fact that GAWO...XNV2 only has a 50% exposure to crypto.

For example, an asset that had a performance of -30% is drawn at -15%, and an asset that had a performance of 20% is drawn at 10%.

This scaling is meant to ensure the consistency of the figures & their graphical representation.

Yearly Analysis

Comparison Against the Market

[Chart1]

The main way to benchmark a portfolio performance is to compare it against market indexes. The key concept here is "outperforming the market".

This is very difficult to achieve with consistency, to the point that in the financial spheres it is often considered to be the mere consequence of luck.

However, GAWO...XVN3 did just that. For the whole period, it clearly outperformed both the market, the CRypto IndeX and Crypto20.

This is an excellent result!

Worth noting, Crypto20 is an indexed crypto fund that you can buy into. As of today, the total fund value is estimated to be over 31 million USD.

Comparison Against Non-Balanced Portfolios

[Chart3]

This chart shows a comparison of the performance of GAWO...XNV3 against two non-balanced portfolios.

The first one (BTC/XLM) is initially made of 1/2 USD, 1/4 BTC, and 1/4 XLM.

The second one (BTC/ETH/XLM) is initially made of 1/2 USD, 1/6 BTC, 1/6 ETH and 1/6 XLM.

We can see that GAWO...XNV3 outperformed both of them, which is an expected result when it comes to rebalancing.

Comparison Against Its Main Assets Performance

[Chart2]

This chart compares the performance of GAWO...XNV3 against the three main assets composing it. We notice that the portfolio has a tendency to perform nearly as good as the best asset.

However, this comparison is biased because the portfolio wasn't composed by those three assets all the time.

For instance, Ethereum was not yet part of the portfolio while it first crashed in August 2018. Also, since February 2019 a number of native Stellar tokens have been added to the portfolio.

Sequential Analysis

We can get a more detailed view of Equilibre.io performance by analyzing GAWO...XNV3 against its own assets on 3 smaller sequences.

Range Market: 19 Jun 2018 - 11 Nov 2018

[Chart4]

  • GAWO...XNV3 balance for that sequence was 1/4 USD, 1/4 CNY, 1/4 BTC, 1/4 XLM.
  • During that sequence, I used un-optimized rebalancing algorithms.
  • Nonetheless, GAWO...XNV3 slightly outperformed the average.
  • Range is generally where portfolio balancers deliver the best results over the average.

Bear Market: 21 Nov 2018 - 11 Feb 2019

[Sequence]

  • GAWO...XNV3 balance for that sequence was 1/6 USD, 1/6 CNY, 1/6 EUR, 1/6 BTC, 1/6 ETH, 1/6 XLM.
  • I had to cut the beginning of the bear market because of GAWO...XNV3 being in the middle of a change of setup.
  • During that sequence, I wrote Equilibre.io web interface & improved the rebalancing algorithms.
  • GAWO...XNV3 performed on par with the average.

Bull Market: 14 Feb 2019 - 19 Jun 2019

[Sequence]

  • The portfolio balance was 1/6 USD, 1/6 CNY, 1/6 EUR, 1/8 BTC, 1/8 ETH, 1/8 XLM, 1/8 native tokens.
  • During that sequence, I improved price picking algorithm & implemented a way to use several anchors for the same asset.
  • For representing native tokens performance, I used a weighted average of REPO, SLT, TERN, PEDI. This is a rough estimation of the portfolio content over the period.
  • GAWO...XNV3 seemingly performed a bit under average.

Is should be noted that the average for this sequence is probably overestimated by a couple of percents. The reason is, price statistics have been inflated by market manipulations.

At some points, exchanges such as Bitmart & Bitforex reported prices twice as high as the ones really available in the market. Recently, Coingecko had to tweak its algorithms to cope with that very problem.

What I could do to get more faithful data is to rely directly on Stellar DEX trades history, which I will probably do the next time.

Possible Improvements

The following factors weighted negatively on the performances against the average and some could be mitigated in the future:

  • During the test phase, algorithms used to contain flaws that noticeably led to several losses that would not happen using the current algorithms.
  • Sometimes, offers are not picked due to low liquidity. In particular, the portfolio heavily relied on WSD & EURT which are difficult to sell in time.
  • The average is computed against USD, but the balanced portfolio had 33% of CNY+EUR which happened to lower by about 8% against the dollar over the year.
  • For the last sequence, the average is arguably over-evaluated by a couple of percents.

Conclusion

To conclude, we can see that Equilibre.io had been able to deliver consistent results over the whole period.

For a complete year, even during the early development stage, no obvious flaw hurt its performance.

Those results are on par − and in some case better − than professional tools currently available on the market.

... To be continued ...

Dear GalacticTalk Users:

Equilibre.io is competing for the Stellar Community Fund. The challenge for the first round is to gather as much likes as possible on GalacticTalk.

SDF will award lumens to the top7 projects. The prizes are significant & would allow me to continue working full-time on Stellar open-source applications such as Equilibre.io.

Please take a few seconds to give me a like so I can continue my work: https://galactictalk.org/d/1969-equilibre-io-a-portfolio-balancer-for-stellar

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment