Showing posts with label XRP. Show all posts
Showing posts with label XRP. Show all posts

Monday, 8 February 2021

Data-Driven Approach To Cryptocurrency Speculation The Ultimate Methodology

Introduction 

A Data-Driven Approach To Cryptocurrency Speculation is the only way to success.
How do Bitcoin markets behave? What are the causes of the sudden spikes and dips in cryptocurrency values?  Are the markets for different Altcoins, such as Litecoin and Ripple, inseparably linked or largely independent?  How can we predict what will happen next?

Articles on cryptocurrencies, such as Bitcoin and Ethereum, are rife with speculation these days, with hundreds of self-proclaimed experts advocating for the trends that they expect to emerge.  What is lacking from many of these analyses is a strong data analysis foundation to backup the claims. Also fundamental analysis plays a crucial role for long term HODLERS. 

Fundamental Analysis

Before investing on a coin you have to do your research first, you have to know what are you investing on. This translates to analyzing the following elements:
  • The team reputation (e.g. team average age group)
  • The team skill set composition (e.g. skill set balance, in marketing and engineering)
  • The team skill set ratio (e.g. 70% engineers and 20% social community creation)
  • The product white paper (e.g. well written whitepaper, reviewed by lawyer)
  • HQ Location (e.g. London or Netherlands with stable legal framework etc.)
  • Company partnerships (e.g. associates with other companies in the field )
  • Social community  size (e.g. 30.000 users in telegram channel)
  • Technology Use Case:
    • Payment
    • Insurance
    • Oracle
    • Clean Energy
    • Shopping
  • Tokenomics (e.g. inflation, coin max supply, market-cap etc.)
  • Code audit from the product:
    • Security code audit from an independent 3rd Party (e.g. Review for security bugs etc.)
    • Manual Audit (e.g. Review for code quality etc.)
    • Github Repo code review (e.g. update frequency etc.)
Note: A sample analysis can be seen in this link Matic .

Tools For Fundamental Analysis

For fundamental analysis,we can you the following websites to get all the required information:
  • Coingecko - From this tool we can get information
  • Lunarcrush - From this tool we can get information about the coin and social sentiment 
  • OpenZeppelin - From this tool we can get information about the security audits
On top of the mentioned tools you can use also other tools. The mentioned tools cover 90% of my research.

Building Portfolio & Understanding Movement  

Usually by correlating different assets you can conclude how movement evolves and make the right bets. Below I have my latest correlation analysis, with pair from Poloniex public API. The test collects data from 2019-01-01 until today (2021-07-02), enjoy the Kendall correlation:


  This is for the same period the Spearman correlation:


 
  This is for the same period the Pearson correlation:



Note: For more information on correlations and how to use them please see my previous posts here and here.

From here we can see the following interesting correlations:
  • ETH has 0.74 to 0.96 correlation with BTC, which this translates to BTC is leading the way and ETH is following.
  • LINK has 0.74 to 0.9 correlation with ETH, which this translates to ETH leading the way and LINK following.
  • UNI has 0.76 to 0.88 correlation with COMP, which this translates to COMP is leading the way and UNI is following.
  • SNX has 0.66 to 0.9 correlation with BTC, which this translates to BTC is leading the way and SNX is following.

On Chain Data And Technical Analysis 

On chain data analysis is always mandatory and these are the metrics I am using to assess my short and long term movements:
  • Exchange Inflows/Outflows for swing trading from CryptoQuant and GlassNode
  • Coin reserves on BTC and ETH for long term investment and swing trades from CryptoQuant and GlassNode
  • NUPL indicator from GlassNode
  • Stable coin reserves on all main exchanges from CryptoQuant and GlassNode
  • Coin charts from Tradingview (for short term) and the following indicators:
    • RSI with fibonacci values
    • MACD with fibonacci values
    • Moving Average, Weighted Moving Average for 21,34 and 13 days
  • Buy and Sell walls from Tradinglight for short term movements

Bull and Bear Cycle Periods 

As we can understand in all assets there is a Bull cycle that alternates with a Bear cycle. Now between the Bear and Bull cycle there are mini Bear cycles were BTC consolidates (aka. Moves sideways) or retests the resistance lines. That time period is usually the best to switch your cash to the Altcoin market, and the market movement can be recorded. 

The diagram below shows which market (BTC or Alts) dominates based on market cap: 
 

When the graph hist 70% towards the BTC market, we switch to BTC, when it goes below 65% we switch to Alts and so on. 

Technical Analysis 

Technical Analysis works because the markets are largely based on human psychology. Swings follow numbers, but the behaviors are predictable to a certain extent. That certain extent has to do with the fact that human psychology is a natural factor, and most natural factors seem to mysteriously follow the golden rule, or Fibonacci numbers and proportions. The theory goes that if you tell a bunch of people that bad news is coming, a certain portion of them will act early or prepare in one way, a certain portion of them will wait and see, a certain portion of them will sit tight and power through [1].

Below we can see the most common patterns for TA, in order to identify future price movement:










Social Media Sentiment

Lunar crush is a very good site to get the overall social sentiment on most of the cryptos:



Summary/Last Words

A summary the blog post about the methodology:

  • Step1: Fundamental analysis for long term is mandatory
  • Step2: Crypto coin correlation can give us a good understanding about price movement
  • Step3: On Chain data analysis is a must to get valuable insights  
  • Step4: Technical Analysis is a complementary tool
  • Step5: Social sentiment can help you predict movement and new coins
Stay safe do not drive fast......


























References:












 

Sunday, 1 November 2020

Crypto Currency Correlation Analysis (Part 1)

 Introduction

The importance of the blockchain portfolio diversification due to high volatility is important. Analysing cryptocurrencies can only br done properly using heavy statistical models so as to be as much as possible in the safe side. In order to achieve that I will demonstrate how BTC, ETH, XRP and COMP correlate using three different methods (Pearson, Kendall and Spearman) in three different time periods. A long term time period (e.g. since 2015), a medium length period (one year) and short term period (14 days). But first lets talk about the methods that are going to be used.

Pearson Correlation Coefficient

In statistics, the Pearson correlation coefficient (PCC), also referred to as Pearson's r, the Pearson product-moment correlation coefficient (PPMCC), or the bivariate correlation, is a statistic that measures linear correlation between two variables X and Y. It has a value between +1 and −1. A value of +1 is total positive linear correlation, 0 is no linear correlation, and −1 is total negative linear correlation.

A value of 1 implies that a linear equation describes the relationship between X and Y perfectly, with all data points lying on a line for which Y increases as X increases. A value of −1 implies that all data points lie on a line for which Y decreases as X increases. A value of 0 implies that there is no linear correlation between the variables.[1]

Kendall rank correlation coefficient

In statistics, the Kendall rank correlation coefficient, commonly referred to as Kendall's τ coefficient, is a statistic used to measure the ordinal association between two measured quantities. A τ test is a non-parametric hypothesis test for statistical dependence based on the τ coefficient. [2] The numbers which give us the exact position of an object are called ordinal numbers. 

Ordinal numbers tell the position of an object rather than their quantity. Intuitively, the Kendall correlation between two variables will be high when observations have a similar (or identical for a correlation of 1) rank (i.e. relative position label of the observations within the variable: 1st, 2nd, 3rd, etc.) between the two variables, and low when observations have a dissimilar (or fully different for a correlation of −1) rank between the two variables.

The Kendall rank coefficient is often used as a test statistic in a statistical hypothesis test to establish whether two variables may be regarded as statistically dependent. This test is non-parametric, as it does not rely on any assumptions on the distributions of X or Y or the distribution of (X,Y).

Spearman's Rank Correlation Coefficient

In statistics, Spearman's rank correlation coefficient, is a nonparametric measure of rank correlation (statistical dependence between the rankings of two variables). It assesses how well the relationship between two variables can be described using a monotonic function.

The Spearman correlation between two variables is equal to the Pearson correlation between the rank values of those two variables; while Pearson's correlation assesses linear relationships, Spearman's correlation assesses monotonic relationships (whether linear or not). If there are no repeated data values, a perfect Spearman correlation of +1 or −1 occurs when each of the variables is a perfect monotone function of the other.[3]

A monotonic relationship is a relationship that does one of the following:

  • As the value of one variable increases, so does the value of the other variable; or 
  • As the value of one variable increases, the other variable value decreases.

Intuitively, the Spearman correlation between two variables will be high when observations have a similar (or identical for a correlation of 1) rank (i.e. relative position label of the observations within the variable: 1st, 2nd, 3rd, etc.) between the two variables, and low when observations have a dissimilar (or fully opposed for a correlation of −1) rank between the two variables.[3]

The Analysis

As already stated we are going to analyse BTC, ETH, XRP and COMP. After that I am going to talk about the coin properties and attempt to identify the associations, between each coin. At this point it is wise to state that the different coin properties add different psychological preferences for both institutional and retail investors e.g. the investors assume based on the currency properties etc.

So here we go 

Pearson Correlation: Time Period 2015 -01-01 to 2020-10-31

Kendall Correlation: Time Period 2015 -01-01 to 2020-10-31
Spearman Correlation: Time Period 2015 -01-01 to 2020-10-31

As we can see from the tables above, using different approaches to statistically analyse coin relationship gives us different results. The one that is the most obvious is the XRP with the BTC. Even though ETH and XRP correlate 90%+ , XRP and BTC do not correlate very in the Spearman analysis, but do well with Kendall and Pearson.  

Pearson Correlation: Time Period 2019 -01-01 to 2020-10-31

Kendall Correlation: Time Period 2019 -01-01 to 2020-10-31
Spearman Correlation: Time Period 2019 -01-01 to 2020-10-31

At this point we can see that XRP is clearly slowly decoupling from BTC and ETH is becoming even more closely associated to BTC. At this point we have to understand that the volume of the transactions is dramatically increased. See below [4]:

Average number of daily cryptocurrency transactions in 2nd quarter of 2020


Pearson Correlation: Time Period 2020 -10-16 to 2020-10-31
Kendall Correlation: Time Period 2020 -10-16 to 2020-10-31
Spearman Correlation: Time Period 2020 -10-16 to 2020-10-31
It seems that there is a variation between the relationship of the coins. You comments please below.....

Coin Properties

XRP properties:
  • RippleNet is a network of institutional payment-providers such as banks and money services businesses that use solutions developed by Ripple to provide a frictionless experience to send money globally.
  • Unlike Bitcoin or Ethereum, Ripple doesn’t have a blockchain aka is centralised. Ripple has is own patented technology: the Ripple protocol consensus algorithm (RPCA).
ETH properties:
  • ETH is using a blockchain.
  • Mining through proof of work (soon to change)
  • Ethereum is a decentralized system
  • Was build to support contracts
Ethereum and Bitcoin might be somehow similar when it comes to the cryptocurrency aspect, but the reality is that they are two completely different projects with completely different goals. While Bitcoin has established itself as a relatively stable and the most successful cryptocurrency to date, Ethereum is a multipurpose platform with its digital currency Ether being just a component of its smart contract applications.[5]

BTC properties:
  • BTC is using a blockchain.
  • Mining through proof of work
  • BTC is a decentralized system
  • BTC is a money-transfer system
Of Bitcoin’s many properties, trustlessness, or the ability to use Bitcoin without trusting anything but the open-source software you run, is, by far, king. More specifically, interest in Bitcoin appears to almost exclusively derive from a desire to avoid needing to trust some third party or combination of third parties. 

COMP Properties:
  • Runs on top of ETH platform
  • Compound Protocol is a suite of Ethereum smart contracts
  • In order to supply or borrow assets from the protocol, you need to write to the Ethereum blockchain.
Someone would expect that COMP should correlate perfectly with ETH, but nop......

For the people that want to reproduce the analysis, can use Python jypeter notebook, simply pull the data from an exchange API and use the following code:

corrMatrix = ALL_COIN_PRICE_MATRIX.corr(method ='spearman')
sns.heatmap(corrMatrix, annot=True)
plt.show()

corrMatrix = ALL_COIN_PRICE_MATRIX.corr(method ='kendall')
sns.heatmap(corrMatrix, annot=True)
plt.show()

corrMatrix = ALL_COIN_PRICE_MATRIX.corr(method ='pearson')
sns.heatmap(corrMatrix, annot=True)
plt.show()

References

  • https://en.wikipedia.org/wiki/Pearson_correlation_coefficient [1]
  • https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient [2]
  • https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient [3]
  • https://www.statista.com/statistics/730838/number-of-daily-cryptocurrency-transactions-by-type/#:~:text=Number%20of%20daily%20cryptocurrency%20transactions%202020%2C%20by%20type&text=In%20the%20second%20quarter%20of,daily%20transactions%20in%20that%20quarter. [4]
  • https://cointelegraph.com/ethereum-for-beginners/what-is-ethereum [5]
  • https://nakamoto.com/what-are-the-key-properties-of-bitcoin/ [6]

Market outlook 04-11-2021

 Bitcoin Status The Bitcoin volume is not here yet, it seems that the retails is not "lured" yet in to the planned big "pump ...