Closed JamesKBowler closed 7 years ago
Just try to set "header=false" in read_csv method when you are reading those files in CSV_DATA_DIR
Sent from my iPhone
On Dec 4, 2016, at 11:18 AM, JamesKBowler notifications@github.com wrote:
When running the backtest for mac.py I get an error as per below. (qsforex) jbowler@GEN-U-DAE-01:~/Projects/qsforex$ python examples/mac.py
Traceback (most recent call last): File "examples/mac.py", line 29, in backtest.simulate_trading() File "/home/jbowler/venv/qsforex/lib/python2.7/site-packages/qsforex/backtest/backtest.py", line 81, in simulate_trading self._run_backtest() File "/home/jbowler/venv/qsforex/lib/python2.7/site-packages/qsforex/backtest/backtest.py", line 57, in _run_backtest self.ticker.stream_next_tick() File "/home/jbowler/venv/qsforex/lib/python2.7/site-packages/qsforex/data/price.py", line 182, in stream_next_tick bid = Decimal(str(row["Bid"])).quantize( File "/home/jbowler/ProgramData/anaconda2/lib/python2.7/decimal.py", line 547, in new "Invalid literal for Decimal: %r" % value) File "/home/jbowler/ProgramData/anaconda2/lib/python2.7/decimal.py", line 3873, in _raise_error raise error(explanation) decimal.InvalidOperation: Invalid literal for Decimal: 'Bid'
How is this fixed?
Thank-you
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Hi @yabolgha, Thank you for responding so quickly and my apologies for not...Tis the season.
I tried your suggestion however this did not work and gave a traceback below. I received the same error when set True. The error above was given when set to None.
(qsforex) jbowler@GEN-U-QS-01:~/projects/qsforex$ python examples/mac.py
Traceback (most recent call last):
File "examples/mac.py", line 27, in
Issue resolved in the below Pull Request https://github.com/mhallsmoore/qsforex/pull/23
Cheers!
When running the backtest for mac.py I get an error as per below. (qsforex) jbowler@GEN-U-DAE-01:~/Projects/qsforex$ python examples/mac.py
Traceback (most recent call last): File "examples/mac.py", line 29, in
backtest.simulate_trading()
File "/home/jbowler/venv/qsforex/lib/python2.7/site-packages/qsforex/backtest/backtest.py", line 81, in simulate_trading
self._run_backtest()
File "/home/jbowler/venv/qsforex/lib/python2.7/site-packages/qsforex/backtest/backtest.py", line 57, in _run_backtest
self.ticker.stream_next_tick()
File "/home/jbowler/venv/qsforex/lib/python2.7/site-packages/qsforex/data/price.py", line 182, in stream_next_tick
bid = Decimal(str(row["Bid"])).quantize(
File "/home/jbowler/ProgramData/anaconda2/lib/python2.7/decimal.py", line 547, in new
"Invalid literal for Decimal: %r" % value)
File "/home/jbowler/ProgramData/anaconda2/lib/python2.7/decimal.py", line 3873, in _raise_error
raise error(explanation)
decimal.InvalidOperation: Invalid literal for Decimal: 'Bid'
How is this fixed?
Thank-you