pysystemtrade seems to be a very interesting project and on eof the very few using IB native Python API. Great work. I have been trying to run one of the example file :asimpletradingrule.py, however I still get
AttributeError: 'DataFrame' object has no attribute 'Instrument'. I was able to fix another typo (submitted on github for you to review) but I am not sure as to what is happening on this one? I would be really grateful if you could show me what I am doing wrong? [I have been following the instal instruction to the dot regarding packages required and python version)
Trace below:
runfile('/home/olivier/pysystemtrade/examples/introduction/asimpletradingrule.py', wdir='/home/olivier/pysystemtrade/examples/introduction')
Reloaded modules: sysdata, sysdata.csvdata, syscore, syscore.fileutils, systems, examples, private, syscore.pdutils, syscore.dateutils, syscore.genutils, sysdata.futuresdata, sysdata.data, syslogdiag, syslogdiag.log, syscore.objects
using /home/olivier/pysystemtrade/data/futures/legacycsv
Traceback (most recent call last):
File "<ipython-input-3-c338bc01d55f>", line 1, in <module>
runfile('/home/olivier/pysystemtrade/examples/introduction/asimpletradingrule.py', wdir='/home/olivier/pysystemtrade/examples/introduction')
File "/home/olivier/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "/home/olivier/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/home/olivier/pysystemtrade/examples/introduction/asimpletradingrule.py", line 19, in <module>
print(data)
File "/home/olivier/pysystemtrade/sysdata/futuresdata.py", line 20, in __repr__
self.get_instrument_list())
File "/home/olivier/pysystemtrade/sysdata/csvdata.py", line 253, in get_instrument_list
instr_data = self._get_instrument_data()
File "/home/olivier/pysystemtrade/sysdata/csvdata.py", line 236, in _get_instrument_data
instr_data.index = instr_data.Instrument
File "/home/olivier/.local/lib/python3.6/site-packages/pandas/core/generic.py", line 3614, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'Instrument'
AttributeError: 'DataFrame' object has no attribute 'Instrument'. I was able to fix another typo (submitted on github for you to review) but I am not sure as to what is happening on this one? I would be really grateful if you could show me what I am doing wrong? [I have been following the instal instruction to the dot regarding packages required and python version)
Trace below:
runfile('/home/olivier/pysystemtrade/examples/introduction/asimpletradingrule.py', wdir='/home/olivier/pysystemtrade/examples/introduction')
Reloaded modules: sysdata, sysdata.csvdata, syscore, syscore.fileutils, systems, examples, private, syscore.pdutils, syscore.dateutils, syscore.genutils, sysdata.futuresdata, sysdata.data, syslogdiag, syslogdiag.log, syscore.objects
using /home/olivier/pysystemtrade/data/futures/legacycsv
Traceback (most recent call last):
File "<ipython-input-3-c338bc01d55f>", line 1, in <module>
runfile('/home/olivier/pysystemtrade/examples/introduction/asimpletradingrule.py', wdir='/home/olivier/pysystemtrade/examples/introduction')
File "/home/olivier/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "/home/olivier/anaconda3/lib/python3.6/site-packages/spyder/utils/site/sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/home/olivier/pysystemtrade/examples/introduction/asimpletradingrule.py", line 19, in <module>
print(data)
File "/home/olivier/pysystemtrade/sysdata/futuresdata.py", line 20, in __repr__
self.get_instrument_list())
File "/home/olivier/pysystemtrade/sysdata/csvdata.py", line 253, in get_instrument_list
instr_data = self._get_instrument_data()
File "/home/olivier/pysystemtrade/sysdata/csvdata.py", line 236, in _get_instrument_data
instr_data.index = instr_data.Instrument
File "/home/olivier/.local/lib/python3.6/site-packages/pandas/core/generic.py", line 3614, in __getattr__
return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'Instrument'
