Skip to content
Merged

Tt1 #17

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions 03-cleaning.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,19 @@ for (i in 16:nrow(USDT)){

## Combine All the Value into One table

Finally, we combine the volatility, return, and market capitalization with the df.close1, creating the final table df.cryto
Finally, we combine the volatility, return, and market capitalization and volume with the df.close1, creating the final table df.crpyto

```{r}
df.close1$Date<-rep(df.close$Date,5)
df.cryto<-
df.crpyto<-
cbind(df.close1,
market_cap=c(BTC$market_cap,BNB$market_cap,ETH$market_cap,
USDC$market_cap,USDT$market_cap),
return=c(BTC$Return,BNB$Return,ETH$Return,USDC$Return,USDT$Return),
volatility=c(BTC$Vol,BNB$Vol,ETH$Vol,USDC$Vol,USDT$Vol))

volatility=c(BTC$Vol,BNB$Vol,ETH$Vol,USDC$Vol,USDT$Vol),
volumn=c(BTC$total_volume,BNB$total_volume,ETH$total_volume,
USDC$total_volume,USDT$total_volume))
df.crpyto$Date<-as.Date(df.crpyto$Date)
```


19 changes: 19 additions & 0 deletions 05-results.Rmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Results

```{r}
ggplot(df.close1, aes(price)) +
geom_boxplot() + coord_flip() +
Expand All @@ -11,3 +12,21 @@ ggplot(df.close1, aes(price)) +
plot(df.close[,2:6],pch=20, cex=0.1)
```

```{r}
## plot volatility by crypto
ggplot(df.crpyto, aes(x=Date,y=volatility))+
geom_line()+
facet_wrap(~cryptocurrency,scales = "free")


```

```{r}
## plot volatility vs market capitalization
ggplot(df.crpyto, aes(x=market_cap,y=volatility))+
geom_point(pch=5, cex=0.2)+
facet_wrap(~cryptocurrency, scales = "free")
```