Advertisement
Guest User

Untitled

a guest
Oct 15th, 2019
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import talib
  2.  
  3. close = raw_dataset['Close','AAPL']
  4. high = raw_dataset['High','AAPL']
  5. low = raw_dataset['Low','AAPL']
  6. dataset = raw_dataset['Close']
  7.  
  8. indicators_df = pd.DataFrame()
  9.  
  10. indicators_df['close'] = close
  11. indicators_df['rsi'] = talib.RSI(close, timeperiod=14)
  12. indicators_df['aroon'] = talib.AROONOSC(high, low, timeperiod=30)
  13. indicators_df['ema'] = talib.EMA(close, timeperiod=100)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement