anfederico / clairvoyant

Software designed to identify and monitor social/historical cues for short term stock movement
MIT License
2.42k stars 772 forks source link

KeyError: 'EMA' #27

Closed codylabelle closed 6 years ago

codylabelle commented 6 years ago

Hi! Thank you for uploading this project.

I am having an issue running Backtest using the code in your README.md file. Using all of your original code and your example data, I receive the following error (I've edited out the traceback parts):

TypeError: 'str' object cannot be interpreted as an integer

  File "pandas\_libs\index.pyx", line 106, in pandas._libs.index.IndexEngine.get_value
  File "pandas\_libs\index.pyx", line 114, in pandas._libs.index.IndexEngine.get_value
  File "pandas\_libs\index.pyx", line 162, in pandas._libs.index.IndexEngine.get_loc
  File "pandas\_libs\hashtable_class_helper.pxi", line 1492, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas\_libs\hashtable_class_helper.pxi", line 1500, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'EMA'

Am I setting up the features incorrectly or do you know why I might be receiving this error? I am running python 3.6.4 and all of the dependencies are installed and up to date, as per the versions listed in the SyntaxError issue posted.

anfederico commented 6 years ago

Example data has feature columns called "X1" and "X2". I should make that more clear.