Cryptocurrencies from Coinbase

Cryptocurrencies from coinbase

https://fred.stlouisfed.org/graph/?id=CBBTCUSD,CBETHUSD,CBLTCUSD,CBBCHUSD,#0

The following chart shows the performance summary from Jan-01-2018

The following chart shows the prices changes from 30 days ago.

The following table shows the correlation matrix. For example, the Bitcoin has the highest correlation with Litecoin.

                 Bitcoin Bitcash Ethereum Litecoin

Bitcoin 1.0000000 0.7921094 0.8138223 0.8278579

Bitcash 0.7921094 1.0000000 0.7690683 0.7620858

Ethereum 0.8138223 0.7690683 1.0000000 0.8022535

Litecoin 0.8278579 0.7620858 0.8022535 1.0000000

The following chart shows the prices of bitcoin

The following chart shows the prices of Bitcash.

The following chart shows the prices of Ethereum.

The following chart shows the prices of Litecoin.

Source: https://fred.stlouisfed.org/categories/33913

R-Codes:

require(IKTrading)

require(quantmod)

require(PerformanceAnalytics)

library(fPortfolio)

getSymbols(c(

“CBBTCUSD”, #Bitcoin

“CBBCHUSD”, #Bitcoin Cash

“CBETHUSD”, #Ethereum

“CBLTCUSD”, #Litecoin

“CBCCIND” #Coinbase Index

),

from=”2015-01-01″, src=’FRED’)

Crypto=merge(CBBTCUSD,CBBCHUSD,CBETHUSD,CBLTCUSD,CBCCIND)

names(Crypto)<-c(‘Bitcoin’,’Bitcash’,’Ethereum’,’Litecoin’,’Coinbase Index’)

Changes<-Crypto/lag(Crypto)-1

Crypto2018=window(Changes,start=as.Date(“2018-01-01”), end=as.Date(“2018-12-31”))

tail(Crypto2018)

dev.off()

#Chart for Performance Summary

charts.PerformanceSummary(Crypto2018, main=’Crypto Prices for 2018′,

wealth.index = TRUE)

cor.distance <- cor(Crypto2018)

corrplot::corrplot(cor.distance)

cor.distance

myColors <- c(“red”, “darkblue”,”brown”,”green”,”black”)

plot(x = last(Crypto, “1 years”), xlab = “Year”, ylab = “Index”,

main = “Dollar”, col=myColors, screens = 1)

legend(x = “topright”, legend = c(‘Bitcoin’,’Bitcash’,’Ethereum’,’Litecoin’,’Coinbase Index’),

lty = 1, col=myColors)

Diff_Crypto <- (Crypto/lag(Crypto)-1)

Diff_Crypto[1,] <- 0

Diff_Crypto30<-diff(Crypto,lag =30)

plot(x = last(Diff_Crypto30, “1 years”), xlab = “Year”, ylab = “Index”,

main = “Dollar”, col=myColors, screens = 1)

legend(x = “topright”, legend = c(‘Bitcoin’,’Bitcash’,’Ethereum’,’Litecoin’,’Coinbase Index’),

lty = 1, col=myColors)

# Bitcoin

par(mfrow=c(3,1))

plot(last(CBBTCUSD, “1 years”), main=”Bitcoin”, col=”black”)

barplot(last(weeklyReturn(CBBTCUSD), “1 years”), main=” Weekly Changes “, col=”blue”)

barplot(last(monthlyReturn(CBBTCUSD), “1 years”), main=”Monthly Changes”, col=”red”)

# Bitcash

par(mfrow=c(3,1))

plot(last(CBBCHUSD, “1 years”), main=”Bitcash”, col=”black”)

barplot(last(weeklyReturn(CBBCHUSD), “1 years”), main=” Weekly Changes “, col=”blue”)

barplot(last(monthlyReturn(CBBCHUSD), “1 years”), main=”Monthly Changes”, col=”red”)

# Ethereum

par(mfrow=c(3,1))

plot(last(CBETHUSD, “1 years”), main=”Ethereum”, col=”black”)

barplot(last(weeklyReturn(CBETHUSD), “1 years”), main=” Weekly Changes “, col=”blue”)

barplot(last(monthlyReturn(CBETHUSD), “1 years”), main=”Monthly Changes”, col=”red”)

# Litecoin

par(mfrow=c(3,1))

plot(last(CBLTCUSD, “1 years”), main=”Litecoin”, col=”black”)

barplot(last(weeklyReturn(CBLTCUSD), “1 years”), main=” Weekly Changes “, col=”blue”)

barplot(last(monthlyReturn(CBLTCUSD), “1 years”), main=”Monthly Changes”, col=”red”)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s