universal-portfolios icon indicating copy to clipboard operation
universal-portfolios copied to clipboard

Adding or substracting the latest dataset entry makes the model perform differently

Open sword134 opened this issue 4 years ago • 1 comments

Describe the bug If one has a dataset of the daily closing prices of lets say 30 stocks and add the latest closing prices for the new day, then the model trained on the dataset-newest entry will no longer yield the same returns. It wont even have the same weights, this is very concerning as 1 new data entry shouldn't be able to affect the previous days weights or returns, instead the OLPS algo should just trade accordingly

To Reproduce Steps to reproduce the behavior:

  1. Download dataset and remove the latest date entry
  2. Train any kind of OLPS model on this dataset
  3. Go back into your dataset and add the latest date entry to it again
  4. Run the OLPS model with the given hyperparameters and see it crush itself on the new data.

Expected behavior Adding a new date entry shouldn't affect previous days weights or returns.

sword134 avatar Aug 06 '20 16:08 sword134

@sword134 could you provide a concrete example, please? There's even a test checking for forward bias and it always produces the same weights. It's possible that there's a bug somewhere though, so having an example I could test it against would be helpful.

Marigold avatar Aug 31 '20 14:08 Marigold