bshyong / ga-bitbot

Automatically exported from code.google.com/p/ga-bitbot
GNU General Public License v3.0
1 stars 0 forks source link

bct.py issue #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. launch bct.py
2.
3.

What is the expected output? What do you see instead?
Result:
Bitcoin trade simulator v0.02a
Traceback (most recent call last):
  File "bct.py", line 615, in <module>
    te = prof.runcall(test)
  File "/usr/lib/python2.7/hotshot/__init__.py", line 78, in runcall
    return self._prof.runcall(func, args, kw)
  File "bct.py", line 595, in test
    te.input(float(t),float(r))
  File "bct.py", line 430, in input
    self.ai()       #call the trade ai
  File "bct.py", line 276, in ai
    if self.balance > (current_price * self.shares) and self.buy_delay == 0 and self.quartile == self.market_class[self.period][1]:
IndexError: list index out of range

What version of the product are you using? On what operating system?
latest source

Please provide any additional information below.
gene_server, gts, report_gen, and bcfeed where running

Original issue reported on code.google.com by alessand...@gmail.com on 17 Sep 2011 at 9:00

GoogleCodeExporter commented 9 years ago
The problem is in the 
self.quartile == self.market_class[self.period][1]:
part, but don't know how to correct it..

Original comment by alessand...@gmail.com on 17 Sep 2011 at 9:01

GoogleCodeExporter commented 9 years ago
It is correct to call the "self.market_classify" to populate the  
self.market_class?

Original comment by alessand...@gmail.com on 19 Sep 2011 at 7:08

GoogleCodeExporter commented 9 years ago
The market data classification should be optional. I'll have to add a flag to 
indicate if the data has been preprocessed with the classify_market function. 
If the data hasn't been classified, the quartile test should be disabled.

The reason for this bug is that the test code in bct was written prior to the 
inclusion of the market classification code, which broke the test (because I 
never checked it).

Original comment by brian.mo...@gmail.com on 19 Sep 2011 at 8:37

GoogleCodeExporter commented 9 years ago
issue fixed on the git repo, to be included in the next download release 0.1.2b

Original comment by brian.mo...@gmail.com on 29 Sep 2011 at 6:07