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

A mistake (maybe) in stock_data_handle.py #11

Open
Huang1720 opened this issue Apr 24, 2024 · 0 comments
Open

A mistake (maybe) in stock_data_handle.py #11

Huang1720 opened this issue Apr 24, 2024 · 0 comments

Comments

@Huang1720
Copy link

Hello, when I checked the code of stock_data_handle.py, I got confused about the __getitem__ function of class DatasetStock_PRED because in the code you index the self.label with index instead of position, and I don't know why. I think it may lead to the return ratio generated from the first and second/ fifth day in seq_x being mistaken for the return ratio of the first and second/ fifth day in the future.
7c584df9226f3e7ebe609e64bedec6f
To prove what I found, I run sh train_pred_long.sh as an example and add some codes in the train funtion of Exp_pred in exp_pred.py as shown in the image below:
ac55d99d03b00204c4903d6a7a43bcf
It seems that the variable c which is a return ratio simply calculated from batch_x1 is exactly the same as batch_y. So I think in the code, there is an alignment problem between the training features and the labels
a1cc03f1e3767d51c995b2410bc41f5
Is this a mistake? If what I found is True, it will make the training process unreliable and may affect the conclusion. Could anyone help me? Thanks!

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

1 participant