universal-portfolios
universal-portfolios copied to clipboard
Adding or substracting the latest dataset entry makes the model perform differently
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:
- Download dataset and remove the latest date entry
- Train any kind of OLPS model on this dataset
- Go back into your dataset and add the latest date entry to it again
- 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 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.