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

About the setting of trunc_days #1755

Open
Shuqi-li opened this issue Mar 6, 2024 · 1 comment
Open

About the setting of trunc_days #1755

Shuqi-li opened this issue Mar 6, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Shuqi-li
Copy link

Shuqi-li commented Mar 6, 2024

In the document, the function of the parameter trunc_days is to avoid future information leakage:
"The trading days to be truncated the data in this segment may need ‘days’ data days are based on the test_start. For example, if the label contains the information of 2 days in the near future, the prediction horizon 1 day. (e.g. the prediction target is Ref($close, -2)/Ref($close, -1) - 1) the days should be 2 + 1 == 3 days."
I know what it means, but I still confused about why such process is necessary? If we don't truncate the days, when the segment is {"train": 2008/1/3-2008/1/29, "test":2008/1/30-2008/3/4}, why the information leakage happens?

@Shuqi-li Shuqi-li added the question Further information is requested label Mar 6, 2024
@Shuqi-li
Copy link
Author

Shuqi-li commented Mar 6, 2024

Could someone explain it in detail? Thank you!

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

No branches or pull requests

1 participant