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

Sell/buy images not corrected #9

Closed Ulixestoitaca closed 4 years ago

Ulixestoitaca commented 4 years ago

Hello,

thank you for this interesting repository. I have run your code as it is but I have noticed that:

Maybe I am mistaking, could you confirm it is supposed to work like that?

cderinbogaz commented 4 years ago

Hello, Thanks for the findings! I hope the repo is being helpful in your project..

Ulixestoitaca commented 4 years ago

Hello, thank for your response. The image attached at the previous post is created by graphwerk.py so it is before of running ml.

What to do for correcting the bar colors? I am also unsure if it reflects correctly prices

Ulixestoitaca commented 4 years ago

May I ask if you are totally sure that open and close values are not inverted? Unfortunately I am not able to find anywhere 2008 eurusd data

cderinbogaz commented 4 years ago

Hi @Ulixestoitaca you can easily change this with the command on top of the graphwerk.py ad = genfromtxt('../financial_data/eurusd.csv', delimiter=',' ,dtype=str) pd = np.flipud(ad)

Just remove the flipping function for the ad variable and make this pd = ad

Depending on your data set you might need to flip it to make it like a regular chart that is being used on financial markets. This is not an issue since you need to choose it depending on your dataset

AshwinTayson commented 4 years ago

@cderinbogaz I used this on my dataset which is aligned like date, open, high, low, close and volume. This is the same as your eurusd.csv file. I'm getting sell for all of the data. If i use np.flipud(ad) then it gives the buy and sell but now there are alot of wrong buy and sells. My thoughts are that the following lines have the problem

close_next = float(df[finish][4])

sma = convolve_sma(close, 5)
smb = list(sma)
diff = sma[-1] - sma[-2]
if close[-1] > close_next:

image Everything including this was classified as sell