Historical Data of Ardor (ARDR)

From 28 April 2013 to datetime.datetime.today().


In [1]:
import datetime

import pandas as pd
import numpy as np
from fbprophet import Prophet

In [2]:
dfs = pd.read_html('https://coinmarketcap.com/currencies/ardor/historical-data/?start=20130428&end={}'.format(datetime.datetime.today().strftime('%Y%m%d')))

df = dfs[0]

df.tail()


Out[2]:
Date Open High Low Close Volume Market Cap
422 Jul 31, 2016 0.039315 0.039423 0.038534 0.039141 0 -
423 Jul 30, 2016 0.039250 0.039641 0.038929 0.039318 0 -
424 Jul 25, 2016 0.042403 0.042463 0.042117 0.042117 7 -
425 Jul 24, 2016 0.036912 0.042547 0.036834 0.042405 7 -
426 Jul 23, 2016 0.036725 0.036970 0.036284 0.036970 36 -

In [3]:
df = df.drop(columns=['Open', 'High', 'Low', 'Volume', 'Market Cap'])
df = df.rename(columns={'Date': 'ds', 'Close': 'y'})

df.tail()


Out[3]:
ds y
422 Jul 31, 2016 0.039141
423 Jul 30, 2016 0.039318
424 Jul 25, 2016 0.042117
425 Jul 24, 2016 0.042405
426 Jul 23, 2016 0.036970

In [4]:
df['y'] = np.log(df['y'])

df.tail()


Out[4]:
ds y
422 Jul 31, 2016 -3.240585
423 Jul 30, 2016 -3.236073
424 Jul 25, 2016 -3.167304
425 Jul 24, 2016 -3.160489
426 Jul 23, 2016 -3.297649

In [5]:
m = Prophet()
m.fit(df)


INFO:fbprophet.forecaster:Disabling yearly seasonality. Run prophet with yearly_seasonality=True to override this.
INFO:fbprophet.forecaster:Disabling daily seasonality. Run prophet with daily_seasonality=True to override this.
Out[5]:
<fbprophet.forecaster.Prophet at 0x10eeb5048>

In [6]:
future = m.make_future_dataframe(periods=365)
future.tail()


Out[6]:
ds
787 2018-11-24
788 2018-11-25
789 2018-11-26
790 2018-11-27
791 2018-11-28

In [7]:
forecast = m.predict(future)
forecast[['ds', 'yhat', 'yhat_lower', 'yhat_upper']].tail()


Out[7]:
ds yhat yhat_lower yhat_upper
787 2018-11-24 1.731838 -3.381154 7.026396
788 2018-11-25 1.746593 -3.427866 7.025637
789 2018-11-26 1.771612 -3.431581 6.944436
790 2018-11-27 1.768283 -3.348127 7.073092
791 2018-11-28 1.783292 -3.434536 7.128455

In [8]:
m.plot(forecast)


Out[8]:

In [9]:
m.plot_components(forecast)


Out[9]:

In [ ]: