kryptos icon indicating copy to clipboard operation
kryptos copied to clipboard

Portfolio Construction

Open slavakurilyak opened this issue 6 years ago • 10 comments

Goal

As a developer, I want to automatically create portfolios based on user preferences, so that I recommend a diverse set of cryptoassets to invest in.

Consider

  • Consider using Auto-Encoders for Portfolio Construction. Here is an example of code and write up for Deep Learning in Finance (aka Deep Portfolios).

Inspiration

screen shot 2018-07-08 at 10 17 25 pm

Machine Learning (ML) outperforms Mean Variance Optimization (MVO) (New frontiers: Marcos Lopez de Prado on Machine Learning for finance, 2018)

Related Tasks

#38

slavakurilyak avatar May 28 '18 15:05 slavakurilyak

What preferences could the users set in the platform?

  • Exchange
  • Cryptocurrencies Favourites
  • Frequency to work (daily/minute)

Any more?

bukosabino avatar May 28 '18 16:05 bukosabino

Great starting point! The user's portfolio preferences can be summarized as:

Required Questions

  1. What cryptocurrency exchange do you use? (Bitfinex, Bittrex, Poloniex, etc.)
  2. What is your favourite crypto trading pair? (BTC/USD, BTC/EUR, etc.)
  3. How frequently do you wish to trade? (Daily, Minute)

Optional Questions

  1. What is your risk tolerance? (Low, Medium, High)
  2. What % of your crypto balance will be in Bitcoin? (100%, 50%, 25%, etc.)

slavakurilyak avatar May 29 '18 00:05 slavakurilyak

Here is a simple portfolio management strategy, that does not rely on machine learning:

1) 25/50/25 Cryptocurrency Portfolio Strategy

This 25/50/25 portfolio relies on trading crypto-coins, which are selected by the algorithm based on market capitalization. This portfolio manages three types of crypto categories:

Category 1: 25% Large Cap (Bitcoin, Ethereum, Ripple, Bitcoin Cash, EOS)

  • Top 5 coins
  • Market cap > $10 billion
  • Widespread use and adoption

Category 2: 50% Mid Cap (Litecoin, Stellar, Cardano, TRON, IOTA, etc.)

  • Top 30 coins
  • Market cap > $472.8 million
  • Growing popularity and media coverage

Category 3: 25% Small Cap (Siacoin, Bitcoin Private, Maker, Bitcoin Diamond, RChain, etc.)

  • Top 100 coins
  • Market cap < $472.8 million
  • New concept and early development

Rules

  • Have at least two different coins for each category
  • Circulate profits to the top

Inspiration: YouTube, 2017

How do you cycle your profits on this strategy?

screen shot 2018-05-28 at 7 19 46 pm

Inspiration: YouTube, 2017, YouTube, 2017

2) 50/25/25 Cryptocurrency Portfolio Strategy

This 50/25/25 portfolio relies on trading crypto-coins, which are selected by the algorithm based on market capitalization. This portfolio manages three types of crypto categories:

Category 1: 50% Bitcoin Only

Category 2: 25% Large Cap (Ethereum, Ripple, Bitcoin Cash, EOS, Litecoin)

  • Market cap > $6 billion

Category 3: 25% Small Cap (Siacoin, Bitcoin Private, Maker, Bitcoin Diamond, RChain, etc.)

  • Market cap < $6 billion

Rules

  • Number of coins does not matter

Inspiration: YouTube, 2018

3) Crypto Sectors Portfolio Strategy

We can also consider grouping crypto's by sector, not by market cap. OnChainFX classified 27 crypto sectors:

screen shot 2018-05-29 at 5 42 34 pm

Inspiration: OnChainFX, 2018; YouTube, 2017

4) 50/30/15/5 by LIL' CO฿AIN

long_term_crypto_portfolio

TLDR;

  • Invest 50% into BTC
  • Invest 30% into Super High Caps (Medium Risk)
  • Invest 15% into Altcoins (High Risk)
  • Invest 5% into Small Caps (Gambling)

Inspiration: LIL' CO฿AIN, 2017

slavakurilyak avatar May 29 '18 02:05 slavakurilyak

I have been playing with these ideas, but I need more time to get results.

This link is awesome: https://github.com/tcloaa/Deep-Portfolio-Theory

bukosabino avatar May 29 '18 14:05 bukosabino

Hi, I have bad news with this feature...

After that, I have studied the papers and the code of "Deep Portfolio Theory". I am not sure if it is useful for us:

  • https://github.com/tcloaa/Deep-Portfolio-Theory/blob/master/Part%201%20-%20Re-track%20IBB%20Index%20Using%20Deep%20Portfolio%20Theory.ipynb
  • https://github.com/tcloaa/Deep-Portfolio-Theory/issues/5

I think that we need to discard 'Deep Portfolio Theory'

bukosabino avatar May 30 '18 19:05 bukosabino

@bukosabino thanks for looking into this deep portfolio theory.

For now, we will start with a simple portfolio strategy (see 25/50/25 or 50/25/25 above), which does not rely on machine learning or deep learning.

slavakurilyak avatar May 30 '18 19:05 slavakurilyak

In order to create the 25/50/25 Cryptocurrency Portfolio Strategy (mentioned ^ above), consider retrieving the top 100 coins, sorted on market cap, using the CoinMarketCap API. This can be accomplished using GET https://api.coinmarketcap.com/v2/ticker/. Then we can create a list of market cap crypto pairs which checks which coins are accessible via catalyst and ccxt.

As of today, in back-testing mode, Catalyst supports:

  • 572 crypto pairs (192 for Bitfinex, 282 for Bittrex, and 98 for Poloniex) for Daily Data
  • 290 crypto pairs (192 for Bitfinex, and 98 for Poloniex) for Minute Data

In live-trading mode, Catalyst supports:

  • 116 exchange markets (each having numerous crypto pairs)

Note, since the market cap is based in USD, we need to create a list of USD- or USDT-friendly market cap crypto pairs.

slavakurilyak avatar Jun 02 '18 22:06 slavakurilyak

Consider an automated rebalancing strategy such as Shrimpy, which aims to diversify and manage cryptocurrency portfolios.

Rebalancing is a strategy which is used to readjust the weightings of a portfolio. By periodically buying or selling coins in the portfolio, the original percentage of each coin is maintained. For example, say the original target coin allocation was 50% BTC and 50% ETH. If Bitcoin performed well during the period, it could have increased it's coin weight in the portfolio to 70%. In order to get the portfolio back to the original balance of 50% BTC and 50% ETH, some BTC will be traded for ETH.

image

Source: HackerNoon, 2018

Rebalancing was compared to HODL (buy and hold strategy), and this strategy achieved better results:

The median performance for a portfolio with 10 assets and a rebalance period of 1 hour was 234% BETTER than HODL (HackerNoon, 2018)

Thanks to Victor Hogrefe at @BlockSpaceInc for suggesting Shrimpy

slavakurilyak avatar Jul 21 '18 23:07 slavakurilyak

@greggbench asked me "have you seen hodlbot.io"

Here's what I think.

  1. HodlBot "rebalances your (cryptocurrency) portfolio every 4 weeks to keep it consistent with the HODL 20 index." (Source) I anticipate that this rebalancing period will lead to sub-par portfolio performance. For our Cryptocurrency Trading Platform, we are developing a new rebalancing method based on shorter periods of minute and daily trades. I can predict that lower rebalancing periods will produce higher returns over HODL (buy and hold) for cryptocurrency portfolios.

  2. HodlBot "will automate all of our trades for you on your Binance exchange account." (Source) Our Cryptocurrency Trading Platform, on the other hand, supports more than 90 exchanges with varying degrees of cryptocurrency pair support.

  3. HodlBot "plugs into your cryptocurrency exchange account and intelligently executes trades for you. We are not a fund. We do not take a % fee. And our users own all of their own assets." (Source) Our Cryptocurrency Trading Platform operates in the same way. We ask our user for exchange authorization to automate cryptocurrency trading.

In other words, by mimicking Shrimpy's functionality we can achieve a new rebalancing method for Kryptos.

slavakurilyak avatar Aug 01 '18 00:08 slavakurilyak

TODO: Research about this

bukosabino avatar Aug 02 '18 17:08 bukosabino