Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sandy4321/8cb638230aaf5776573dabbb9a2e7953 to your computer and use it in GitHub Desktop.
Save Sandy4321/8cb638230aaf5776573dabbb9a2e7953 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