View attachment 5710
- #python 2.7 ; matplotlib
- All active altcoins were analyzed at poloniex.com; past 3 years of 2h data
- 2 hour simple moving averages of period 5 through 1000, stepping by 5, were drawn
- Each moving average was colored in rainbow format; slowest on one end of spectrum; fastest on other
View attachment 5709
- Rainbows were then sliced into 2 hour chunks and indexed by coin name and unix stamp
- Several hundred thousand such sliced png images 2 pixels by 100 pixels were created occupying several gigs of space
- Approximately 50 days of quad core desktop cpu time were used to create the rainbow slices
- An additional 2x10 pixels of grey scale were added to each image relative to the breadth of the rainbow moving average mesh
- The same process was repeated for BTC/USDT
- The current slice 2x110 pixels of rainbow for BTC/USDT was compared using computer vision to each of the quarter million altcoin slices back in time
- The best matches were sorted by highest correlation coeff
- The most recent 120 days of BTC/USDT data is then plotted in white
- In yellow, best matching historical altcoin data from match date to 60 days of projection was plotted
- The intensity of the yellow represents the correlation of each historic altcoin to the past 1000 2h candles of BTC/USDT data
- Each altcoin was scaled to btc price scale by dividing its beginning price by BTC/USDT last price then multiplying the array by the ratio
- The result is a 60 day ensemble model projection for BTC/USDT based on 3 year historical performance of poloniex altcoins
- litepresence
- April 2017
View attachment 5708
full size
http://i.imgur.com/KEo83KW.png
# python 2.7
# print list of top polo coins for given base currency by 24 hour volume
# litepresence April 2017
import requests
def topVolume(currency, depth): # public api access
uri = 'https://poloniex.com/public'
params = {'command':'return24hVolume'}
# get raw json from exchange
ret = requests.get(uri,params=params).json()
# create a list of keys in the dict that start with currency choice
v_keys = [item for item in list(ret.keys()) if item.startswith(currency)]
# create a list of lists [[v_keys and respective volume],...]
return24hVolume = [[str(item),float(ret[item][currency])] for item in v_keys]
# sort by volume, highest first
return24hVolume = (sorted(return24hVolume, key=lambda coin: coin[1]))[::-1]
# convert to list of just asset names; limit list length to depth
top24hVcoins = [item[0].split('_')[1] for item in return24hVolume][:depth]
return top24hVcoins
print topVolume('BTC',10)
#>>> ['XRP', 'ETH', 'LTC', 'DASH', 'ETC', 'GNT', 'XMR', 'XEM', 'ZEC', 'STR']