cderinbogaz / inpredo

Inpredo is a Deep Learning tool which looks into financial charts and predicts stock movements.
https://towardsdatascience.com/making-a-i-that-looks-into-trade-charts-62e7d51edcba
MIT License
159 stars 93 forks source link

ValueError: could not convert string to float: 'BTCUSD' #2

Closed GrahamboJangles closed 4 years ago

GrahamboJangles commented 4 years ago

Using Google Colab. python graphwerk.py returns:

60
Traceback (most recent call last):
  File "/content/inpredo/src/graphwerk.py", line 90, in <module>
    graphwerk(iter, iter+12)
  File "/content/inpredo/src/graphwerk.py", line 31, in graphwerk
    open.append(float(pd[start][1]))
ValueError: could not convert string to float: 'BTCUSD'

I edited the ad variable in graphwerk.py to equal

ad = genfromtxt('/content/inpredo/financial_data/btcusd-1h.csv', delimiter=',' ,dtype=str)

Edit: After deleting the second column in btcusd-1h.csv with the string BTCUSD and editing graphwerk.py to specify my buy and sell folders, I now get this error:

60
1.0005000396856893
close value is smaller
last value: 3779.7
next value: 3781.59
buy
0.9955536014781199
close value is bigger
last value: 3821.07
next value: 3804.08
sell

. . . 

Traceback (most recent call last):
  File "/content/inpredo/src/graphwerk.py", line 90, in <module>
    graphwerk(iter, iter+12)
  File "/content/inpredo/src/graphwerk.py", line 39, in graphwerk
    close_next = float(pd[finish][4])
IndexError: index 242 is out of bounds for axis 0 with size 242

Edit: Oh, I see. I overlooked the comment on line 29 in graphwerk.py.