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

MultiDatasetTradingEnv - Look ahead issue? #7

Open
livecat-ai opened this issue Jul 22, 2023 · 1 comment
Open

MultiDatasetTradingEnv - Look ahead issue? #7

livecat-ai opened this issue Jul 22, 2023 · 1 comment

Comments

@livecat-ai
Copy link

Hi Clement,

From what I understand reading the docs for the MultiDatasetTradingEnv:

  • The env selects a dataset and then advances through the time steps until done.
  • It then selects another dataset and repeats the above.

If this is the case are we introducing look ahead bias. Since at the end of the first episode we have already seen into the future. Would it be more realistic to iterate over all the datasets at time t, advance to time t+1 and again iterate over all the datasets up to time T?

Do you have any thoughts on this?

Best John.

@Karlheinzniebuhr
Copy link

Karlheinzniebuhr commented Jul 22, 2023

Hi Clement,

From what I understand reading the docs for the MultiDatasetTradingEnv:

  • The env selects a dataset and then advances through the time steps until done.
  • It then selects another dataset and repeats the above.

If this is the case are we introducing look ahead bias. Since at the end of the first episode we have already seen into the future. Would it be more realistic to iterate over all the datasets at time t, advance to time t+1 and again iterate over all the datasets up to time T?

Do you have any thoughts on this?

Best John.

During training there is more than one pass, so even if you switch between datasets, the model will do thousands of iterations on them again later. I think what you mean is that during evaluation there should be no lookahead, but afaik that won't happen since you would backtest a model on individual test datasets (not seen during training)

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