Rest API for BitCoin Price analysis
- BitCoin Rest API is developed using Scala(SPRING) and Spark(ARIMA algorithm) for prediction.
BitCoin Rest API allows user to achieve following:-
- See the price movement for last week, month, year and for any custom date
- See movement of rolling average price between any two custom dates.
- Suggest the trading decision to be followed.
-
Clone the project.
-
Run the main class of SpringBootRestApplication in package 'com.tookitaki.assignment.bitcoin'.
-
Click on the following url to open the home page of the Rest API which looks like the following. http://localhost:8083/home
-
Click on the Show price movement button which displays following page.
By clicking on getGraph button you will get graph with price on y axis and date on x axis.
By selecting CustomDate option a text filed will be displayed to enter the date.Enter date in yyyy-mm-dd format.
-
Click on Show X days rolling average Price Movement button which displays following page.
Fill the values in the form displayed and click on get graph. A sample graph is shown below.
-
Click on Show trading decision button which displays following page.
Give the number of days to consider to train the ARIMA(Auto Regression Integrated Moving Average) model to give the trading decision. Following are the sample output.
Following links are used as references:
- https://github.com/sryza/spark-timeseries.
- http://blog.cloudera.com/blog/2015/12/spark-ts-a-new-library-for-analyzing-time-series-data-with-apache-spark/.
- https://towardsdatascience.com/bitcoin-price-prediction-using-time-series-forecasting-9f468f7174d3.
- https://medium.com/swlh/developing-bitcoin-algorithmic-trading-strategies-bfdde5d5f6e0.
- ARIMA model not available in spark. So, I used API developed by cloudera to develop price prediction with time series.