cderinbogaz / inpredo

Inpredo is a Deep Learning tool which looks into financial charts and predicts stock movements.

Home Page:https://towardsdatascience.com/making-a-i-that-looks-into-trade-charts-62e7d51edcba

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sell/buy images not corrected

Ulixestoitaca opened this issue · comments

Hello,

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

  • bar colour is inverted (it is red when price descend and green when it increase)
  • not every signal is correct, please look at the attached image: it is classified as a sell signal
    3fc55f02-d518-4e99-beb1-7f7347334a30

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

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

  • I think you are right about the inverted bar colours. Feel free to make a pull request to fix that.
  • Did you balance your training data? If it is imbalanced, e.g. if there are more sell samples in the training data than it will make the machine learning model more prone to result with sell signals. Ideally buy and sell samples in the folders should have an equal count.

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

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

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

@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