International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056
Volume: 09 Issue: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072
![]()
International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056
Volume: 09 Issue: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072
Sonal Kashyap1 , Muskan Singh2 , Laxmi V3
1Student, Dept. of Information Science and Engineering, BNM Institute of Technology, Karnataka, India 2 Student, Dept. of Information Science and Engineering, BNM Institute of Technology, Karnataka, India 3 Assistant Professor, Dept. of Information Science and Engineering, BNM Institute of Technology, Karnataka, India ***
Abstract
Cryptocurrencies are digital money in which, as opposed to a centralized authority, a decentralized system use encryption to verify transactions and keep records. Decentralization is the transfer of power and authority from a central entity which might be an individual, business, or group to a decentralized network. High price volatility of crypto currencies creates a huge impact oninternationaltrade. There has been significant jump in price of various currencies like Bitcoin, Ethereum, Litecoin, Dogecoin which has attracted a lot of investors. A lot of research has been done using ARIMA model, SVM and different machine learning techniques but none of them could give as promising results as deep learning models i.e., GRU and LSTM implemented in this paper. Enforcing forecasting models based on deep learningis the key goal. Long Short Term Memory (LSTM) and Gated Recurrent Unit (GRU) are two deep learning models that are employed in this study to deal with extreme price swings and produce reliable findings. The two models are further contrasted, and the best of the two is used to anticipate prices. Using two separate methodologies for error prediction, mean absolute percentage error (MAPE) and root mean square error (RMSE), it can be seen that GRU outperforms LSTM for the majority of cryptocurrencies.
Key Words: Recurrent Neural Network (RNN), LSTM (Long Short Term Memory), GRU (Gated Recurrent Unit), DeepLearning(DL)
For the past several years, predicting the price of cryptocurrencies has been an exciting field of study. As a leaderintheblockchainfinancialrenaissance,Bitcoin[1][2] contributes significantly to the market capitalization of cryptocurrencies. Cryptocurrency pricing forecast can provide assistance to both beginners and experienced investors in making the right investment decisions to maximizeprofitswhilealsosupportingpolicydecisionsand financialanalyststostudycryptocurrencymarketbehavior. Cryptocurrency forecasts are considered time series problems, just like stock price forecast. Crypto price prediction has been a challenging task due to its high volatility. Volatilityrefersto thesuddenchangeinmarket sentiments.Themarketsentimentisinfluencedbyvarious factors such as public relations, political system, market policies. Factors such as international relations can determine economic role of crypto on different market
strategies.Thecurrentstudy'sobjectiveistoreduceriskfor investorsandpolicymakersbybetterforecastingthepriceof cryptocurrenciesusingdeeplearningmodels.
Studies that use machine learning to predict cryptocurrencies are inadequate, especially in the techniquesofdeeplearning.Accordingtoasurveydonein theyear2016,over600articleshavebeenpublishedinthe area.Thispaperdiscussesaboutanexperimentconducted onmorethansixcryptocurrenciestoestimatetheirclosing prices using various methodologies, as well as the requirements and evaluation of RNN and its system architecturaldesign.
In[3],itappliedmachinelearningtechniqueslikesupport vectormachine(SVM),recurrentneuralnetwork(RNN),and artificial neural network (ANN), as well as k means clustering,topredictthepriceofbitcoinusingavarietyof attribute selection techniques to identify the most crucial features.Thefactthatthisresearchexclusivelyfocuseson investors,however,isadrawback.Policymakersshouldbe viewed as essential participants in the process since cryptocurrencieshavethepotentialtoalterthevolatilityof theglobaleconomy.
In [4], the research focused on computational intelligence methods, particularly the hybrid neuro fuzzy control of predicting bitcoin exchange rates. This model uses the neuro fuzzy method and the ANN. For the purpose of producing reliable prognosis findings, the project's deep learning(DL),reinforcementlearning(RL),andcurrentdeep neural network (NN) networks were combined in [5] to provide an extensive study framework for direct financial signalrepresentationandtrading.Usingdatafromthestock marketandfuturesmarkets,theproposedstrategywaslater validated.[6]claimedthatallmarketevaluationsofvirtual currencies are directly or indirectly influenced by socially formed beliefs about virtual money on a network like Twitter. This study aimed to determine the link between positive and negative attitudes that were gathered from Twitterinordertoanticipatethefluctuatingvalueofbitcoin usingsentimentanalysis.
Variousmachinelearningtechniqueshavebeenappliedin [7]tobettercorrectlyestimatethevalueofbitcoin.Usinga machinelearningtechniqueanalogoustoLSTM,itimproved
International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056
the estimate for future stock prices in [8]. Because it is a crucialstageinforecastingstockpricesandothermodelsof financialforecastingoutcomes,thestudyprimarilyfocuses ontimeseriesforecasts.Usingdatafromthestockmarket and commodities futures markets, they validate the suggestedmethodology.Additionally,whencomparedtothe currentARIMAmodel,theLSTMalgorithmyieldseffective andpreciseoutcomes.
ThedirectionoftheBitcoinvalueinUSDwaspredictedin[9] using Bayesian optimized RNN and LSTM. The AutoregressiveIntegratedMovingAverage(ARIMA)model was also included in order to compare the different deep learningapproaches.
Deep learning is a AI strategy that teaches computers to learnanddowhathumanbeingsdonormally.DLdescribesa family of learning algorithms rather than a single method thatcanbeusedtolearncomplexpredictionmodelsandfor examplebeusedinstockandcryptoprediction.Compared totheConventionalNeuralNetwork(CNN)whichcomprises 2 3hiddenlayers,thedeepneuralnetworksmaysumupto onehundredlayersormore.
RNNsaredeepneuralnetworkscharacterizedasrepetitive associationsbetweentheinputsandoutputsofneuronsor layersthatcantrainsequencedesignedtocapturerelevant temporarydataandtemporalsequenceinformation.Whenit comes to learning long sequences, it has recently become popular in deep learning because it overcomes the limitationsofexistingneuralnetworkarchitectures.Thetwo commonRNNnetworksusedforforecastingareLSTMsand GRUs,whicharedescribedinthenextsection.
Inordertoestimatetheclosingpriceofcryptocurrencieson an intraday basis by recognizing and analyzing pertinent factorsbythemodelitself,theproposedtechniquecompares and contrasts two alternative deep learning based prediction models. Figure 1 depicts the recommended technique's process design. The Kaggle dataset is downloadedfirst.Max MinNormalizationisusedtoscalethe data after that, and it is then further pre processed using dataaugmentation,binning,dimensionalityreduction,etc. Further,thedatasetissplitrandomlyinto70%trainingand 30%testing.30%ofthedataiskeptattrainingtotestthe accuracy of the techniques precisely. After implementing boththetechniquesforpriceforecasting,determinationof whichmodelperformsbetterandselectionofappropriate methodtoobtainbetterefficacy.Deeplearningalgorithms
likeLSTMandGRU,whicharethemostrecentandeffective methods for forecasting the closing price of cryptocurrencies, have been proposed in this study. Both models provide predictions about the final price of cryptocurrency.
Fig 1:BlockDiagramofProposedMethod
The most common technique for gathering, collecting, categorizing,andorganizinginformationisdatapreparation, which encompasses data visualization, analysis, and information mining with deep learning applications. To forecast bitcoin values, the proper dataset must be made available. This study used daily bitcoin prices, and the dataset was gathered via the Kaggle website at https://www.kaggle.com.From2013until2021,dailyaccess to pricing history is available. The dataset under examinationincludessevenfactors,includingdate,opening price,highprice,lowprice,andclosingprice;volume;and market potential of publicly traded outstanding shares, which are used to anticipate the closing price of crypto currencies.
Long term dependencies are the problems for which the desiredoutputisdependentoninputthatarepresentfarin thepast.LSTMsaremodelsespeciallybuilttosolvethelong termdependencyproblem.ItisthedefaultbehaviorofLSTM tolearninformationforlongintervaloftime. Allrecurrent neuralnetworksareintheformofchainofrepetitiveneural networkmodules.ForstandardRNNs,therepeatingmodule hasabasicstructurecalledasinglelayerof"tanh".Thedeep learning LSTM neural networks resolve the problems of declining gradient descent. The problem is overcome by addingmemorycellsandagatingmechanisminplaceofthe RNN'snodes.
Volume: 09 Issue: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page2977
International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056
Volume: 09 Issue: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072
Figure2showstheLSTMblockdiagram.Beforepassingon thelong termandshort terminformationtothefollowing cell, the LSTM cells employ the gates to control the information that is to be maintained or that is to be discarded during loop operation. The three gates serve as filters that exclude irrelevant, picked, and undesirable information.
The gates and layers that make up the LSTM are as follows:
Input Gate: Theinputgateisutilizedtoupdatethestateof thecell.Thesigmoidfunctiondetermineswhichvalueswill be changed based on the output from the previously concealedstateandthecurrentinput.Bychangingthevalues tobebetween0and1,where0denotesthatinformationis notimportantand1denotesthatinformationissignificant andmustbemaintained,thesigmoidfunctioncalculatesthe updated value. The tanh function is then given the hidden stateandcurrentinput.Tanhfunctionisusedtosquishthe valuesbetween 1and1fornetworkregulation.Thesigmoid output is multiplied by the additional tanh output. Which informationfromtanhissignificantandoughttoberetained isdeterminedbytheresultingsigmoidoutput.
Forget Gate: Todeterminewhethertokeepordiscardthe information,forgetgateisemployed.Thesigmoidfunction receivesinputfromtheprevioushiddenstateandthecurrent inputandoutputsvaluesbetween0and1.Thevalueswhich areapproximately0aretheinformationtogetdiscarded,and thevalueswhichareapproximately1aretheinformationto keep.
Output Gate: Theoutputgateisusedtodecidewhichvalue shouldbethenexthiddenstateandwhichinformationisto bepassedbasedonpreviousinputs.Italsouseshiddenstate forprediction.Stepsfollowedinoutputgateis:Thesigmoid functionreceivestwoinputs:themostrecenthiddenstate andthemostrecentinput.Afterthat,thenewlytransformed cell state is added to the tanh function. Additionally, the sigmoidoutputisrepeatedlycoupledwiththeresultofthe tanhfunctiontodeterminewhatinformationfromthehidden state should be carried. The concealed state is the output. Nexttimestepincludesthenewhiddenstateaswellasthe newcellstate.
A new generation of recurrent neural networks, the GRU depictedinFigure3,iscomparabletotheLSTM. TheGRU deletes the cell state and sends the data to subsequent neuronsusingtheconcealedstatus.GRU’shasfewertensor operationthanLSTM’sthereforeitisalittlefastertotrainthe model according tothe dataset. It hasa simple designand lessernumberofgatescomparedtoLSTM.
The gates and layers that make up the LSTM are as follows:
Update Gate:AnLSTM'supdategatefunctionsinthesame way as its forget and input gates put together. It makes decisionsonwhichdatatokeepandwhichtodelete.
Reset Gate: Another gateused tocontrol how much prior knowledgeistobeforgottenistheresetgate.
Fig 3:BlockDiagramofGRU
International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056
Volume: 09 Issue: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072
Sigmoid: Similartotanhactivations,sigmoidactivationsare seeninGates.Insteadofsquishingnumbersbetween 1and 1,itsquishesvaluesbetween0and1.Becauseeveryinteger multipliedby0equals0,valuesareoverlookedor"forgotten" when using this procedure to update or forget data. Any integermultipliedbyoneproducesthesamevalueasaresult; consequently,thevalueis"preserved."Thenetworkcanlearn whichinformationinadatasetisvitalandshouldberetained andwhichinformationisunimportantandshouldbedeleted.
Tanh: Tanhactivationaidsincontrollingthevaluesthatare transmittedacrossthenetwork.Valuesarealwayssqueezed to fall between 1 and 1 by the tanh function. Due of the multiple arithmetic operations created, vectors travelling through a neural network must go through several modifications.[9]
Thetwosuggesteddeeplearningmodels,theLSTMandGRU, aretrained.Afterthemodelshavebeentrained,theresults areexaminedusingMeanAbsolutePercentageError(MAPE) andRootMeanSquareError(RMSE)toidentifywhichmodel has the highest accuracy. It is noted in the tests that the LSTMmodeltakeslongerdurationtocompilethantheGRU model.Fromtheacquiredvaluesandthegraphsplotteditis evidentthatGRUmodelconvergesfasterthanLSTMmodel andissteadier.
Fig 4.b.:ClosingPricesofBitcoinpredictedbyGRU
Figure 4.a. represents the closing price of Bitcoin as forecastedbytheLSTMmodelandFigure4.b.representsthe closingpriceofBitcoinasforecastedbyGRU.Fromboththe figures,itcanbeunderstoodthatGRUhasmoreefficacyin forecastingthecryptopriceascomparedtoLSTM.
Fig 4.a.:ClosingPricesofBitcoinpredictedbyLSTM
Fig 5.a.:ClosingPricesofEthereumpredictedbyLSTM
Fig 5.b.:ClosingPricesofEthereumpredictedbyGRU
International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056
Volume: 09 Issue: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072
Figure 5.a. represents the closing price of Ethereum as forecastedbytheLSTMmodelandFigure5.b.representsthe closingpriceofEthereumasforecastedbyGRU.Fromboth thefigures,itcanbeunderstoodthatGRUhasmoreefficacy inforecastingthecryptopriceascomparedtoLSTM.
Fig 6.a.:ClosingPricesofCosmospredictedbyLSTM
Mean Absolute Percentage Error: Itmeasuresaccuracyof aforecastingsystem.Itmeasuresthisaccuracyintheform ofpercentage,andcanbecalculatedastheaverageabsolute percent error for each time period minus actual values wholedividedbyactualvalues.
Type of Cryptocurrency
Table 1: ErrorRate
LSTM GRU RMSE MAPE RMSE MAPE
Bitcoin 0.048 0.029 0.046 0.026
Ethereum 0.030 0.017 0.028 0.016
Dogecoin 0.035 0.011 0.034 0.011 Binance Coin 0.044 0.025 0.041 0.024
LiteCoin 0.026 0.014 0.032 0.018
Cosmos Coin 0.060 0.045 0.060 0.044 Cardano Coin 0.032 0.049 0.058 0.040
Fig 6.b.:ClosingPricesofCosmospredictedbyGRU
Figure 6.a. represents the closing price of Cosmos as forecastedbytheLSTMmodelandFigure6.b.representsthe closingpriceofCosmosasforecastedbyGRU.Fromboththe figures,itcanbeunderstoodthatGRUhasmoreefficacyin forecastingthecryptopriceascomparedtoLSTM.
In this paper, GRU based forecasting model is more appropriatethanLSTMformostofthecryptocurrenciesto predict time series data of highest price instability. Two errorfindingtechniqueshavebeenused:
Root Mean Square Error: It is thestandard deviationof theresiduals(prediction errors). Residuals are basically a measure of how far the data points lie from the line of regression.Itisameasureofhowspreadouttheseresiduals arewhichtellshowconcentratedthedataisaroundthe line ofbestfit.Itiscommonlyusedinclimatology,forecasting, andregressionanalysistoverifyexperimentalresults.
Table 1 shows the RMSE and MAPE values for various cryptocurrencies. From table 1, it is evident that GRU has lessererrorratewhencomparedtoLSTMmodel.
Cryptoisdecentralizedmethodofvirtualmoney.Itassumes a crucial part in unrestricted economy. One of the major advantages of crypto currency is that it eradicates third party intermediary among the users. The main purpose behind this work is to predict prices of various crypto currenciespresentinthemarket,efficiently.Therehasbeen numerous research on different methods for crypto price prediction.Therearemanyfactorssuchassocial,economic, geographical,politicalwhicheffectscryptopricesandmakes itvolatileinnature.Duetohighvolatilityofthetimeseries data,accuracyofcryptopredictionisnotgood.Throughthe studyofvariousresearchpaper,itisseenthatRNNbased model provides best accuracyamidstthevolatilityand all fluctuations.Togetaccurateresults,deeplearningmodels are used which helps in minimizing the risk and makes predictionsmorestable. Theproposedpapercomparestwo
© 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page2980
International Research Journal of Engineering and Technology (IRJET) e ISSN: 2395 0056
RNN based models i.e., LSTM and GRU. From the experiments conducted, it is observed that GRU model performs better for time series predictions and takes less time to compile. Both the models are known for their recognitioninlong termdependencies.
The future scope of the proposed work is to enhance the accuracyofpredictionsbyconsideringmoreparameterslike public relations, political activity, market policy, etc. into account. Incorporation of Fuzzification is also one of the majorfuturescopes.
[1] D.L.K. Chuen, Handbook of Digital Currency: Bitcoin, Innovation, Financial Instruments, and Big Data, AcademicPress,2015.
[2] S. Nakamoto, "Bitcoin: A peer to peer electronic cash system,"2008
[3] DennysCA,MallquiRAF(2018)Predictingthedirection, maximum,minimumandclosingpricesofdailybitcoin exchangerateusingmachinelearningtechniques.IntJ SoftComput(IJSC)596 606
[4] Atsalakis GS, Atsalaki IG, Pasiouras, F, Zopounidis C (2019) Bitcoin price forecasting with neuro fuzzy techniques.Elsevier,pp770 780
[5] Goodfellow I, Bengio Y, Courville A (2016) Deep learning.MITpress
[6] Pant DR, Neupane P, Poudel A, Pokhrel AK, Lama BK (2018) Recurrent neural network based bitcoin price predictionbytwittersentimentanalysis.IEEE,pp128 132
[7] PhaladisailoedT,NumnondaT(2018)Machinelearning modelscomparisonforbitcoinpriceprediction.In:2018 10th international conference on information technologyandelectricalengineering(ICITEE).IEEE,pp 506 511
[8] Nivethitha P, Raharitha P (2019) Future stock price predictionusingLSTMmachinelearningalgorithm.Int ResJEngTechnol(IRJET)1182 1186
[9] https://mlcheatsheet.readthedocs.io/en/latest/activati on_functions.html#tanh
[10] McNally S, Roche J, Caton S (2018) Cryptocurrency forecastingwithdeeplearningchaoticneuralnetworks. IEEE,pp339 343
[11] Madan I, Saluja S, Zhao A(2015) Automated bitcoin trading via machine learning algorithms. 1 5. http://cs229.stanford.edu/proj2014/Isaac\%
[12] LahmiriS,BekirosS(2019)Cryptocurrencyforecasting with deep learning chaotic neural networks. Elsevier, 35 40
[13] SaxenaA,SukumarTR(2018)PredictingbitcoinPrice using lstm and compare its predictability with Arima model.IntJPureApplMath2591 2600
Volume: 09 Issue: 06 | Jun 2022 www.irjet.net p ISSN: 2395 0072 © 2022, IRJET | Impact Factor value: 7.529 | ISO 9001:2008 Certified Journal | Page2981