Skip to content

Instantly share code, notes, and snippets.

@JasonRBowling
Created December 12, 2020 20:07
Show Gist options
  • Save JasonRBowling/02c0b06d0dd85f86e79cae808e44dd25 to your computer and use it in GitHub Desktop.
Save JasonRBowling/02c0b06d0dd85f86e79cae808e44dd25 to your computer and use it in GitHub Desktop.
# generate moving averages
for c in self.coinList:
colName = c + "-MA"
self.data[colName] = self.data[c].shift(1).rolling(window=self.movingAverageWindows).mean()
colName = c + "-RSI"
self.data[colName] = talib.RSI(self.data[c].values, timeperiod = self.rsiWindow)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment