Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Basic Stuff - Conventions/SMA/EMA/Pandas/NP ARRAYS/TALIB

Hi Guys

I am just starting out here on my Quantopian adventure and wanted to get a grip on the data processing side before starting trying algos etc.

In this work book I am looking to extend one of the basic tutorials and plot EMA as well as SMA.

Couple of super n00b questions...

  1. I noticed TALIB needs arrays as input as opposed to a pandas dataframe. I attempted some clunky code in the notebook attached to do this. My question is there a more elegant way of doing such a thing? Also am I right in thinking that correct order is maintained when extracting columns out of a pandas df. ie in the example I have time and price columns. If I extract price data as an array - do some processing on it and then rejoin with the timestamp data is the data in the same order so that time / price info is maintained in correct fashion?

  2. Am I better off grouping things like SMA's and EMAs all together in their own df and then indexing accordingly or having multiple df instances for things like 200d SMA etc etc. I come from excel background so to me seems preferable to have one data frame with all my data and just index accordingly? This isn't particularly about SMA more so what is best practice for handling large amounts of data with similar index?

TIA

88888