Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There are logic error in codes. #4

Open
amirkhango opened this issue Feb 27, 2018 · 1 comment
Open

There are logic error in codes. #4

amirkhango opened this issue Feb 27, 2018 · 1 comment

Comments

@amirkhango
Copy link

I am very glad to find somebody focusing on Stock Market with DL technique. Before finding this github, I also pay some time on this and beat with some problems, this code gives me a good reference.
Unfortunately, I find a fatal bug that indicates this github's CNN codes cannot run in reality. That is

# shuffling the data
perm = np.arange(labels_set.shape[0])
np.random.shuffle(perm)
stocks_set = stocks_set[perm]
labels_set = labels_set[perm]

The reason for that, in reality, stock stream comes with time order, this shuffle operation will break this rule.
If you do not believe, you can comment these codes and run it, you would find your test accuracy dramatically decrease from 70% down to 50%. That means it can only behave well on train set but always sucks on test set.

TL;DR, stock price/index prediction by CNN is nearly a hard (even impossible) task, because it is essentially event-driven not data-driven (price-driven). The codes here belongs to data-driven (price-driven) methods.
By the way, some researchers now pay much more attention on event-driven method, i.e., they grabbed event data of daily news and then use Deep Learning model to analysis it. But this method is relatively complicated.

@MarStarck
Copy link

ha, that's a permanent dispute between fundamental analysts and technical analysts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants