Skip to content

Instantly share code, notes, and snippets.

@PyDataBlog
Created November 21, 2017 19:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save PyDataBlog/1466d130969dbf4234b9d060ca683e50 to your computer and use it in GitHub Desktop.
Save PyDataBlog/1466d130969dbf4234b9d060ca683e50 to your computer and use it in GitHub Desktop.
bitcoin = cryptos[0]
bitcoin_cash = cryptos[1]
dash = cryptos[2]
ethereum_classic = cryptos[3]
bitconnect = cryptos[4]
litecoin = cryptos[5]
monero = cryptos[6]
nem = cryptos[7]
neo = cryptos[8]
numeraire = cryptos[9]
omisego = cryptos[10]
qtum = cryptos[11]
ripple = cryptos[12]
stratis = cryptos[13]
waves = cryptos[14]
dataset = [bitcoin, bitcoin_cash, dash,
ethereum_classic, bitconnect,
litecoin, monero, nem, neo,
numeraire, omisego, qtum,
ripple,stratis, waves]
for item in dataset:
item.sort_index(inplace=True)
item['30_day_mean'] = item['Close'].rolling(window=20).mean()
item['30_day_volatility'] = item['Close'].rolling(window=20).std()
for item in dataset:
print (item.columns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment