Team Toolset:
R-Tool and MS-Excel.
Business Understanding
Over the years, the world has been emerging towards digital asset and this gave birth to new currency know as cryptocurrency. Cryptocurrencies are a type of digital currencies, alternative currencies and virtual currencies. The first decentralized cryptocurrency was Bitcoin created in 2009. Altcoins was a new currency, which was derived from Bitcoin.
To understand the business requirement, we need to understand the past and present flow of cryptocurrency to forecast the forthcoming bitcoin price and stock market at its best possible accuracy.
Data Understanding
Datathon has provided time series format of cryptocurrency over time period of 2018 (Jan – Mar) for Bitcoins (reference id -1422-3128). We have price data individual for every Bitcoin starting with 1422 and end with 3128 in CSV file format and one distinct price data file which involves entire all Bitcoins prices together. Data is not stationary.
Given time series of the Bitcoins data has consists some missing values and not in frequency which we expect (every 5 mints of interval)
Data Preparation
Loaded Bitcoins data into R environment and converting the time format data into Date format.
Split the time format column to different columns as Year, Month and Day respectively and assigned back to original.
Sub setting each day Bitcoins 1:288 data point observation with respective to particular day and selected particular time period
Modelling
We have chosen Neural Network Model to forecast the forthcoming bitcoin price and stock market at its best possible accuracy
Evaluation
Finally, data has been break down into two parts for better understanding namely Training and testing data, inject to our Neural Network algorithm and predicting the forthcoming Bitcoins price and stock market value, and choose the best one.
R _code:
rm(list = ls())
library(forecast)
library(tseries)
library(caret)
library(ggplot2)
library(lattice)
library(stats)
library(dplyr)
cr_prc <- read.csv(“E:/Academia Datathon/CryptoDataset/matrix_one_file/price_data.csv”)
cr_prc$date <- as.Date(cr_prc$time,format = “%d-%m-%Y”)
cr_prc$day <- format(cr_prc$date,”%d”)
cr_prc$month <- format(cr_prc$date,”%m”)
cr_prc1 <- cr_prc[,c(“time”,”X1442″,”X1445″,”X1456″,”X1446″,”X1453″,”X1447″,”X1452″,”X1443″,”X1457″,”X1451″,”X1460″,”X1448″,”X1454″,”X1447″,”X1449″,”X1444″,”X1450″,”X1474″,”X1455″,”X1465″,”day”,”month”)]
cr_prc1$day <- as.numeric(cr_prc1$day)
cr_prc1$month <- as.numeric(cr_prc1$month)
cr_prc2 <- cr_prc1 %>% filter((month == 01) & (day == 25))
View(cr_prc2)
nrow(cr_prc2)
e <- c()
k <- 1
i <- 1
l <- 7
j <- 285
while(k<=1){
prc <- window(cr_prc2[,2],start=c(k,i),end = c(l,j))
janmod <- nnetar(prc)
janpred <- forecast(prc,h=1)
e <- append(e,janpred$mean[[1]])
i <- i+1
j <- j+1
if(i>=286){
i <- 1
k <- k+1
}
if(j>=286){
j <- 1
j <- j+1
}
}
One thought on “Academia Datathon”
could you add your results in the article here